Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 161813 - media-libs/netpbm 10.37.0 fails to correctly link against zlib with "undefined reference to `zlibVersion'"
Summary: media-libs/netpbm 10.37.0 fails to correctly link against zlib with "undefine...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-12 18:36 UTC by Logan Bowers
Modified: 2007-01-13 19:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Log of build error (log,273.39 KB, text/plain)
2007-01-12 19:20 UTC, Logan Bowers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Logan Bowers 2007-01-12 18:36:12 UTC
When emerging netpbm-10.37 or netpbm-10.36, both fail to correctly compile due to a missing "-lz" for linking against zlib.  

The following are from my emerge:  
logan01 netpbm # emerge -uD world -pv

These are the packages that would be merged, in order:

Calculating world dependencies \... done!
[ebuild     U ] media-libs/netpbm-10.37.0 [10.34] USE="jpeg png xml zlib -jbig% -jpeg2k% -rle% -svga -tiff" 0 kB 
(... more packages ...)

From the build process (tail-end): 
i686-pc-linux-gnu-gcc -Wall -o zeisstopnm zeisstopnm.o -lm  -L/var/tmp/portage/netpbm-10.37.0/work/netpbm-10.37.0/lib -lnetpbm \
              
i686-pc-linux-gnu-gcc -Wall  -o pnmtorast pnmtorast.o rast.o \
           -L/var/tmp/portage/netpbm-10.37.0/work/netpbm-10.37.0/lib -lnetpbm \
          -lm    
i686-pc-linux-gnu-gcc -Wall  -o rasttopnm rasttopnm.o rast.o \
           -L/var/tmp/portage/netpbm-10.37.0/work/netpbm-10.37.0/lib -lnetpbm \
          -lm    
i686-pc-linux-gnu-gcc -Wall  -o pnmtopng pnmtopng.o pngtxt.o \
           -L/var/tmp/portage/netpbm-10.37.0/work/netpbm-10.37.0/lib -lnetpbm \
          -L/usr/lib -lpng12 -lm    
i686-pc-linux-gnu-gcc -Wall  -o pngtopnm pngtopnm.o \
           -L/var/tmp/portage/netpbm-10.37.0/work/netpbm-10.37.0/lib -lnetpbm \
          -L/usr/lib -lpng12 -lm    
pnmtopng.o: In function `main':
pnmtopng.c:(.text+0x43c9): undefined reference to `zlibVersion'
collect2: ld returned 1 exit status
make[2]: *** [pnmtopng] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/netpbm-10.37.0/work/netpbm-10.37.0/converter/other'
make[1]: *** [other/all] Error 2
make[1]: Leaving directory `/var/tmp/portage/netpbm-10.37.0/work/netpbm-10.37.0/converter'
make: *** [converter/all] Error 2

!!! ERROR: media-libs/netpbm-10.37.0 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  netpbm-10.37.0.ebuild, line 97:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.

NOTE: there is no "-lz" on the command line of the last call to the compiler.  

Reproducible: Always

Steps to Reproduce:
1. Emerge media-libs/netpbm-10.37.0 with the use flags shown in the description
2. The emerge fails
3.

Actual Results:  
Emerge fails with the error in the description

Expected Results:  
Emerge succeeds.
Comment 1 SpanKY gentoo-dev 2007-01-12 19:08:19 UTC
which doesnt make any sense as libpng12.so should be linked against zlib
Comment 2 SpanKY gentoo-dev 2007-01-12 19:10:19 UTC
nor does that file even call zlibVersion()

run `emerge netpbm >& log` and post the log as an attachment
Comment 3 Logan Bowers 2007-01-12 19:20:16 UTC
Created attachment 106721 [details]
Log of build error
Comment 4 Logan Bowers 2007-01-12 19:23:08 UTC
(In reply to comment #2)
> nor does that file even call zlibVersion()
> 
> run `emerge netpbm >& log` and post the log as an attachment
> 

Also note bug 154052, that user had a similar problem.  I believe the link dependency is being inherited from the inclusion of libpng, based on a comment in Makefile.confg, but I'm not sure.  

Attached.  Also, here is my 'emerge --info':
logan01 netpbm # emerge --info
Portage 2.1.1-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r4, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 Intel(R) Xeon(TM) CPU 3.20GHz
Gentoo Base System version 1.12.6
Last Sync: Wed, 10 Jan 2007 18:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/xeffects"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa alsa_cards_usb-audio alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2 apm avahi berkdb bitmap-fonts cli cracklib crypt dbus dlloader dri eds elibc_glibc emboss encode esd foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 hal iconv imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog jack jpeg kerberos kernel_linux ldap libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre perl png pppd pulseaudio python qt3 qt4 quicktime readline reflection sdl session spell spl sse ssl tcpd truetype truetype-fonts type1-fonts udev userland_GNU video_cards_fglrx video_cards_radeon vorbis win32codecs winbind xml xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 5 SpanKY gentoo-dev 2007-01-12 21:20:10 UTC
post the output of running:
gcc -print-file-name=libpng12.so
readelf -d /usr/lib/libpng12.so
Comment 6 Logan Bowers 2007-01-13 18:22:41 UTC
(In reply to comment #5)
> post the output of running:
> gcc -print-file-name=libpng12.so

logan01 logan # gcc -print-file-name=libpng12.so
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libpng12.so

> readelf -d /usr/lib/libpng12.so
> 

logan01 logan # readelf -d /usr/lib/libpng12.so

Dynamic section at offset 0x2f588 contains 24 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000e (SONAME)                     Library soname: [libpng12.so.0]
 0x0000000c (INIT)                       0x2e9c
 0x0000000d (FINI)                       0x28de8
 0x00000004 (HASH)                       0xd4
 0x00000005 (STRTAB)                     0x16b0
 0x00000006 (SYMTAB)                     0x7b0
 0x0000000a (STRSZ)                      4129 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000003 (PLTGOT)                     0x30714
 0x00000002 (PLTRELSZ)                   816 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x2b6c
 0x00000011 (REL)                        0x293c
 0x00000012 (RELSZ)                      560 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffc (VERDEF)                     0x28b4
 0x6ffffffd (VERDEFNUM)                  2
 0x6ffffffe (VERNEED)                    0x28ec
 0x6fffffff (VERNEEDNUM)                 2
 0x6ffffff0 (VERSYM)                     0x26d2
 0x6ffffffa (RELCOUNT)                   59
 0x00000000 (NULL)                       0x0
Comment 7 SpanKY gentoo-dev 2007-01-13 19:21:51 UTC
looks to me like your libpng is broken

try re-emerging it