David R. Morrison wrote: []
As far as I can tell, you would be able to build foo with libpng headers
installed, just fine. Everything will have libpng support compiled in, and
then at link time, you are linking against libpng3.dylib and all symbols are
This part I don't understand: How would foo even know that it wants to link against libpng.3.dylib when it only sees libpng.2.dylib during build time? It links to -lpng, and /sw/lib/libpng.dylib is a symlink to libpng.2.dylib in your scenario.
successfully resolved, so everything is still fine. It is only at execution time that the mismatch is detected.
In the case of the gimp help browser, the scenario was different, I think, and not caused by any problem with Fink's build process, but by a principal problem of the shlibs policy:
gimp-1.2.3-10 (this was the version that showed the problem, the newer one eliminated it by depending on libpng3) build-depends on libpng and depends on libpng-shlibs. The gimp helpbrowser of this version therefore links with libpng.2.dylib. It also links with libgtkxmhtml.1.dylib from gnome-libs-shlibs. So far no problem, while the latter links with libpng.2.dylib, too. Next, gnome-libs-shlibs is upgraded to a new version that has a dependency on libpng3. libgtkxmhtml.1.dylib now links with libpng.3.dylib.
When helpbrowser is run, the dynamical linker loads libpng.2.dylib, then libgtkxmhtml.1.dylib and then libpng.3.dylib (confirmed by looking at DYLD_PRINT_LIBRARIES). At this point, the famous error message appears. Everything was compiled correctly, though.
Something similar might happen with the different xfree versions:
Binary foo is built while xfree-4.2 is installed. It links with -lXft which has the install-name /usr/X11R6/lib/libXft.1.dylib. foo also links with library libbar.1.dylib which is linked with -lXft, too. Now xfree is upgraded to 4.3.0 and package libbar is rebuilt. libbar.1.dylib now links with what libXft.dylib is symlinked to at this moment, namely libXft.2.1.dylib with install-name /usr/X11R6/lib/libXft.2.dylib.
At runtime of foo, dyld loads first libXft.1.dylib (yes, this still exists in xfree-4.3.0 for compatibility reasons!), then libbar.1.dylib, then libXft.2.dylib. Boom! (Or maybe not?)
-- Martin
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel
