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.
Over to maintainer (via the GNATS Auto Assign Tool)
gahr 2012-02-06 11:44:40 UTC
FreeBSD ports repository
- restore original CFLAGS to avoid symbols clash
Submitted by: Lee Thomas <email@example.com>
Revision Changes Path
1.17 +2 -0 ports/graphics/freeimage/Makefile
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "email@example.com"