[lfs-support] LFS 7.6 Ch. 6.17 GCC: make error

Pierre Labastie pierre.labastie at neuf.fr
Sun Mar 1 12:36:53 PST 2015


Le 01/03/2015 20:36, Ken Moffat a écrit :
> On Sun, Mar 01, 2015 at 06:49:42PM +0100, ZyaX wrote:
>> Hi.
>>
>> I get an error when I run make which seems to be related to the C
>> preprocessor /lib/cpp, which does not exist.
>> It suggests to inspect config.log, but it's very long and I'm not sure
>> how to post it here.
>>
>> I run Manjaro 64-bit(based on archlinux).
>>
>> Thanks in advance.
>>
>> checking how to run the C preprocessor... /lib/cpp
>> configure: error: in `/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc':
>> configure: error: C preprocessor "/lib/cpp" fails sanity check
>> See `config.log' for more details.
>> Makefile:11546: recipe for target 'configure-target-libgcc' failed
>> make[1]: *** [configure-target-libgcc] Error 1
>> make[1]: Leaving directory '/sources/gcc-build'
>> Makefile:863: recipe for target 'all' failed
>> make: *** [all] Error 2
> 
> The best way to find the relevant part of config.log is to use
> another term (as root on the host - that way, you have a full
> toolkit) and cd to /mnt/lfs/sources/gcc-build.
> 
> Gcc is among the packages which run configure in many subdirectories,
> each with its own config.log.  This one looks as if it is in the
> top-level directory, but you could run 'find . -name config.log |
> xargs ls -l' to check.

Ken, if I dare... From the log above, I would say it is in the
sources/gcc-build/x86_64-unknown-linux-gnu/libgcc directory.
Actually, if you do not run parallel jobs in make (no -j flag),
you can look for the line starting with "Configuring in" closest to the point
where it fails.

> 
> If there is more than one, grep them for 'fails sanity check'.  When
> you know which config.log is the important one, open it in 'less'
> and seach for 'fails sanity check', [ that will be
>  /fails\ sanity\ check
> if you are not aware ].
> 
> Then look at the lines above that.  You should see configure
> creating a program fragment, trying to run it, getting one or more
> errors, and then producing the 'fails sanity check' message.  It is
> the error(s) which will point to what is wrong.
> 

There is something wrong with this "/lib/cpp" result. I've always seen:
checking how to run the C preprocessor... gcc -E (or a three line command
involving xgcc)

And normally, the /lib/cpp link should not exist at this stage, while it _has_
been found by configure. Are you sure you are in the chroot environment? (run
'ls /tools': if you are chrooted, it should give an error). If you are sure
you are in the chroot environment, just try removing the /lib/cpp link (rm
/lib/cpp) and type `make' again.

Pierre



More information about the lfs-support mailing list