Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 395219 - media-libs/gd links against the system png rather than the prefix one on OS X
Summary: media-libs/gd links against the system png rather than the prefix one on OS X
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-18 23:47 UTC by François Bissey
Modified: 2012-02-20 16:48 UTC (History)
0 users

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 François Bissey 2011-12-18 23:47:43 UTC
I had some problem with an app behaving badly and reporting:
libpng warning: Application was compiled with png.h from libpng-1.5.6
libpng warning: Application  is  running with png.c from libpng-1.2.44
gd-png:  fatal libpng error: Incompatible libpng version in application and library

I turns out the gd was linked to the system png (1.2) rather than the png from the prefix:
otool -L /Users/frb15/Desktop/Gentoo/usr/lib/libgd.2.dylib
/Users/frb15/Desktop/Gentoo/usr/lib/libgd.2.dylib:
        /Users/frb15/Desktop/Gentoo/usr/lib/libgd.2.dylib (compatibility version 3.0.0, current version 3.0.0)
        /Users/frb15/Desktop/Gentoo/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
        /Users/frb15/Desktop/Gentoo/usr/lib/libjpeg.8.dylib (compatibility version 12.0.0, current version 12.0.0)
        /usr/X11/lib/libpng12.0.dylib (compatibility version 45.0.0, current version 45.0.0)
        /Users/frb15/Desktop/Gentoo/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.7)

I am investigating.
Comment 1 François Bissey 2011-12-19 00:29:39 UTC
I see the ebuild is hardwired to png14 which of course broke when switching to 1.5. I suggest the following be inserted in the ebuild:
	sed -i \
		-e "s:png12:$(libpng-config --libs | cut -dl -f2):" \
		configure.ac || die

instead of the current:
	sed -i \
		-e 's:png12:png14:' \
		configure.ac || die

It works properly here.
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2011-12-20 18:44:06 UTC
I believe this bug was fixed in gentoo-x86 by the following commit by vapier:

  15 Dec 2011; Mike Frysinger <vapier@gentoo.org> gd-2.0.35-r3.ebuild,
  +files/gd-2.0.35-libpng-pkg-config.patch:
  Use libpng's pkg-config files rather than xxx-config scripts.

So if prefix-overlay is shipping gd, it should propably sync from gentoo-x86 in order to resolve this bug.

Or possibly the original reporter just needs to sync his tree.
Comment 3 Fabian Groffen gentoo-dev 2011-12-20 19:25:41 UTC
synced now, that hopefully fixes this indeed
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-02-20 16:48:09 UTC
(In reply to comment #3)
> synced now, that hopefully fixes this indeed

no reply from the reporter during these months, so assuming fixed