From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 18 16:10:09 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90DB21065675 for ; Wed, 18 Jan 2012 16:10:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 65D638FC17 for ; Wed, 18 Jan 2012 16:10:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0IGA9v8093289 for ; Wed, 18 Jan 2012 16:10:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0IGA91s093288; Wed, 18 Jan 2012 16:10:09 GMT (envelope-from gnats) Resent-Date: Wed, 18 Jan 2012 16:10:09 GMT Resent-Message-Id: <201201181610.q0IGA91s093288@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lee Thomas Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 358E31065670 for ; Wed, 18 Jan 2012 16:07:16 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 1D20D8FC0C for ; Wed, 18 Jan 2012 16:07:16 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0IG7Fik084794 for ; Wed, 18 Jan 2012 16:07:15 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q0IG7FOI084793; Wed, 18 Jan 2012 16:07:15 GMT (envelope-from nobody) Message-Id: <201201181607.q0IG7FOI084793@red.freebsd.org> Date: Wed, 18 Jan 2012 16:07:15 GMT From: Lee Thomas To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/164285: graphics/freeimage port has incorrect build flags, leading to conflicts with gtk X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2012 16:10:09 -0000 >Number: 164285 >Category: ports >Synopsis: graphics/freeimage port has incorrect build flags, leading to conflicts with gtk >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 18 16:10:08 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Lee Thomas >Release: FreeBSD 9.0-STABLE >Organization: >Environment: FreeBSD Anon 9.0-STABLE FreeBSD 9.0-STABLE #0: Tue Jan 17 08:17:57 EST 2012 anon@Anon:/usr/obj/usr/src/sys/GENERIC amd64 >Description: 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. >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. >Fix: Patch attached with submission follows: diff -u old/graphics/freeimage/Makefile fixed/graphics/freeimage/Makefile --- old/graphics/freeimage/Makefile 2012-01-17 16:56:00.000000000 -0500 +++ fixed/graphics/freeimage/Makefile 2012-01-17 16:58:18.000000000 -0500 @@ -28,6 +28,8 @@ .include +CFLAGS+= -fexceptions -fvisibility=hidden + .if ${ARCH} == "amd64" CFLAGS+= -fPIC .endif >Release-Note: >Audit-Trail: >Unformatted: