glibc64 install failure

Dan Nicholson dbn.lists at gmail.com
Mon Nov 21 09:36:25 PST 2005


On 11/19/05, Ken Moffat <ken at linuxfromscratch.org> wrote:
> On Sat, 19 Nov 2005, Dan Nicholson wrote:
>
> >
> > Jim, Ken, etc: Would you guys test this out and see how it affects the
> > build?  I don't know if it can go in verbatim for multilib, but it
> > seems relevant to any glibc install.

[...]

>   When I can get a *reliable* desktop build, I'll be back in business to
> test changes.  But, I'm  less than clear how we are supposed to prove
> that this is helping - linuxthreads is no longer an option with the
> glibc we're now using, so even if we wanted to we can't build the
> initial glibc like that, and nobody has so far reported this problem
> with the versions in the book.
>
>   I'm only an editor, I'm not a toolchain expert.

Me neither.  That's why I often go looking at Greg's work.  The guy's
put in a ton of research, and it seems silly not to use it.

Concerning glibc test-installation.pl.  I've done the test, and he's
right.  First, instead of using the linuxthreads add-on as mentioned
in his original thread, I downloaded the glibc-libidn add-on and
unpacked it in the glibc tree.  This is in the chroot (Ch. 6.11 in the
LFS book).  Adding libidn is legitimate.  It built fine and Alexander
uses it in the UTF-8 book.

In Ch.5, I built with --enable-addons=nptl.  In Ch.6, I built with
--enable-addons=nptl,libidn.  Now, in Ch.6 when the build runs
test-installation.pl, it errors because it's using the wrong C
libraries.  Particularly, it can't find -lcidn because ld is looking
in /tools/lib instead of /lib:/usr/lib.  This is the whole point of
Readjusting the Toolchain: repoint the toolchain away from /tools.

Here's the error:
CC="gcc" /usr/bin/perl scripts/test-installation.pl /tools/src/build/glibc-build
/
/tools/lib/gcc/i686-pc-linux-gnu/4.0.2/../../../../i686-pc-linux-gnu/bin/ld: can
not find -lcidn
collect2: ld returned 1 exit status
Execution of gcc failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:
- Did you change the gcc specs file (necessary after upgrading from
  Linux libc5)?
- Are there any symbolic links of the form libXXX.so to old libraries?
  Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
  libm.so should point to the newly installed glibc file - and there should be
  only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after you've
fixed all problems!
Btw. the script doesn't work if you're installing GNU libc not as your
primary library!
make[1]: *** [install] Error 1
make[1]: Leaving directory `/tools/src/build/glibc-2.3.6'
make: *** [install] Error 2

And here's info about the libc's in use:
[root-in-chroot:/tools/src/scripts/chroot] /tools/lib/libc.so.6
GNU C Library stable release version 2.3.6, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.0.2.
Compiled on a Linux 2.6.12 system on 2005-11-17.
Available extensions:
 GNU libio by Per Bothner
 crypt add-on version 2.1 by Michael Glad and others
 Native POSIX Threads Library by Ulrich Drepper et al
 BIND-8.2.3-T5B
 NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

[root-in-chroot:/tools/src/scripts/chroot] /lib/libc.so.6
GNU C Library stable release version 2.3.6, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.0.2.
Compiled on a Linux 2.6.12 system on 2005-11-21.
Available extensions:
 GNU libio by Per Bothner
 crypt add-on version 2.1 by Michael Glad and others
 Native POSIX Threads Library by Ulrich Drepper et al
 GNU Libidn by Simon Josefsson
 BIND-8.2.3-T5B
 NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

The key here is that Libidn is an Available extension in
/lib/libc.so.6 and not in /tools/lib/libc.so.6.

I just accidentally wiped the source and build directories, so I can't
test whether the sed works for sure right now.  Will have to try
tonight.  Still, I think that it works and it would be useful.  More
later.  Of course, this was not done with a multilib build, but
something similar could be crafted.

--
Dan



More information about the cross-lfs mailing list