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

Pierre Labastie pierre.labastie at neuf.fr
Thu May 12 01:35:15 PDT 2016

On 12/05/2016 08:22, graham.crowe at telia.com wrote:
> Hi,
> I'm trying to build LFS 7.9 and the host system is Debian 8.4.0. I get 
> an error, that is raised when running make on gcc-5.3.0 chapter 6.17. 
> The file 
> /sources/gcc-5.3.0/build/x86_64-unknown-linux-gnu/libgcc/config.log 
> contains the following error:
> /usr/bin/ld: cannot find crtbegin.o: No such file or directory
> /usr/bin/ld: cannot find -lgcc
> However I can see crtbegin.o at 
> /tools/lib/gcc/x86_64-lfs-linux-gnu/5.3.0/crtbegin.o. I'm not sure how 
> to debug this problem, any ideas? I have enclosed the config.log file 
> that had exit status 1.
Looking at your log, it does not come from when you ran "configure", but 
when the build systems begins to build the libgcc support library from 
the subdirectory "libgcc". It is the role of this support library to 
provide crtbegin.o and -lgcc, so it is perfectly normal that configure 
does not find them. And actually, configure does not stop at this point...

It also has nothing to do with the C preprocessor itself, although the 
error happens while checking for it. The problem is this:
/usr/include/bits/local_lim.h:38:26: fatal error: linux/limits.h: No 
such file or directory
Normally, /usr/include/linux/limits.h is installed during 6.7 Linux API 
Do you have /usr/include/linux/limits.h (when chrooted), or 
$LFS/usr/include/linux/limits.h (if not chrooted)?

If not, you should restart the whole chapter 6 (remove everything which 
is in $LFS, except what is in tools and sources, and redo from "creating 
dirs". Do not forget to check that the virtual kernel filesystems are 
mounted, and that you re-enter the chroot environment.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20160512/85b57fd3/attachment.html>

More information about the lfs-support mailing list