Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203090 - libpng is not cleaned properly after upgrading with newer portage
Summary: libpng is not cleaned properly after upgrading with newer portage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 200044
  Show dependency tree
 
Reported: 2007-12-22 21:52 UTC by Ravi Pinjala
Modified: 2007-12-30 17:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ravi Pinjala 2007-12-22 21:52:13 UTC
When trying to build wxGTK, I get this error:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/X11R6/lib64/libpng.a(libpng12_la-png.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/X11R6/lib64/libpng.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [lib/libwx_gtk2_core-2.6.so.0.4.0] Error 1
 * 
 * ERROR: x11-libs/wxGTK-2.6.4.0-r3 failed.
 * Call stack:
 *               ebuild.sh, line   46:  Called src_compile
 *             environment, line 2729:  Called build_wx 'src_compile'
 *             environment, line  445:  Called die
 * The specific snippet of code:
 *       emake || diefunc "$FUNCNAME" "$LINENO" "$?" "Failed to make $1.";
 *  The die message:
 *   Failed to make ansi.
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-libs/wxGTK-2.6.4.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/wxGTK-2.6.4.0-r3/temp/environment'.
 *

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-12-22 22:28:26 UTC
Post your emerge --info please.
Comment 2 Ravi Pinjala 2007-12-22 23:42:47 UTC
3vil ravi # emerge --info
Portage 2.1.4_rc11 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.23-rc7 x86_64)
=================================================================
System uname: 2.6.23-rc7 x86_64 AMD Athlon(tm) 64 Processor 3000+
Timestamp of tree: Sat, 22 Dec 2007 05:30:07 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.4.4-r4, 2.5.1-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
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.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64 -funit-at-a-time"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/init.d /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=athlon64 -funit-at-a-time"
DISTDIR="/usr/portage-distfiles/"
FEATURES="ccache collision-protect distlocks metadata-transfer nostrip parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS=" ftp://ftp.utexas.edu/pub/mirror/gentoo/ http://mirror.datapipe.net/gentoo/ http://gentoo.mirrors.pair.com/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/xeffects /usr/local/overlays/portage /usr/local/overlays/zfs-fuse"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib acl acpi alsa amd64 arts bash-completion berkdb bitmap-fonts bzip2 cairo cdr cjk cli cracklib crypt cups daap dbus dri dv dvd dvdr dvdread eds emboss emul-linux-x86 encode esd evo fam ffmpeg firefox flac fortran ftp gcj gdbm gecko-sdk gif glitz glut gpm gtk gtk2 hal iconv ipod ipv6 isdnlog java jpeg jpeg2k kdehiddenvisibility kerberos libcaca mad matroska midi mikmod mmx mmxext mono mozsvg mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nvidia ogg opengl openmp oss pam pcre pdf perl png pppd python qt qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode userlocales vorbis x264 xinerama xml xml2 xorg xrandr xscreensaver xv xvid 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 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2007-12-23 04:37:38 UTC
we're building against system libpng.  ccing base-system.

what version of libpng do you have installed?

PS -funit-at-a-time is default for >=O1, you don't need to specify it in your CFLAGS.
Comment 4 Ravi Pinjala 2007-12-23 06:38:42 UTC
Latest libpng, libpng-1.2.24. Also, thanks for the tip on -funit-at-a-time. :)

Comment 5 SpanKY gentoo-dev 2007-12-23 08:23:01 UTC
i dont see a bug here in libpng ... wxGTK attempted to link a static archive into a shared object ... that's clearly wrong

you only posted a very short snippet, so i have no idea the surrounding context

i imagine /usr/X11R6 is simply a symlink to "." which means /usr/X11R6/lib64/ is really /usr/lib64/

make sure you have libpng.so in /usr/lib64/
Comment 6 Ravi Pinjala 2007-12-24 00:01:25 UTC
Ah, that uncovered the real issue - /usr/lib64/libpng.so is a symlink to /usr/lib64/libpng12.so, which is a symlink to libpng12.so.0.24.0, which doesn't exist.

ravi@3vil ~ $ ls /usr/lib64/libpng*
/usr/lib64/libpng12.a          /usr/lib64/libpng.a
/usr/lib64/libpng12.la         /usr/lib64/libpng.la
/usr/lib64/libpng12.so         /usr/lib64/libpng.so
/usr/lib64/libpng12.so.0       /usr/lib64/libpng.so.3
/usr/lib64/libpng12.so.0.23.0  /usr/lib64/libpng.so.3.23.0
ravi@3vil ~ $ ls -l /usr/lib64/libpng.so
lrwxrwxrwx 1 root root 11 2007-12-22 15:53 /usr/lib64/libpng.so -> libpng12.so
ravi@3vil ~ $ ls -l /usr/lib64/libpng12.so
lrwxrwxrwx 1 root root 18 2007-12-22 15:53 /usr/lib64/libpng12.so -> libpng12.so.0.24.0
ravi@3vil ~ $

Guess it's definitely a libpng bug, then.
Comment 7 Ravi Pinjala 2007-12-24 00:08:46 UTC
Actually, no, this is surreal. Could be a portage bug or something.

I just noticed that libpng was actually at version 1.2.23, but I knew I had installed 1.2.24 yesterday. So, I tried merging it again, and here's what I got.

[build output snipped]

>>> Completed installing libpng-1.2.24 into /var/tmp/portage/media-libs/libpng-1.2.24/image/

ecompressdir: bzip2 -9 usr/share/man
removing executable bit: usr/lib64/libpng12.la
* checking 27 files for package collisions
>>> Merging media-libs/libpng-1.2.24 to /
--- /usr/
--- /usr/bin/
>>> /usr/bin/libpng12-config

[file list snipped]

>>> /usr/include/libpng12/png.h
>>> /usr/lib64/libpng.so -> libpng12.so
>>> /usr/lib64/libpng.so.3 -> libpng.so.3.24.0
>>> Regenerating /etc/ld.so.cache...
>>> media-libs/libpng-1.2.24 merged.

 media-libs/libpng
    selected: 1.2.24 
   protected: 1.2.23 
     omitted: none 

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

>>> Unmerging media-libs/libpng-1.2.24...
No package files given... Grabbing a set.
--- replaced obj /usr/share/man/man5/png.5.bz2
--- replaced dir /usr/share/man/man5

[rest of output snipped]

I'm kind of at a loss here. Anybody know why this would happen?
Comment 8 Ravi Pinjala 2007-12-24 02:03:00 UTC
Just ran into the same issue (portage immediately unmerging the package it just installed, instead of the old version) trying to install firefox 3 beta, so this is definitely a portage issue. 
Comment 9 Ravi Pinjala 2007-12-24 02:05:38 UTC
And a recent one, too - downgrading to portage-2.1.3.19 fixes the problem.

(Sorry about spamming this bug like this; just doing what I can to help get the issue fixed.)
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2007-12-24 02:34:52 UTC
(In reply to comment #8)
> Just ran into the same issue (portage immediately unmerging the package it just
> installed, instead of the old version) trying to install firefox 3 beta, so
> this is definitely a portage issue. 
> 

portage team, any ideas?
Comment 11 Zac Medico gentoo-dev 2007-12-24 08:35:57 UTC
I(In reply to comment #8)
> Just ran into the same issue (portage immediately unmerging the package it just
> installed, instead of the old version) trying to install firefox 3 beta, so
> this is definitely a portage issue. 

It seems like /var/cache/edb/counter has an incorrect value that it too low. I think the difference that you've observed between 2.1.3.19 and 2.1.4_rc11 is just a difference in the logic that generates new counters with makes the problem less noticeable.

If you reinstall portage-2.1.4_rc11 and remove /var/cache/edb/counter then it should automatically regenerate a suitable counter. To prevent this problem from happening, I think we should make /var/cache/edb/counter into a write-only file. We don't really need a global counter file anyway because we have a caching mechanism that allows us to quickly scan the counters of all installed packages.
Comment 12 Zac Medico gentoo-dev 2007-12-30 17:29:58 UTC
This has been released in 2.1.4_rc12.