On 08/05/2009 11:01 PM, Michael Tsang wrote:
>>
>> configure:3233: error: C preprocessor "/lib/cpp" fails sanity check
>> See `config.log' for more details.
>
> The error is obvious now. You need a /lib/cpp
>

Uh, no. The /lib/cpp symlink is only created *after* GCC is installed, 
and keep in mind many, many people build LFS and do not have problems 
with its nonexistence up to this point. You must keep in mind that many 
times, the last error you see (in this case a complaint about /lib/cpp) 
is often times just an end result of some previous, frequently unrelated 
problem. This case is no exception. Earlier in config.log we see:

 > O2 -g -g -O2     conftest.c>&5
 > 
/tools/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld:
 > crtbegin.o: No such file: No such file or directory
 > collect2: ld returned 1 exit status

...other config.log output...

 > configure:3016: checking how to run the C preprocessor
 > configure:3051: /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 -E
 > conftest.c
 > In file included from /usr/include/bits/posix1_lim.h:153,
 >                   from /usr/include/limits.h:145,
 >                   from 
/sources/gcc-build/./gcc/include-fixed/limits.h:122,
 >                   from 
/sources/gcc-build/./gcc/include-fixed/syslimits.h:7,
 >                   from 
/sources/gcc-build/./gcc/include-fixed/limits.h:11,
 >                   from conftest.c:10:
 > /usr/include/bits/local_lim.h:39:26: error: linux/limits.h: No such 
file or
 > directory

The real problem is that it's not finding the libc startfiles or basic 
headers, which usually points to a problem either with the linker or 
GCC's specs file. What happens if you do:

echo 'main(){}' > dummy.c
gcc dummy.c
readelf -l a.out | grep interpret
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to