Opened 14 years ago

Closed 14 years ago

#2606 closed task (fixed)

zlib-1.2.4

Reported by: Gilles Espinasse Owned by: Matthew Burgess
Priority: normal Milestone: 6.7
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

http://zlib.net/

look to better handle fPIC

--shared no more exist on ./configure and --static appear

Change History (6)

comment:1 by Matthew Burgess, 14 years ago

Owner: changed from lfs-book@… to Matthew Burgess
Status: newassigned

comment:2 by Gilles Espinasse, 14 years ago

--shared is no more listed in ./configure --help

Now by default, both static and shared libs are build.

Would it not better to explain in the book why libz.so is manually installed that way in /usr/lib?

I find 2 reasons to explain that

  • at least perl-5.10.1 tests are broken if libz.so* are installed to /lib
  • ticket 2562 state that zlib has to be in /lib to be able to dynamically link module-init-tools

comment:3 by Matthew Burgess, 14 years ago

Gilles,

I guess, then, that what we want to do is keep the instructions as they are now, except that we should leave /lib/libz.so where it is so that module-init-tools is usable. We'd keep the softlink at /usr/lib/libz.so where it is so that perl is happy. At the moment, it looks as if module-init-tools is broken?

Thanks,

Matt.

comment:4 by Gilles Espinasse, 14 years ago

perl look for zlib in /usr/lib just because we use a sed to force perl to do so. That's a self justification more than an explanation.

zlib compilation should be fine by doing :

  • suppress --shared in configure now unneeded,
  • suppress the PIC text explanation now obsolete

I try more changes (suppress the static zlib.a) but that break perl tests.

First broken test is ext/Compress-Raw-Bzip2/t/09limitoutput........................./perl: symbol lookup error: ../lib/auto/Compress/Raw/Zlib/Zlib.so: undefined symbol: zlibVersion FAILED--no leader found

Not suppressing /usr/lib/zlib.a fix that issue.

I had all module-init-tools tests ok.

comment:5 by Gilles Espinasse, 14 years ago

that's my fault for the breakage when /usr/lib/libz.a was removed with perl.

I just forgot to update the shared lib symlink keeping old ../../lib/libz.so.1.2.3 In that case, libz.a look to be used.

With correct symlink and libz.a removed, perl tests pass with libz.so installed in /lib (or /usr/lib if perl sed is not changed)

module-init-tools need libz.a to pass --enable-zlib test. I try with success this sed after ./configure and make check

sed -i 'senable-zlibenable-zlib-dynamic |' tests/runtests

that way, module-init-tools run instead the first test with --enable-zlib-dynamic

I think the hack to move libz.so to /usr/lib is not needed. That is much cleaner to straight install to /lib without any hack. The only requirement is to adjust perl sed to /lib to find zlib there

comment:6 by Matthew Burgess, 14 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r9229. However, I didn't change the installation to /lib. I'll raise a separate ticket to cover that shortly.

Note: See TracTickets for help on using tickets.