Linux From Scratch This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-31-2019, 02:59 PM
|
#1
|
Member
Registered: Dec 2006
Distribution: Fedora v6
Posts: 65
Rep:
|
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
Here is the previous parts before make install
Code:
tar xf glibc-2.29.tar.xz
cd glibc-2.29
patch -Np1 -i ../glibc-2.29-fhs-1.patch
ln -sfv /tools/lib/gcc /usr/lib
case $(uname -m) in
i?86) GCC_INCDIR=/usr/lib/gcc/$(uname -m)-pc-linux-gnu/8.2.0/include
ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3
;;
x86_64) GCC_INCDIR=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64
ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
;;
esac
rm -f /usr/include/limits.h
mkdir -v build
cd build
CC="gcc -isystem $GCC_INCDIR -isystem /usr/include" \
../configure --prefix=/usr \
--disable-werror \
--enable-kernel=3.2 \
--enable-stack-protector=strong \
libc_cv_slibdir=/lib
unset GCC_INCDIR
make -j4
Last edited by GeekBoy; 08-31-2019 at 03:10 PM.
Reason: added more info
|
|
|
09-02-2019, 07:12 AM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Quote:
cannot find -lnss_nis
cannot find -lnss_nisplus
|
libnss.so, libnss_nisplus.so should be present from the previous install, 5.7. Glibc-2.29
|
|
|
09-02-2019, 08:24 AM
|
#3
|
Member
Registered: Apr 2015
Posts: 105
Rep:
|
Try Hiroshi Takekawa patch @ this link.
|
|
|
09-03-2019, 01:56 AM
|
#4
|
Member
Registered: Dec 2006
Distribution: Fedora v6
Posts: 65
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
libnss.so, libnss_nisplus.so should be present from the previous install, 5.7. Glibc-2.29
|
I reran the compile for section 5.7. Same result.
Quote:
Originally Posted by sr_ls_boy
|
The patch is for 2.26, 2.27, and 2.28.
We are dealing with 2.29.
Thanks for the both of you for taking the time to respond.
Anyway, I did run it, and no change
Last edited by GeekBoy; 09-03-2019 at 01:58 AM.
|
|
|
09-03-2019, 08:09 AM
|
#5
|
Member
Registered: Apr 2015
Posts: 105
Rep:
|
It worked for me with 2.29. You'll have to simply open the patch and hand edit the file yourself.
We're only talking about 1 line that needs changing.
Last edited by sr_ls_boy; 09-03-2019 at 08:11 AM.
|
|
|
09-03-2019, 04:05 PM
|
#6
|
Member
Registered: Dec 2006
Distribution: Fedora v6
Posts: 65
Original Poster
Rep:
|
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.
Last edited by GeekBoy; 09-03-2019 at 04:20 PM.
|
|
|
09-05-2019, 10:23 AM
|
#7
|
Member
Registered: Apr 2015
Posts: 105
Rep:
|
I remember now.
So, you added:
&& $name ne "nss_nis" && $name ne "nss_nisplus"
because the test suite cant find:
-lnss_nis
-lnss_nisplus
But now if can't find:
-lnsl
Try adding this:
&& $name ne "nsl"
|
|
1 members found this post helpful.
|
09-06-2019, 12:58 AM
|
#8
|
Member
Registered: Dec 2006
Distribution: Fedora v6
Posts: 65
Original Poster
Rep:
|
That worked out. It seems there needs to be a new patch for version 2.29/
Thanks a bunch!
|
|
|
03-28-2020, 12:25 AM
|
#9
|
LQ Newbie
Registered: Mar 2020
Posts: 3
Rep:
|
thank you
Quote:
Originally Posted by GeekBoy
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
|
|
|
04-07-2020, 02:21 AM
|
#10
|
Member
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570
|
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
|
|
|
All times are GMT -5. The time now is 12:24 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|