NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.54k stars 13.71k forks source link

avr-gcc-libc fails to compile #1630

Closed edwtjo closed 10 years ago

edwtjo commented 10 years ago

Some ugly output..

building fs/gfs2/glops.o
  CC [M]  fs/gfs2/glock.o
./contrib/gdevcd8.c: In function 'do_floyd_steinberg':
./contrib/gdevcd8.c:2275:10: warning: variable 'ep' set but not used [-Wunused-but-set-variable]
     int *ep;
          ^
./contrib/gdevcd8.c:2274:16: warning: variable 'dp' set but not used [-Wunused-but-set-variable]
     byte *kP, *dp;
                ^
./contrib/gdevcd8.c:2274:11: warning: variable 'kP' set but not used [-Wunused-but-set-variable]
     byte *kP, *dp;
           ^
./contrib/gdevcd8.c: In function 'do_gcr':
./contrib/gdevcd8.c:2421:21: warning: unused variable 'out2' [-Wunused-variable]
   char output[255], out2[128];
                     ^
./contrib/gdevcd8.c:2421:8: warning: unused variable 'output' [-Wunused-variable]
   char output[255], out2[128];
        ^
./contrib/gdevcd8.c:2417:9: warning: unused variable 'uca_fac' [-Wunused-variable]
   float uca_fac;
         ^
./contrib/gdevcd8.c:2416:15: warning: unused variable 'kadd' [-Wunused-variable]
   int i, ucr, kadd, is_color = 0;
               ^
./contrib/gdevcd8.c: In function 'cdnj500_start_raster_mode':
./contrib/gdevcd8.c:3324:9: warning: unused variable 'yres' [-Wunused-variable]
     int yres = cdj850->y_pixels_per_inch;
         ^
./contrib/gdevcd8.c: At top level:
./contrib/gdevcd8.c:2314:1: warning: 'do_gamma' defined but not used [-Wunused-function]
 do_gamma(float mastergamma, float gammaval, byte values[256])
 ^
./contrib/gdevcd8.c:2091:1: warning: 'print_c0plane' defined but not used [-Wunused-function]
 print_c0plane(FILE *prn_stream, char plane_code, int plane_size,
 ^
make[4]: Entering directory `/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/avr/avr25/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/./gcc/xgcc -B/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/./gcc/ -B/nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/bin/ -B/nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/lib/ -isystem /nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/include -isystem /nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/sys-include    -g -O2 -mmcu=avr25 -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -DDF=SF -Dinhibit_libc -mcall-prologues -Os -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../libgcc -I../../../../libgcc/. -I../../../../libgcc/../gcc -I../../../../libgcc/../include   -DUSE_EMUTLS -o _absvhi2.o -MT _absvhi2.o -MD -MP -MF _absvhi2.dep -DL_absvsi2 -c ../../../../libgcc/../gcc/libgcc2.c  \
    -DLIBGCC2_UNITS_PER_WORD=2
../../../../libgcc/../gcc/libgcc2.c: In function '__absvhi2':
../../../../libgcc/../gcc/libgcc2.c:233:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [_absvhi2.o] Error 1
make[4]: Leaving directory `/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/avr/avr25/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/avr/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/avr/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr'
make: *** [all] Error 2
builder for `/nix/store/0dl47fd8mn7jjc5yjn0ndv9lqk4nvmsi-avr-gcc-libc.drv' failed with exit code 2
peti commented 10 years ago

The relevant part is this one, I guess:

/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/./gcc/xgcc -B/tmp/nix-build-avr-gcc-libc.drv-3/gcc-4.6.3/obj-avr/./gcc/ -B/nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/bin/ -B/nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/lib/ -isystem /nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/include -isystem /nix/store/ybj37084s2f71bkh3a1qm7id7krvcq20-avr-gcc-libc/avr/sys-include    -g -O2 -mmcu=avr25 -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -DDF=SF -Dinhibit_libc -mcall-prologues -Os -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../libgcc -I../../../../libgcc/. -I../../../../libgcc/../gcc -I../../../../libgcc/../include   -DUSE_EMUTLS -o _absvhi2.o -MT _absvhi2.o -MD -MP -MF _absvhi2.dep -DL_absvsi2 -c ../../../../libgcc/../gcc/libgcc2.c  \
    -DLIBGCC2_UNITS_PER_WORD=2
../../../../libgcc/../gcc/libgcc2.c: In function '__absvhi2':
../../../../libgcc/../gcc/libgcc2.c:233:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
edwtjo commented 10 years ago

Yes, of course. There doesn't seem to be a maintainer to CC. I can look into it later.

peti commented 10 years ago

There is probably not much the average Nixpkgs maintainer can do about a bug in GCC. You should really report this to gcc.gnu.org.

edwtjo commented 10 years ago

I didn't mean fix the bug :) Just going through the nixos patches for the package and the gcc bug database in search of similar bugs, in case there is a patch. Otherwise of course I'll file a bug.

edwtjo commented 10 years ago

Couldn't find any appropriate related bug. As expected, the segault also occurs without using any patches. Filed under 60015

edwtjo commented 10 years ago

I'll look into upgrading the package as a workaround.

vcunat commented 10 years ago

Could it be a problem that you have gcc-4.8.* in stdenv and use gcc-4.6.* parts?

vcunat commented 10 years ago

It builds now 14a6a059f according to @7c6f434c, so we close this?

edwtjo commented 10 years ago

Thanks @7c6f434c! I didn't realise you could substitute the stdenv gcc like that.