/usr/lib/i386-linux-gnu/libz.so: could not read symbols: Invalid operation

Bug #995860 reported by Marius B. Kotsbak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Trying to compile an application that in previous Ubuntu versions builded fine, I now get the following errors:

/usr/bin/ld: note: 'deflate' is defined in DSO /usr/lib/i386-linux-gnu/libz.so so try adding it to the linker command line
/usr/lib/i386-linux-gnu/libz.so: could not read symbols: Invalid operation

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: zlib1g-dev 1:1.2.3.4.dfsg-3ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-19.33-generic-pae 3.0.27
Uname: Linux 3.0.0-19-generic-pae i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Mon May 7 11:36:01 2012
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=nb_NO.UTF-8
 LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:en
SourcePackage: zlib
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :
tags: added: precise
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

This seems to be solved by moving the "-lz" back on the command line. Found the hint in this forum entry: http://forums.ngemu.com/showthread.php?p=2021227 ("It seems that the link order is important on some systems.").

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Here is the fix and some interesting comments:

http://developer.wz2100.net/changeset/cd6bb3d66e719a802c82bf4a69610d3706583aae

I see that package binutils contais both /usr/bin/ld.gold and /usr/bin/ld.bfd.

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

There is a package "binutils-gold" that changes the symlink in /usr/bin/ld to use the .gold version, but that might introduce other problems (seems not in my case).

Revision history for this message
Matthias Klose (doko) wrote :

this is expected behaviour, the compiler passes --as-needed to ld by default.

Changed in zlib (Ubuntu):
status: New → Invalid
Changed in binutils (Ubuntu):
status: New → Invalid
no longer affects: zlib (Ubuntu)
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers