Bug 164285 - graphics/freeimage port has incorrect build flags, leading to conflicts with gtk
Summary: graphics/freeimage port has incorrect build flags, leading to conflicts with gtk
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pietro Cerutti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 16:10 UTC by Lee Thomas
Modified: 2012-02-06 11:50 UTC (History)
0 users

See Also:


Attachments
file.diff (368 bytes, patch)
2012-01-18 16:10 UTC, Lee Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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 2012-02-06 11:44:44 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer 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"