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

Bruce Dubbs bruce.dubbs at gmail.com
Sat Aug 25 22:46:26 PDT 2012

Jasmine Iwanek wrote:
> On 2012-08-26 01:59, Greg Schafer wrote:
>> On Sat, 25 Aug 2012 21:59:04 +0100, Jasmine Iwanek wrote:
>>> Actually, when I copied in rpc/types.h, I put it in /usr/include/rpc
>>> and
>>> that made the ch5-glibc build happy
>> Um, doesn't anyone see the obvious problem here?
>> The cross toolchain is apparently finding stuff on the host. The
>> whole
>> point of the cross toolchain is to avoid the host.
>> I'll put money on the fact that the introduction of --sysroot into
>> the
>> build has caused this regression.

> For once we agree on something, but rather than do your usual routine
> of "Oh look, it broke, I was right" Why not offer up a solution?

I agree.  If the comment is only made for self-aggrandizement, then keep 
it to yourself.  If you want to help, then we're glad to get any insight 
anyone may have.

I rebuilt glibc in a 7.2 environment and then took the problem file, 
rpc_clntout.c, and changed the gcc option -c to -E and the output file 
name to rpc_clntout.E.  Searching the .E file on the includes, I do not 
have any files that should not be pulled in.  They all start with ".." 
or "/tools/bin/../lib/gcc/" as they should.

I cannot reproduce the problem.  I do have a reference to:

# 34 "rpc_clntout.c" 2
# 1 "../include/rpc/types.h" 1
# 1 "../sunrpc/rpc/types.h" 1
# 37 "../sunrpc/rpc/types.h"

Everything looks OK to me. Jasmine, what is the command line (from the 
log) that produces the error?  I don't know what you are doing that 
wants to output to cross-rpc_clntout.o.

   -- Bruce

My command line is below (newlines added for readability).  You have to 
run configure and make to create config.h and rpc_clntout.o.dt in the 
glibc-build tree, but then go to /mnt/lfs/sources/glibc-2.16.0/sunrpc 
and change the -c to -E and the output to just rpc_clntout.E.

Note the option: -nostdinc

x86_64-lfs-linux-gnu-gcc rpc_clntout.c -c
-std=gnu99 -fgnu89-inline  -O2 -Wall
-Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g
-Wstrict-prototypes        -D_RPC_THREAD_SAFE_
-isystem /tools/include
-include ../include/libc-symbols.h
-o /mnt/lfs/sources/glibc-build/sunrpc/rpc_clntout.o
-MF /mnt/lfs/sources/glibc-build/sunrpc/rpc_clntout.o.dt
-MT /mnt/lfs/sources/glibc-build/sunrpc/rpc_clntout.o

More information about the lfs-dev mailing list