[SOLVED] book 8.4 | Section 6.9. - Glibc-2.29 -- make error "cannot find -lnss_nisplus"?
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
book 8.4 | Section 6.9. - Glibc-2.29 -- make error "cannot find -lnss_nisplus"?
So here is the error.
Any ideas on this one?
Code:
if test -r /usr/include/gnu/stubs-64.h && cmp -s /sources/glibc-2.29/build/stubs.h /usr/include/gnu/stubs-64.h; \
then echo 'stubs.h unchanged'; \
else /usr/bin/install -c -m 644 /sources/glibc-2.29/build/stubs.h /usr/include/gnu/stubs-64.h; fi
stubs.h unchanged
rm -f /sources/glibc-2.29/build/stubs.h
/sources/glibc-2.29/build/elf/sln /sources/glibc-2.29/build/elf/symlink.list
rm -f /sources/glibc-2.29/build/elf/symlink.list
test ! -x /sources/glibc-2.29/build/elf/ldconfig || LC_ALL=C \
/sources/glibc-2.29/build/elf/ldconfig \
/lib /usr/lib
/sources/glibc-2.29/build/elf/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
LD_SO=ld-linux-x86-64.so.2 CC="gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include" /usr/bin/perl scripts/test-installation.pl /sources/glibc-2.29/build/
/tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnss_nis
/tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnss_nisplus
collect2: error: ld returned 1 exit status
Execution of gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include 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]: *** [Makefile:111: install] Error 1
make[1]: Leaving directory '/sources/glibc-2.29'
make: *** [Makefile:12: install] Error 2
I used the 2.28 patch. I redid it, and went in and manually changed the line
from
Code:
&& $name ne "nss_test1" && $name ne "libgcc_s") {
to
Code:
&& $name ne "nss_test1" && $name ne "nss_test2" && $name ne "nss_nis" && $name ne "nss_nisplus" && $name ne "libgcc_s") {
Here is the result:
Code:
test ! -x /sources/glibc-2.29/build/elf/ldconfig || LC_ALL=C \
/sources/glibc-2.29/build/elf/ldconfig \
/lib /usr/lib
/sources/glibc-2.29/build/elf/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
LD_SO=ld-linux-x86-64.so.2 CC="gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include" /usr/bin/perl scripts/test-installation.pl /sources/glibc-2.29/build/
/tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnsl
collect2: error: ld returned 1 exit status
Execution of gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include 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]: *** [Makefile:111: install] Error 1
make[1]: Leaving directory '/sources/glibc-2.29'
make: *** [Makefile:12: install] Error 2
I still made the first patch in the book as instructed, if that makes any difference.
I used the 2.28 patch. I redid it, and went in and manually changed the line
from
Code:
&& $name ne "nss_test1" && $name ne "libgcc_s") {
to
Code:
&& $name ne "nss_test1" && $name ne "nss_test2" && $name ne "nss_nis" && $name ne "nss_nisplus" && $name ne "libgcc_s") {
Here is the result:
Code:
test ! -x /sources/glibc-2.29/build/elf/ldconfig || LC_ALL=C \
/sources/glibc-2.29/build/elf/ldconfig \
/lib /usr/lib
/sources/glibc-2.29/build/elf/ldconfig: Warning: ignoring configuration file that cannot be opened: /etc/ld.so.conf: No such file or directory
LD_SO=ld-linux-x86-64.so.2 CC="gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include" /usr/bin/perl scripts/test-installation.pl /sources/glibc-2.29/build/
/tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lnsl
collect2: error: ld returned 1 exit status
Execution of gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include 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]: *** [Makefile:111: install] Error 1
make[1]: Leaving directory '/sources/glibc-2.29'
make: *** [Makefile:12: install] Error 2
I still made the first patch in the book as instructed, if that makes any difference.
When building my lfs I encountered the same problem & I did the same thing , Then the problem was solved.
My sincere thanks to all @GeekBoy, @sr_ls_boy. I would like to talk to you, Can you give your contact info. my contact mail id : r.prabhuome2@gmail.com
I had that happen too, when I built this system. I used glibc 2.30 at the time. It's an artifact of building in the chroot, it doesn't happen when building glibc on the running system.
I also had to add the modules I enabled with --enable-obsolete- to that line in test-installation.pl
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.