Gcc cannot find /predefs.h bit on i686

Ok, so I switched from ubuntu 12.04 64-bit to 32-bit and installed build-essential.

Then I compiled and installed GMP-5.0.5, MPFR-3.1.1, MPC-1.0, ISL-0.10 and CLOOG-0.17.0. I checked a copy of the gcc main trunk and tried to build it with the following configure line (from a separate directory):

 ../svnsrc/configure --prefix=/usr/GCC/svn --enable-__cxa_atexit --with-plugin-ld=/usr/bin/ld.gold --enable-threads=posix --enable-werror --enable-build-with-cxx --with-gmp=/usr/GCC/prereq/svn --with-mpfr=/usr/GCC/prereq/svn --with-mpc=/usr/GCC/prereq/svn --with-isl=/usr/GCC/prereq/svn --with-cloog=/usr/GCC/prereq/svn --enable-languages=c,c++ 

Configure is working fine, so I ran make && make check . This worked a bit, but then it did not work with the following error:

 /home/matt/GCC/svnbuild/./gcc/xgcc -B/home/matt/GCC/svnbuild/./gcc/ -B/usr/GCC/svn/i686-pc-linux-gnu/bin/ -B/usr/GCC/svn/i686-pc-linux-gnu/lib/ -isystem /usr/GCC/svn/i686-pc-linux-gnu/include -isystem /usr/GCC/svn/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 -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../svnsrc/libgcc -I../../../svnsrc/libgcc/. -I../../../svnsrc/libgcc/../gcc -I../../../svnsrc/libgcc/../include -I../../../svnsrc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../svnsrc/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS In file included from /usr/include/stdio.h:28:0, from ../../../svnsrc/libgcc/../gcc/tsystem.h:88, from ../../../svnsrc/libgcc/libgcc2.c:29: /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory #include <bits/predefs.h> ^ compilation terminated. make[3]: *** [_muldi3.o] Error 1 make[3]: Leaving directory `/home/matt/GCC/svnbuild/i686-pc-linux-gnu/libgcc 

I looked around, but all that seemed to me was that this error was caused by x86_64, without installing gcc-multilib , because Ubuntu and Debian use mutiarch, sharing libraries. Ok, great ... but I'm using i686, so why do I need 64-bit libraries? Any help would be greatly appreciated. Thank.

+69
Sep 25 '12 at 21:52
source share
2 answers

Try to do

 sudo apt-get install gcc-multilib 

I donโ€™t think that installing a 32-bit system will change the architecture of your computer, because your computer will always be a 64-bit machine. Installing a 64-bit version of Ubuntu should only provide better multi-core performance. Since your computer is still a 64-bit computer, you probably need a C compiler that will compile on 64-bit machines. Hence gcc-multilib. I think.

+121
Sep 27 '12 at 6:05
source share

The gcc-multilib trick didn't work for me. Instead, installing this in the build environment did the trick:

 C_INCLUDE_PATH=/usr/include/$(gcc -print-multiarch) 
+3
Aug 12 '13 at 15:07
source share



All Articles