[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 17:14:33 PDT 2012

Ken Moffat wrote:
> On Sun, Aug 26, 2012 at 06:14:17PM -0500, Bruce Dubbs wrote:
>> Bruce Dubbs wrote:
>>> I tried setting CC in the environment for just the make and it didn't
>>> work.  I also tried exporting BUILD_CC and wasn't picked up either.  Now
>>> I just edited the Makefile to set BUILD_CC and it will take about 10
>>> minutes to run.
>> Well, that did work.  I also got the rpc/types.h: No such file or
>> directory error.  That's good because it says that the system is not
>> looking in the host's files.  I'll add the sed and configparms and try
>> again.
>   For me, it bombed with

> rpc_main.c:37:19: fatal error: errno.h: No such file or directory
> compilation terminated.

Try this as the lfs user:

tar -xf glibc-2.16.0.tar.xz
cd glibc-2.16.0

sed -i 's/ -lgcc_s//' Makeconfig
sed -i 's|<rpc/types.h>|"rpc/types.h"|' sunrpc/rpc_clntout.c

mkdir -v ../glibc-build
cd ../glibc-build

echo BUILD_CC=${LFS_TGT}-gcc > configparms


make | tee glibc-make.log

It worked for me.  If I grep the log for ^gcc, I get no matches like I 
did before.  There are no errors indicated.  Of course you have to have 
/tools and binutils/gcc built as in Chapter 5.

   -- Bruce

More information about the lfs-dev mailing list