LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   GCC fails to compile - Chapter 6.14 - C preprocessor "/lib/cpp" fails sanity check (http://www.linuxquestions.org/questions/linux-from-scratch-13/gcc-fails-to-compile-chapter-6-14-c-preprocessor-lib-cpp-fails-sanity-check-700397/)

jaydoc 01-27-2009 11:56 PM

GCC fails to compile - Chapter 6.14 - C preprocessor "/lib/cpp" fails sanity check
 
1 Attachment(s)
While in the chrooted environment, at the stage of GCC 4.3.2 compilation this error was produced and make failed.

Quote:

Checking multilib configuration for libgcc...
mkdir -p -- i686-pc-linux-gnu/libgcc
Configuring in i686-pc-linux-gnu/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /tools/bin/install -c
checking for gawk... gawk
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-ar... ar
checking for i686-pc-linux-gnu-lipo... lipo
checking for i686-pc-linux-gnu-nm... /sources/gcc-build/./gcc/nm
checking for i686-pc-linux-gnu-ranlib... ranlib
checking for i686-pc-linux-gnu-strip... strip
checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc... /sources/gcc-build/./gcc/xgcc -B/sources/gcc-build/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /sources/gcc-build/./gcc/xgcc -B/sources/gcc-build/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include accepts -g... yes
checking for /sources/gcc-build/./gcc/xgcc -B/sources/gcc-build/./gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include option to accept ANSI C... none needed
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/sources/gcc-build'
make: *** [all] Error 2
I have attached the config.log file. I searched for this and found that this error was common at the ncurses compilation stage, and usually because there is no c++ compiler. But isn't that what is being compiled at this stage..? Or does it mean that the host system does not have c++...? the host is Arch linux and has gcc 4.3.2.

Until this error everything went as per book, including the running of all test suites for previous packages.

Is there a way out..?

utopicdog 01-28-2009 06:17 PM

i can't understand why you want to compile 4.3.2 when you already have 4.3.2? there is little advantage in recompiling gcc unless you can't install a binary package, you will get bits of one gcc in /usr/bin and others in /usr/local/bin, also it takes a long time and rather too much disk space.

have you created a directory called (say) /usr/local/build/
then done cd /usr/local/build/
finally sh ../gcc4.3.2/configure ; make
?
if you are sick of waiting for gcc to compile things a native compile won't help much - use tcc which is about 20 times faster, but is still a little wobbly.


All times are GMT -5. The time now is 04:39 AM.