linker: '-lpng' inhibits '-lz'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-defaults (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I got an error when building an executable from shared libraries, using GCC-4.7.3 provided by the linux distribution. I guess the problem is between libpng and zlib (the former uses the latter), but I don't know why. The following problem doesn't appear if I use a GCC version completely compiled by myself. Moreover, it doesn't occur on at least two other linux distros (Fedora 16 and ubuntu-10.04)
-------
Description: when I issue the command:
$ gfortran -o test_muesli_
I obtained the error:
/usr/local/
/usr/lib/
/usr/local/
/usr/local/
/usr/local/
/usr/local/
collect2: error: ld returned 1 exit status
If I remove the -lpng option (which is actually not used), the error disappear!
In addition, a different try with another program (which USE libpng) leads to a successful build.
ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: gcc 4:4.7.3-1ubuntu10
ProcVersionSign
Uname: Linux 3.8.0-31-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.3
Architecture: amd64
Date: Wed Oct 9 10:11:16 2013
InstallationDate: Installed on 2012-11-07 (335 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to raring on 2013-05-12 (149 days ago)
This is an error in how your local libfml.so is linked. make sure that it is linked against libz.