libpng16-16 needs ZLIB_1.2.9 but package does not install it

Bug #1780233 reported by Yann Salmon
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libpng1.6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Since upgrading from 16.04 to 18.04, some programs that depend on libpng16.so.16 do not work with the error

ImportError: /opt/yann/pyzo-4.5.1/lib/python3.5/../libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)

Reinstalling the libpng16-16 package does not improve things.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libpng16-16 1.6.34-1
ProcVersionSignature: Ubuntu 4.15.0-24.26-generic 4.15.18
Uname: Linux 4.15.0-24-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Jul 5 13:19:44 2018
Dependencies:
 gcc-8-base 8-20180414-1ubuntu2
 libc6 2.27-3ubuntu1
 libgcc1 1:8-20180414-1ubuntu2
 zlib1g 1:1.2.11.dfsg-0ubuntu2
InstallationDate: Installed on 2016-09-07 (665 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: libpng1.6
UpgradeStatus: Upgraded to bionic on 2018-07-01 (3 days ago)

Revision history for this message
Yann Salmon (yannsalmon) wrote :
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hello,
ldd /usr/lib/x86_64-linux-gnu/libpng16.so.16.34.0
 linux-vdso.so.1 (0x00007fff3e164000)
 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f97a4da5000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f97a4a07000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f97a4616000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f97a51f4000)

I see zlib is correctly linked... can you please double check?

Changed in libpng1.6 (Ubuntu):
status: New → Incomplete
Changed in libpng1.6 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Andreas Nicolai (ghorwin) wrote :

Bug appears to be related to software build and linked against different version of libz:

Analysis:

Output of ld when trying to build an application that uses libpng16:

/usr/lib/x86_64-linux-gnu/libpng16.so.16: undefined reference to `inflateReset2@ZLIB_1.2.3.4'
/usr/lib/x86_64-linux-gnu/libpng16.so.16: undefined reference to `inflateValidate@ZLIB_1.2.9'

Output of ldd (same output as above):

> ldd /usr/lib/x86_64-linux-gnu/libpng16.so.16
 linux-vdso.so.1 (0x00007ffeda752000)
 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0dd35dd000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0dd323f000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0dd2e4e000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f0dd3a2c000)

checking for missing symbols:

> readelf --syms /usr/lib/x86_64-linux-gnu/libpng16.so.16 | grep inflateReset2
     9: 0000000000000000 0 FUNC GLOBAL DEFAULT UND inflateReset2@ZLIB_1.2.3.4 (4)

Ok, symbol appears to be there. Why does ld pop up the error?

--> linker command line references an older z-lib earlier on in the library dependencies -> hence, zlib from system is not used (though required by libpng16).

Solution: remove linker dependency to custom libz (remove "-lz") and try linking against system libz.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.