[lfs-dev] Possible problem with current glibc (LFS 7.2 cant recompile LFS 7.2)

Bruce Dubbs bruce.dubbs at gmail.com
Sun Aug 26 18:53:27 PDT 2012

Ken Moffat wrote:

>   I still get the error
> rpc_main.c:37:19: fatal error: errno.h: No such file or directory
>   (this is with the system rpc and rpcsvc headers moved out of hte
> way so that they aren't found - I know the sed should prevent them
> being used, but something is different between your build and mine)
>   Yes, it does remove any use of the host's gcc, at least up to the
> point where it fails.

Hmm.  I have:

x86_64-lfs-linux-gnu-gcc rpc_main.c -c -std=gnu99 -fgnu89-inline  -O2 
-Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g 
-Wstrict-prototypes        -D_RPC_THREAD_SAFE_ -I../include 
-I/sources/glibc-build/sunrpc -I/sources/glibc-build 
-I../nptl/sysdeps/unix/sysv/linux/x86 -I../sysdeps/unix/sysv/linux/x86 
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread 
-I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu 
-I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv 
-I../sysdeps/unix/sysv -I../sysdeps/unix/x86_64 -I../nptl/sysdeps/unix 
-I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/x86_64/64 
-I../sysdeps/x86_64/64 -I../sysdeps/x86_64/fpu/multiarch 
-I../sysdeps/x86_64/fpu -I../sysdeps/x86/fpu 
-I../sysdeps/x86_64/multiarch -I../nptl/sysdeps/x86_64 
-I../sysdeps/x86_64 -I../sysdeps/x86 -I../sysdeps/ieee754/ldbl-96 
-I../sysdeps/ieee754/dbl-64/wordsize-64 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/wordsize-64 
-I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. 
-nostdinc -isystem /tools/lib/gcc/x86_64-lfs-linux-gnu/4.7.1/include 
-isystem /tools/lib/gcc/x86_64-lfs-linux-gnu/4.7.1/include-fixed 
-isystem /tools/include -D_LIBC_REENTRANT -include 
../include/libc-symbols.h   -DNOT_IN_libc=1    -D_RPC_THREAD_SAFE_ -o 
/sources/glibc-build/sunrpc/rpc_main.o -MD -MP -MF 
/sources/glibc-build/sunrpc/rpc_main.o.dt -MT 

You can check if yours is different.  I'd think yours should be 
identical.  You can also just run that command by itself and change -c 
to -E, rpc_main.o to rpc_main.E (two places).  Then look at the -E and 
see what include files are being pulled in.

When I do it, I have "../include/errno.h"

Note that -nostdinc should avoid trying to go to unspecified libraries 
and on my system, -I../include/ does have errno.h.

   -- Bruce

More information about the lfs-dev mailing list