For a win32 wine build, app-emulation/wine will create a 32bit binary even on amd64: [~]>uname -a Linux golf 3.9.4-gentoo #1 SMP PREEMPT Thu Jun 6 15:32:43 CEST 2013 x86_64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz GenuineIntel GNU/Linux [~]>file `which wine` /usr/bin/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped If media-libs/libpng:0 is installed from ~amd64, wine will compile against the headers from libpng-1.6.2: [I] media-libs/libpng Available versions: (1.2) 1.2.50 (0) 1.5.13-r1 1.5.15 (~)1.6.2(0/16) (1.5) (~)1.5.15-r15 (~)1.5.16 Installed versions: 1.2.50(1.2)(15:42:18 10/08/12) 1.5.16(1.5)(12:34:27 08/06/13)(apng -neon) 1.6.2(12:11:49 08/06/13)(apng -neon -static-libs) If no 32bit wine library of the 1.6 version is installed, this will result in this error being printed all over the place: libpng warning: Application built with libpng-1.6.2 but running with 1.5.13 (1.5.13 as included in app-emulation/emul-linux-x86-baselibs-20130224 is outdated and could be updated, too.) Reproducible: Always Steps to Reproduce: 1. Install media-libs/libpng-1.6.2 2. Install app-emulation/wine with abi_x86_32 and png useflags 3. Run 32bit windows applications in wine
*** Bug 473240 has been marked as a duplicate of this bug. ***
*** Bug 474104 has been marked as a duplicate of this bug. ***
For me as help/workaround worked to unpack libpng sources, patch apng in and call CPPFLAGS=-m32 ./configure --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib32 and play with manual installation of .so (.libs dir) and .pc files and modifying its symlinks (let it point to 16 and not 15) and rebuild of wine. checking for png.h... yes checking for -lpng... libpng16.so.16
Native multilib support was included to libpng: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libpng/libpng-1.6.2-r1.ebuild?view=markup
This shouldn't be needed anymore: latest libpng:1.6 has multilib support, also 1.2 slot that is the used by binary 32 bits apps (if you want :1.5 slot to be ported also, please open a bug report requesting that (could be done in a similar way as :1.2)
I still hit this bug.
ssuominen has pointed me to the correct solution, that I need to have matching 32bit and 64bit libpng's installed in ~arch you can get that by installing libpng-1.6.3-r1 with ABI_X86="32 64" on a multilib amd64 system old version of emul-linux-x86-baselibs has only libpng 1.5... so you can't use that together with libpng 1.6 for building wine in make.conf, add ABI_X86="32 64" and then... emerge -av1 ">=media-libs/libpng-1.6.3-r1"
*** Bug 499372 has been marked as a duplicate of this bug. ***
This really isn't obsolete. abi_x86_32 is use.stable.masked for libpng, and now libpng-1.6 is stable, so wine is broken on current stable because the stable emul package is not up-to-date. Until that changes we will continue to need up-to-date 32-bit libpng builds for stable.