GNOME Bugzilla – Bug 755526
gdk-pixbuf 2.32.0 Mac OS X: relocation should be off by default
Last modified: 2015-09-25 10:59:02 UTC
The newly released gdk-pixbuf 2.32.0 forces relocation during the compilation process, which is only really useful when you plan on putting gdk-pixbuf into an app bundle. If however, the user installs gdk-pixbuf through one of Mac OS X's package managers like Homebrew, MacPorts or Fink (which is what the vast majority of users of gdk-pixbuf on this platform will do), it is guaranteed to break a lot of packages from running properly as the loaders.cache file will never be found. This is especially true for Homebrew (of which I am a contributor), which uses a unique installation prefix for every installed package like /usr/local/Cellar/sofware-name/software-version which is then soft-linked into /usr/local. Since the location of loaders.cache is determined relative to the executable path, loaders.cache will never get found. Even MacPorts, though it uses a single installation prefix for all its packages, patched gdk-pixbuf to remove relocation. This is because it breaks software written in python that uses gtk+3, in which case the effective executable is hidden somewhere deep within the Python Framework, which will certainly lead to loaders.cache not being found. This is the first error message I get running meld for example (with Homebrew): (meld:33141): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/../lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory This likely means that your installation is broken. Try running the command gdk-pixbuf-query-loaders > /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/../lib/gdk-pixbuf-2.0/2.10.0/loaders.cache to make things work again for the time being. I also think that your relocation path on Mac OS X is not useful even when the goal is to put gdk-pixbuf into an app bundle since the convention is to put additional libraries into Contents/Resources (see gedit.app for an example), which would again lead to loaders.cache not being found at runtime. May I suggest to incorporate the patch provided by the MacPorts developers at https://trac.macports.org/browser/trunk/dports/graphics/gdk-pixbuf2/files/patch-configure.ac.diff which turns relocation off by default on Mac OS X, while still allowing to be enabled for those that want to?
the idea seems fine to me, but the patch needs some work. I would suggest to simply remove the case statement altogether, and let those who want relocation use the commandline option.
Committed a patch along those lines.