LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-08-2015, 08:57 AM   #1
michanux
LQ Newbie
 
Registered: Jan 2015
Posts: 28

Rep: Reputation: Disabled
ld does not recognize libz.so.1


Hello

In LFS book I am on page
http://www.linuxfromscratch.org/lfs/...adjusting.html

"readelf -l a.out | grep ': /lib'"
breaks with:
"readelf: Error: 'a.out': No such file"

To find the reason I looked into "dummy.log"
Code:
GNU assembler version 2.24 (i686-pc-linux-gnu) using BFD version (GNU Binutils) 2.24
COMPILER_PATH=/tools/libexec/gcc/i686-pc-linux-gnu/4.9.1/:/tools/libexec/gcc/i686-pc-linux-gnu/4.9.1/:/tools/libexec/gcc/i686-pc-linux-gnu/:/tools/lib/gcc/i686-pc-linux-gnu/4.9.1/:/tools/lib/gcc/i686-pc-linux-gnu/
LIBRARY_PATH=/tools/lib/gcc/i686-pc-linux-gnu/4.9.1/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-v' '-mtune=generic' '-march=pentiumpro'
 /tools/libexec/gcc/i686-pc-linux-gnu/4.9.1/collect2 -plugin /tools/libexec/gcc/i686-pc-linux-gnu/4.9.1/liblto_plugin.so -plugin-opt=/tools/libexec/gcc/i686-pc-linux-gnu/4.9.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccOFpIJd.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /tools/lib/gcc/i686-pc-linux-gnu/4.9.1/crtbegin.o -L/tools/lib/gcc/i686-pc-linux-gnu/4.9.1 /tmp/cc5q0vPm.o "" -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /tools/lib/gcc/i686-pc-linux-gnu/4.9.1/crtend.o /usr/lib/crtn.o
/tools/bin/ld: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
collect2: error: ld returned 127 exit status
But "libz.so.1" is present at:
"/tools/i686-pc-linux-gnu/lib/libz.so.1"

In addition I do:
"ldd /tools/bin/ld"
Code:
linux-gate.so.1 (0xb772a000)
	libz.so.1 => not found
	libdl.so.2 => /lib/libdl.so.2 (0xb7702000)
	libc.so.6 => /lib/libc.so.6 (0xb754d000)
	/lib/ld-linux.so.2 (0xb7709000)
Why "ld" do not find "libz.so.1"

Last edited by michanux; 03-08-2015 at 08:58 AM.
 
Old 03-08-2015, 10:51 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
"/tools/i686-pc-linux-gnu/lib/libz.so.1"
But libz.so.1 should be in "/tools/lib/libz.so.1"

Investigate. For temporary measure make a symlink.

Code:
ln -s /tools/i686-pc-linux-gnu/lib/libz.so.1 /tools/lib/libz.so.1
 
  


Reply



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] libz.so.1 is missing michanux Linux From Scratch 6 03-06-2015 09:37 AM
libz can't be found vbraun Linux - Software 9 06-20-2005 10:06 AM
libz for guarddog linuxfond Linux - Newbie 0 03-06-2003 03:50 PM
Which libz...? t1mc00per Linux - General 3 02-13-2003 06:51 AM
Libz RhettDewey Linux - Software 1 03-12-2002 05:53 AM

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

All times are GMT -5. The time now is 08:10 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