On Mon, Apr 06, 2020 at 01:51:08AM +0200, José Carlos Carrión Plaza wrote:
> Dear co-listers:
> 
> I’m building LFS 9.1 on a LFS 8.3 host
>  
> I regard an error when compiling expect5.45.4 on LFS-9.1 Chapter 5.
> 
> make command ends with
> 
> ———————— 8< ———————————
> /tools/bin/ld: warning: libz.so.1, needed by /tools/lib/libtcl8.6.so, not 
> found (try using -rpath or -rpath-link)
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `inflate'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to 
> `deflateSetHeader@ZLIB_1.2.2'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `crc32'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `zError'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `deflate'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `deflateInit2_'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to 
> `inflateGetHeader@ZLIB_1.2.2'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `inflateEnd'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to 
> `inflateSetDictionary'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `adler32'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `deflateEnd'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to 
> `deflateBound@ZLIB_1.2.0'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `inflateInit2_'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to `zlibVersion'
> /tools/bin/ld: /tools/lib/libtcl8.6.so: undefined reference to 
> `deflateSetDictionary'
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:391: expect] Error 1
> ————————— 8< —————————————
> 
> When I run ldd on libtcl8.6.so:
> 
> —————————— 8< ————————————
> 
> lfs:/tools/lib$ ldd libtcl8.6.so 
>       linux-vdso.so.1 (0x00007ffdbf3ba000)
>       libdl.so.2 => /tools/lib/libdl.so.2 (0x00007fd7edb68000)
>       libz.so.1 => not found
>       libpthread.so.0 => /tools/lib/libpthread.so.0 (0x00007fd7edb47000)
>       libm.so.6 => /tools/lib/libm.so.6 (0x00007fd7eda03000)
>       libc.so.6 => /tools/lib/libc.so.6 (0x00007fd7ed846000)
>       /tools/lib64/ld-linux-x86-64.so.2 (0x00007fd7edd25000)lfs $ ldd 
> /tools/lib/libtcl8.6.so
> 
> ——————— 8< —————————
> 
> I don’t find something like “—with-zlib” of “—without-zib” on configure 
> options of tcl8.6.10
> 
> ¿Any ideas?
> 
> Truly yours.
> 
> J.C.
> 

In the version of svn I build about a day ago, the configure for tcl
shows:

checking for tclsh... /usr/bin/tclsh8.6
checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no

and so mine correctly did not link to libz.

Looking to see where things could go wrong. I don't see much:

glibc should have --with-headers=/tools/include

binutils pass 2 should have --with-sysroot

The explanation for --with-sysroot in binutils pass 2 finishes by
saying: If this switch is not given, /etc/ld.so.conf on the host is
used, that is, programs may be linked to libraries on the host,
which we want to avoid.

So I think you probably missed that switch.

Alternatively, in gcc pass 2 there is

 --with-native-system-header-dir=/tools/include

At this point, either you have been scripting and you can review
your scripts, or else you have typed it all in and those should all
(I hope) be recent enough to show up in your lfs user's bash
history.

ĸen
-- 
The beauty of reading a page of de Selby is that it leads one
inescapably to the conclusion that one is not, of all nincompoops,
the greatest.            -- du Garbandier
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to