Bug 164285

Summary: graphics/freeimage port has incorrect build flags, leading to conflicts with gtk
Product: Ports & Packages Reporter: Lee Thomas <lee_thomas>
Component: Individual Port(s)Assignee: Pietro Cerutti <gahr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Lee Thomas 2012-01-18 16:10:08 UTC
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.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-01-18 16:10:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gahr

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Pietro Cerutti freebsd_committer freebsd_triage 2012-02-06 11:44:44 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-02-06 11:44:54 UTC
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"