On 29 August 2012 15:59, Maarten Boekhold <[email protected]> wrote: > On Monday, 27 August 2012 at 15:00:10 UTC, Maarten Boekhold wrote: > >> >> Other than that, the instructions don't look too complicated. Will see if >> I can give this a shot on a server at work when I get back from leave next >> week. > > > As a test run, I tried to built this on my Ubuntu 12.04 VM, and it's not > working. > > I'm following exactly the steps from the wiki, apart from the "git checkout > gdc-1.x", which I replaced by "git checkout gdc-4.7" (using gcc 4.7.1 > sources). > > It's failing on: > > /home/boekhold/src/gdc/objdir/./gcc/xgcc > -B/home/boekhold/src/gdc/objdir/./gcc/ -B/opt/gdc/i686-pc-linux-gnu/bin/ > -B/opt/gdc/i686-pc-linux-gnu/lib/ -isystem > /opt/gdc/i686-pc-linux-gnu/include -isystem > /opt/gdc/i686-pc-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W > -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes > -Wold-style-definition -isystem ./include -fpic -g -DIN_LIBGCC2 > -fbuilding-libgcc -fno-stack-protector -fpic -I. -I. -I../.././gcc > -I../../../gcc-4.7.1/libgcc -I../../../gcc-4.7.1/libgcc/. > -I../../../gcc-4.7.1/libgcc/../gcc -I../../../gcc-4.7.1/libgcc/../include > -I../../../gcc-4.7.1/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT > -DHAVE_CC_TLS -DUSE_TLS -o _negdi2.o -MT _negdi2.o -MD -MP -MF _negdi2.dep > -DL_negdi2 -c ../../../gcc-4.7.1/libgcc/libgcc2.c -fvisibility=hidden > -DHIDE_EXPORTS > In file included from /usr/include/stdio.h:28:0, > from ../../../gcc-4.7.1/libgcc/../gcc/tsystem.h:88, > from ../../../gcc-4.7.1/libgcc/libgcc2.c:29: > /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or > directory > compilation terminated. > make[2]: *** [_muldi3.o] Error 1 > make[2]: *** Waiting for unfinished jobs.... > In file included from /usr/include/stdio.h:28:0, > from ../../../gcc-4.7.1/libgcc/../gcc/tsystem.h:88, > from ../../../gcc-4.7.1/libgcc/libgcc2.c:29: > /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or > directory > compilation terminated. > make[2]: *** [_negdi2.o] Error 1 > make[2]: Leaving directory > `/home/boekhold/src/gdc/objdir/i686-pc-linux-gnu/libgcc' > make[1]: *** [all-target-libgcc] Error 2 > make[1]: Leaving directory `/home/boekhold/src/gdc/objdir' > make: *** [all] Error 2 > > > Any suggestions?
Ubuntu is special, it has a peculiar set-up that breaks the usage of vanilla gcc builds (but their own gcc is patched to accompany this set-up). The quick fix is adding the following to your ~/.bashrc For i386: LIBRARY_PATH=/usr/lib/i386-linux-gnu CPATH=/usr/include/i386-linux-gnu export LIBRARY_PATH CPATH For x86_64: LIBRARY_PATH=/usr/lib/x86_64-linux-gnu CPATH=/usr/include/x86_64-linux-gnu export LIBRARY_PATH CPATH Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
