When trying to upgrade libgphoto2, libghoto2-2.4.9 fails with a linker error: cannot find -lpng12 Reproducible: Always Steps to Reproduce: 1. emerge -uDN @world @system 2. 3. Actual Results: [...] libtool: link: echo "{ global:" > .libs/ax203.ver libtool: link: cat ../camlibs/camlib.sym | sed -e "s/\(.*\)/\1;/" >> .libs/ax203.ver libtool: link: echo "local: *; };" >> .libs/ax203.ver libtool: link: x86_64-pc-linux-gnu-gcc -shared ax203/.libs/library.o ax203/.libs/ax203.o ax203/.libs/ax203_decode_yuv.o ax203/.libs/ax203_decode_yuv_delta.o ax203/.libs/ax203_compress_jpeg.o ax203/.libs/jpeg_memsrcdest.o ax203/.libs/tinyjpeg.o ax203/.libs/jidctflt.o -Wl,-rpath -Wl,/var/tmp/portage/media-libs/libgphoto2-2.4.9/work/libgphoto2-2.4.9/libgphoto2/.libs -Wl,-rpath -Wl,/var/tmp/portage/media-libs/libgphoto2-2.4.9/work/libgphoto2-2.4.9/libgphoto2_port/libgphoto2_port/.libs -L/var/tmp/portage/media-libs/libgphoto2-2.4.9/work/libgphoto2-2.4.9/libgphoto2_port/libgphoto2_port/.libs ../libgphoto2/.libs/libgphoto2.so -L/usr/lib64 /var/tmp/portage/media-libs/libgphoto2-2.4.9/work/libgphoto2-2.4.9/libgphoto2_port/libgphoto2_port/.libs/libgphoto2_port.so -lpthread /usr/lib64/libltdl.so /usr/lib64/libexif.so /usr/lib64/libgd.so /usr/lib64/libXpm.so /usr/lib64/libX11.so /usr/lib64/libxcb.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so -ldl /usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so /usr/lib64/libexpat.so -lpng12 -lz -lm /usr/lib64/libjpeg.so -march=amdfam10 -march=amdfam10 -Wl,-O1 -Wl,-soname -Wl,ax203.so -Wl,-version-script -Wl,.libs/ax203.ver -o .libs/ax203.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpng12 collect2: ld returned 1 exit status [...] spectre ~ # emerge --info Portage 2.2_rc67 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.1-r0, 2.6.33-gentoo-r1 x86_64) ================================================================= System uname: Linux-2.6.33-gentoo-r1-x86_64-AMD_Phenom-tm-_9950_Quad-Core_Processor-with-gentoo-2.0.1 Timestamp of tree: Mon, 10 May 2010 08:15:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 4.1_p5 dev-java/java-config: 2.1.11 dev-lang/python: 2.6.5-r2, 3.1.2-r3 dev-python/pycrypto: 2.1.0 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.8.1-r1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.1-r1 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.65 sys-devel/automake: 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.3-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.33 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/bind /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.mneisen.org/ http://de-mirror.org/distro/gentoo/ ftp://de-mirror.org/distro/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://mirror.jamit.de/gentoo/ http://mirror.netcologne.de/gentoo/ ftp://mirror.netcologne.de/gentoo/ " LANG="de_DE.utf8" LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow X a52 aac aalib acl acpi aim alsa amd64 apache2 aspell audiofile bash-completion bcmath bluetooth bonjour branding bzip2 cairo calendar cdda cddb cdparanoia cdr cli clucene consolekit cracklib crypt cscope css ctype cups curl cxx daap dbus derby djvu dri dts dv dvb dvd dvdr dvdread encode enscript exif expat facebook fam ffmpeg fftw firefox flac fontconfig foomaticdb fortran ftp gd gdbm geoip gif gimp glib glut gmp gnuplot gnutls gpg gphoto2 gpm gps graphviz gsl gtk gzip hal hddtemp htmlhandbook iconv icq icu idn imagemagick imap imlib innodb ipod jabber java java6 javascript jbig jingle jpeg jpeg2k kde kontact kpathsea lame lash latex lcms ldap libcaca libnotify libsamplerate libwww lm_sensors lua lzo mad maildir mailwrapper matroska mhash mime mmap mmx mng modplug modules mp2 mp3 mp4 mpeg mpi mplayer msn mudflap multilib musepack musicbrainz mysql mysqli ncurses netcdf nls nntp nptl nptlonly nsplugin nvram offensive ofx ogg openal openexr opengl openmp oscar otr pam pcntl pcre pda pdf perl php plasma png policykit posix postgres ppds pppd python qt3 qt3support qt4 quicktime raw rdesktop readline recode reflection rss samba sasl sdl secure-delete semantic-desktop session sharedext sharedmem shorten skype slang slp smp sndfile snmp soap sockets sox speex spell spl sql sse sse2 ssl startup-notification subversion suid svg sysfs syslog sysvipc szip taglib tcpd theora threads tidy tiff timidity tokenizer truetype unicode usb v4l2 vcd vdr videos vim-syntax vnc vorbis wavpack webdav webkit winpopup wlm wmf x264 xattr xface xft xine xml xmp xorg xpm xscreensaver xsl xulrunner xv xvid xvmc yahoo yaz zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
the problem is in absence of symlink libpng12.so -> libpng12.so.0.43.0 I think its a bug in the libpng:1.2 ebuild
reemerge x11-libs/cairo and x11-libs/pango and try again please
(In reply to comment #2) > reemerge x11-libs/cairo and x11-libs/pango and try again please No effect: emerge -1 x11-libs/cairo x11-libs/pango [...] emerge -1 media-libs/libgphoto2 [...] libtool: link: ( cd ".libs" && rm -f "aox.la" && ln -s "../aox.la" "aox.la" ) /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -march=amdfam10 -O2 -pipe -Wall -Wmissing-declarations -Wmissing-prototypes -march=amdfam10 -O2 -pipe -Wall -Wmissing-declarations -Wmissing-prototypes -module -no-undefined -avoid-version -export-dynamic -export-symbols '../camlibs/camlib.sym' -rpath '/usr/lib64/libgphoto2/2.4.9' -Wl,-O1 -o casio_qv.la casio/casio-qv.lo casio/casio-qv-commands.lo casio/camtojpeg.lo casio/ycctoppm.lo ../libgphoto2/libgphoto2.la /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpng12 collect2: ld returned 1 exit status
It's not creating the library symlink. Adding this line to the end of src_install works: dosym libpng12.so.0 /usr/$(get_libdir)/libpng12.so || die
Disregard that last; the problem is references to libpng-1.2 in pkgconfig files. Run 'grep -l libpng12 /usr/lib/pkgconfig/*.pc' and re-emerge any packages that it shows up in.
I'm having this issue also. I tried reemerging cairo and pango. (In reply to comment #5) > Run 'grep -l libpng12 /usr/lib/pkgconfig/*.pc' and re-emerge any packages that > it shows up in. The only package I get with this is libsexy. I attempted to reemerge it, but it also fails with the same link error as libgphoto.
The -lpng12 on the link line must be coming from somewhere; if not a .pc file then a -config script or similar. I'd suggest examining config.log to see where the culprit might be (search for the first instance of -lpng12).
I reinstalled libpng and received the message "If revdep-rebuild fails to work them run /usr/sbin/libpng-1.4.x-udate.sh (At your own risk)". revdep-rebuild had failed to work and lafilefixer --justfixit didn't do the trick, so I took the risk, and the problem was solved.Libgphoto2 compiled with no problems. The same with gnumeric.
Typeing error in previous. Should read "/usr/bin/libpng-1.4.x-update.sh"
Please read libpng elog messages *** This bug has been marked as a duplicate of bug 319101 ***