Starting a new thread.
Bryan Kadzban wrote:> Bruce Dubbs wrote:
>> 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
>
> Uh, isn't that backwards? :-)
>
> BUILD_CC is the CC to use to build programs that will be executed on
> the cross-compilation *source* architecture, not the destination.
> ${LFS_TGT} is the destination arch. The glibc sources are trying to
> build this program for the source.
>
> This actually also means that host includes (and libs) are
> *absolutely* required to be here. This output doesn't get linked
> into the cross glibc, so this is *not* actually a contamination from
> the host system. (Only the output of rpcgen, after it gets built and
> run, is used.)
>
> This does mean, however, that the host does really need the
> rpc/types.h header file installed, so on systems that don't have it,
> glibc won't build...
It's the sunrpc Makefile that's looking for BUILD_CC. Before I added the
configparms, the *only* compiles against a plain gcc were in the sunrpc
directory.
Looking at my output, I do see where cross-rpcgen is being run on the
local system. The code is building rpcgen and cross-rpcgen. I guess
that rpcgen should be built with cross-gcc and plain rpcgen with
${LFS_TGT}-gcc. That's done without any configparms file.
I'm starting to think that the problem is that we've built Chapter 6
glibc in 7.2 without the --enable-obsolete-rpc which would probably
solve the problem there. For a 7.1 host, we'd need a note to install
the rpcnis-headers.tar.bz2 tarball as a part of Chapter 5 glibc.
As in BLFS libtirpc:
if [ ! r /usr/include/rpc/rpc.h ]; then
tar -xvf ../rpcnis-headers.tar.bz2 -C /usr/include
fi
That's not something I want to do. Perhaps the workaround of the sed
for Chapter 5 is the way to go.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page