Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-15 Thread Danny Milosavljevic
> I don't know what has changed since I got things working, but I can no > longer compile that firmware. I get errors like this: > > main.c:38:20: fatal error: avr/io.h: No such file or directory There was a change in cross-base. We don't use CROSS_CPATH anymore. Howe

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-15 Thread Thompson, David
can't find all of its headers and libraries since they aren't in /usr. Some background: avr-gcc was broken for a very long time, until Manolis, Ricardo, and I worked out the problems several months ago. I tested avr-gcc by successfully compiling the various KADE miniArcade firmwares using

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-15 Thread Danny Milosavljevic
bleUSB() { return obj; } Should that have worked as-is? Also, why is avr-gcc also setting native-search-paths (even though it's a cross compiler)? Doesn't seem to make a difference and is also rather strange... What does the search-paths form do? Does it set environment variables in the profile as well?

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-10 Thread Thompson, David
On Wed, Aug 10, 2016 at 3:52 AM, Ricardo Wurmus wrote: > > Maybe Dave knows more about this? I haven't had time to look into anything, but last I checked I was able to successfully compile the firmware I'm interested in with avr-toolchain. - Dave

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-10 Thread Ricardo Wurmus
Vincent Legoll writes: >> Did you install the “avr-toolchain” package or just the “avr-gcc”? I >> had it working for me in the past after setting a couple of environment >> variables (I think it was the “CROSS_*” family of variables), but I >> don’t remember the detai

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-10 Thread Vincent Legoll
> Did you install the “avr-toolchain” package or just the “avr-gcc”? I > had it working for me in the past after setting a couple of environment > variables (I think it was the “CROSS_*” family of variables), but I > don’t remember the details, unfortunately. I think this is a recur

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-10 Thread Ricardo Wurmus
Danny Milosavljevic writes: >> Did you install the “avr-toolchain” package or just the “avr-gcc”? > > I have installed the package "avr-toolchain". The program "avr-gcc" is in my > profile but I think it was not from the package avr-gcc. > > $ ls

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-10 Thread Danny Milosavljevic
(The ones who are there: ~/.guix-profile/avr/lib$ ls -1 avr5/crt* avr5/crt90pwm161.o avr5/crt90pwm216.o avr5/crt90pwm316.o avr5/crt90scr100.o avr5/crta5790n.o avr5/crta5790.o avr5/crta5795.o avr5/crtat94k.o avr5/crtcan32.o avr5/crtcan64.o avr5/crtm161.o avr5/crtm162.o avr5/crtm163.o avr5/crtm164a.

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-10 Thread Danny Milosavljevic
> Did you install the “avr-toolchain” package or just the “avr-gcc”? I have installed the package "avr-toolchain". The program "avr-gcc" is in my profile but I think it was not from the package avr-gcc. $ ls -l /home/dannym/.guix-profile/bin/avr-gcc lrwxrwxrwx 143 ro

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-09 Thread Ricardo Wurmus
Danny Milosavljevic writes: > Hi, > > hmm, does avr-gcc work for anyone on Guix? > > I tried to compile a simple Arduino project and I get: > > /home/dannym/.guix-profile/bin/avr-g++ -x c++ -include Arduino.h -MMD -c > -mmcu=atmega32u4 -DF_CPU=1600L -DARDUIN

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-08-09 Thread Danny Milosavljevic
Hi, hmm, does avr-gcc work for anyone on Guix? I tried to compile a simple Arduino project and I get: /home/dannym/.guix-profile/bin/avr-g++ -x c++ -include Arduino.h -MMD -c -mmcu=atmega32u4 -DF_CPU=1600L -DARDUINO=100 -DARDUINO_ARCH_AVR -D__PROG_TYPES_COMPAT__ -Iarduino-1.6.10/hardware

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-06-01 Thread Ludovic Courtès
"Thompson, David" skribis: > On Thu, Apr 14, 2016 at 1:25 PM, Ludovic Courtès wrote: >> David Thompson skribis: >> >>> * gnu/packages/avr.scm (avr-gcc): New variable. >> >> [...] >> >>> + `(modify-phases ,phases >>>

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-05-30 Thread Thompson, David
On Thu, Apr 14, 2016 at 1:25 PM, Ludovic Courtès wrote: > David Thompson skribis: > >> * gnu/packages/avr.scm (avr-gcc): New variable. > > [...] > >> + `(modify-phases ,phases >> + ;; Without a working multilib build, the resulting GCC lack

Re: avr-gcc

2016-04-16 Thread Jan Nieuwenhuizen
Ludovic Courtès writes: > Jan Nieuwenhuizen skribis: > >> Except for packages that need a native gcc to build tools during build >> time (CC_FOR_BUILD). For such packages (like Bash or Guile), >> standard-packages must include gcc again. Then, the build recipe's >> phases must be changed so tha

Re: avr-gcc

2016-04-15 Thread Ludovic Courtès
Jan Nieuwenhuizen skribis: > Except for packages that need a native gcc to build tools during build > time (CC_FOR_BUILD). For such packages (like Bash or Guile), > standard-packages must include gcc again. Then, the build recipe's > phases must be changed so that when cross compiling, the > C_

Re: avr-gcc

2016-04-15 Thread Ludovic Courtès
Andy Wingo skribis: > On Fri 15 Apr 2016 14:44, Jan Nieuwenhuizen writes: > >> Andy Wingo writes: [...] >>> Basically in Guix we should, IMO, always be working on C_INCLUDE_PATH >>> and friends, and never on CPATH. >> >> I'm guessing that could work; would could try to change the above patch >

Re: avr-gcc

2016-04-15 Thread Andy Wingo
Hi :) On Fri 15 Apr 2016 14:44, Jan Nieuwenhuizen writes: > Andy Wingo writes: > >> Or is there some special logic which is applying to CPATH which is not >> applying to C_INCLUDE_PATH? > > Ah, yes; CPATH is not used when cross building, instead CROSS_CPATH is > used. Ah, I see. I guess that's

Re: avr-gcc

2016-04-15 Thread Jan Nieuwenhuizen
Andy Wingo writes: >> The problem is our usage of C_INCLUDE_PATH. > > I don't understand this diagnosis. If the paths were not in > C_INCLUDE_PATH, they would be in CPATH. Then you'd have the same > problem. No? Let me try to choose my words more carefully. The facts that gcc sets C_INCLUDE_P

Re: avr-gcc

2016-04-15 Thread Andy Wingo
On Fri 15 Apr 2016 10:09, Jan Nieuwenhuizen writes: > Ludovic Courtès writes: > >> I suppose the problem is that CPATH is still used elsewhere, leading >> to interference with this one. > > The problem is our usage of C_INCLUDE_PATH. I don't understand this diagnosis. If the paths were not in C

Re: avr-gcc

2016-04-15 Thread Jan Nieuwenhuizen
Ludovic Courtès writes: [CC: Andy because it's his bug report] >> * gnu/packages/gcc (gcc): Use CPATH instead of C_INCLUDE_PATH. Fixes usage >> of >> native glibc headers when cross-compiling. > > This would be reverting the fix for as the > comment above explains.

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-04-14 Thread Ludovic Courtès
David Thompson skribis: > * gnu/packages/avr.scm (avr-gcc): New variable. [...] > + `(modify-phases ,phases > + ;; Without a working multilib build, the resulting GCC lacks > + ;; support for nearly every AVR chip. > + (add-aft

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-04-14 Thread Ludovic Courtès
Manolis Ragkousis skribis: > Hey David, > > On 04/14/16 16:17, David Thompson wrote: >> + (substitute-keyword-arguments (package-arguments xgcc) >> + ((#:phases phases) >> + `(modify-phases ,phases >> + ;; Without a working multilib build, the resulting GCC lack

Re: avr-gcc

2016-04-14 Thread Ludovic Courtès
Jan Nieuwenhuizen skribis: > From 5a6b6ba5a440d43af3e8c5cbd1d24f3be5a99804 Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen > Date: Sun, 27 Mar 2016 16:00:36 +0200 > Subject: [PATCH 1/9] gnu: gcc: use CPATH, fixes cross builds. > > * gnu/packages/gcc (gcc): Use CPATH instead of C_INCLUDE_PATH.

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-04-14 Thread Manolis Ragkousis
Hey David, On 04/14/16 16:17, David Thompson wrote: > + (substitute-keyword-arguments (package-arguments xgcc) > + ((#:phases phases) > + `(modify-phases ,phases > + ;; Without a working multilib build, the resulting GCC lacks > + ;; support for nearl

Re: [PATCH 2/5] gnu: Add avr-gcc.

2016-04-14 Thread Thompson, David
On Thu, Apr 14, 2016 at 9:53 AM, Manolis Ragkousis wrote: > Hey David, > > On 04/14/16 16:17, David Thompson wrote: >> + (substitute-keyword-arguments (package-arguments xgcc) >> + ((#:phases phases) >> + `(modify-phases ,phases >> + ;; Without a working multilib

[PATCH 2/5] gnu: Add avr-gcc.

2016-04-14 Thread David Thompson
* gnu/packages/avr.scm (avr-gcc): New variable. --- gnu/packages/avr.scm | 31 +++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index b30c64e..0ec115e 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -20,6

Re: avr-gcc

2016-04-13 Thread Jan Nieuwenhuizen
Ludovic Courtès writes: >> fatal error: gnu/stubs-32.h: No such file or directory >> # include >>^ >> compilation terminated. > > is used when building on a 64-bit glibc system in > 32-bit mode. However, our glibc does not provide it currently. I had this same prob

Re: avr-gcc

2016-04-13 Thread Ludovic Courtès
"Thompson, David" skribis: > avr-gcc -DHAVE_CONFIG_H -I. -I../../../../avr-libc-2.0.0/avr/lib/avr2 > -I../../.. -I../../../../avr-libc-2.0.0/common > -I../../../../avr-libc-2.0.0/include -I../../../include > -I../../../../avr-libc-2.0.0/common > -I../../../../

Re: avr-gcc

2016-04-12 Thread Thompson, David
g 'CFLAGS=-D__x86_64__' yields a successful build. Does anyone have an idea what is going wrong here? If so, how can we make sure that all platforms will build this thing correctly? I use avr-gcc on ARM machines, for example. Thanks, - Dave

Re: avr-gcc

2016-04-12 Thread Thompson, David
Revitalizing this old thread. On Fri, Nov 20, 2015 at 9:20 AM, Ludovic Courtès wrote: > "Thompson, David" skribis: > >> Not quite. The avr-gcc build only provides a single version of >> libgcc.a, whereas Debian's avr-gcc provides a separate libgcc.a for >>

Re: avr-gcc

2015-11-20 Thread Ludovic Courtès
"Thompson, David" skribis: > Not quite. The avr-gcc build only provides a single version of > libgcc.a, whereas Debian's avr-gcc provides a separate libgcc.a for > each supported AVR family (avr2, avr3, avr35, etc.) Mark thought it > might be the fault of the --disa

Re: avr-gcc

2015-11-18 Thread Thompson, David
ion >> (variable "C_INCLUDE_PATH") >> (files '("avr/include"))) > > ‘C_INCLUDE_PATH’ is the C-only equivalent of ‘CPATH’. Our > cross-compiler honors ‘CROSS_CPATH’ instead of ‘CPATH’ so as to > distinguish between host and build headers (s

Re: avr-gcc

2015-11-18 Thread Ludovic Courtès
"Thompson, David" skribis: > On Tue, Nov 17, 2015 at 4:32 PM, Ludovic Courtès wrote: [...] >> In GCC we modify the spec file so that the right -L/libc/dir/name is >> passed to ld; see (gnu packages gcc), ‘GNU_USER_TARGET_LIB_SPEC’. >> >> However, ‘gcc-cross-sans-libc-avr’ is a bare-bones compi

Re: avr-gcc

2015-11-17 Thread Thompson, David
On Tue, Nov 17, 2015 at 4:32 PM, Ludovic Courtès wrote: > Ricardo Wurmus skribis: > >> Microscheme 0.9.2, (C) Ryan Suchocki Treeshaker: After 4 rounds: 87 globals purged! 22 bytes will be reserved. 18 lines compiled OK Assembling... >> avr-ld: cannot find crtm328p.o: No such file o

Re: avr-gcc

2015-11-17 Thread Ludovic Courtès
t; LIBRARY_PATH, however, I cannot seem to fix the linker errors above. > Then I realised that LIBRARY_PATH only works for native compilers, and > that I would need to pass flags to the compiler (“-L”, maybe?). Maybe microsheme should have avr-gcc and avr-libc as propagated inputs or something like that? HTH, Ludo’.

Re: avr-gcc

2015-11-17 Thread Ricardo Wurmus
Ricardo Wurmus writes: > I’ve been wanting to use microscheme to do fun things with my AVR > microcontrollers. Sadly, I haven’t been able to make the combination of > microscheme, avrdude, and avr-gcc work. [...] > There are multiple copies of “libm.a” and “libc.a” a

avr-gcc

2015-11-17 Thread Ricardo Wurmus
Hi Guix, I’ve been wanting to use microscheme to do fun things with my AVR microcontrollers. Sadly, I haven’t been able to make the combination of microscheme, avrdude, and avr-gcc work. Here’s what I did first: guix package -i microscheme avrdude gcc-cross-sans-libc-avr avr-libc The