LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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


Reply
  Search this Thread
Old 08-31-2019, 01:59 PM   #1
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 63

Rep: Reputation: 0
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 02:10 PM. Reason: added more info
 
Old 09-02-2019, 06:12 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
 
Old 09-02-2019, 07:24 AM   #3
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
Try Hiroshi Takekawa patch @ this link.
 
Old 09-03-2019, 12:56 AM   #4
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 63

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
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 View Post
Try Hiroshi Takekawa patch @ this link.

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 12:58 AM.
 
Old 09-03-2019, 07:09 AM   #5
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
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 07:11 AM.
 
Old 09-03-2019, 03:05 PM   #6
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 63

Original Poster
Rep: Reputation: 0
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 03:20 PM.
 
Old 09-05-2019, 09:23 AM   #7
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
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.
Old 09-05-2019, 11:58 PM   #8
GeekBoy
Member
 
Registered: Dec 2006
Distribution: Fedora v6
Posts: 63

Original Poster
Rep: Reputation: 0
That worked out. It seems there needs to be a new patch for version 2.29/

Thanks a bunch!
 
Old 03-27-2020, 11:25 PM   #9
Prabhu R
LQ Newbie
 
Registered: Mar 2020
Posts: 3

Rep: Reputation: Disabled
thank you

Quote:
Originally Posted by GeekBoy View Post
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
 
Old 04-07-2020, 01:21 AM   #10
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
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
 
  


Reply

Tags
lfs



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problems in glibc section section 5.7.1 lfs 6.7 abhiklall Linux From Scratch 1 04-19-2011 02:42 AM
[SOLVED] LFS 6.7: section 6.9 Glibc make test error prakashsince92 Linux From Scratch 7 12-17-2010 04:05 PM
lfs 6.5 make error with glibc-2.10.1 section 5.7.1 from LiveCD-6.3-r2160 [fixed] Expertsetup Linux From Scratch 2 01-21-2010 05:52 PM
/tools/bin/ld: cannot find -lstdc++ -- Error in " make check " of Glibc lfs_rocks Linux From Scratch 1 02-15-2008 09:23 AM
LFS 4.1 book install hung at section 6.14: Glibc-2.3.1 SparceMatrix Linux From Scratch 4 05-30-2003 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration