FreeImage must be built with "-fvisibility=hidden" or its internal versions of libJPEG and libPNG will conflict with the system versions, when a program attempts to use both FreeImage and any library which itself uses those libraries - e.g. gtk or Qt. This yields run-time errors like "JPEG parameter struct mismatch: library thinks size is 632, caller expects 600". The FreeImage makefile has this flag, but it is overridden by the port's makefile. The attached patch simply adds it, and -fexceptions, which FreeImage also expects, back in. I don't know if any ports rely on both FreeImage and Gtk or Qt, but I ran into this issue using both FreeImage and Gtk from ports in our own codebase. Fix: Patch attached with submission follows: How-To-Repeat: Build freeimage from ports. Write a simple gtk app that links with gtk and freeimage. Depending on the link order, none of the icons (toolbar buttons, etc) will show up, and either gtk or freeimage will complain about library mismatches.
Responsible Changed From-To: freebsd-ports-bugs->gahr Over to maintainer (via the GNATS Auto Assign Tool)
State Changed From-To: open->closed Committed. Thanks!
gahr 2012-02-06 11:44:40 UTC FreeBSD ports repository Modified files: graphics/freeimage Makefile Log: - restore original CFLAGS to avoid symbols clash PR: 164285 Submitted by: Lee Thomas <lee_thomas@lthomas.net> Revision Changes Path 1.17 +2 -0 ports/graphics/freeimage/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"