From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 3 10:20:03 2008 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 C7B731065675 for ; Wed, 3 Dec 2008 10:20:03 +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 A398A8FC18 for ; Wed, 3 Dec 2008 10:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mB3AK3t9062812 for ; Wed, 3 Dec 2008 10:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mB3AK38G062811; Wed, 3 Dec 2008 10:20:03 GMT (envelope-from gnats) Resent-Date: Wed, 3 Dec 2008 10:20:03 GMT Resent-Message-Id: <200812031020.mB3AK38G062811@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, Jacob Atzen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 759ED1065673 for ; Wed, 3 Dec 2008 10:13:35 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 63D578FC12 for ; Wed, 3 Dec 2008 10:13:35 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mB3ADZqD024558 for ; Wed, 3 Dec 2008 10:13:35 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mB3ADZ15024557; Wed, 3 Dec 2008 10:13:35 GMT (envelope-from nobody) Message-Id: <200812031013.mB3ADZ15024557@www.freebsd.org> Date: Wed, 3 Dec 2008 10:13:35 GMT From: Jacob Atzen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/129388: FreeImage builds with memalign 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, 03 Dec 2008 10:20:03 -0000 >Number: 129388 >Category: ports >Synopsis: FreeImage builds with memalign >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Dec 03 10:20:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jacob Atzen >Release: 6.3-RELEASE >Organization: >Environment: FreeBSD asmussen.crd.dk 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Jan 16 04:45:45 UTC 2008 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386 >Description: FreeImage builds with a dependency on memalign which is not present on FreeBSD. This leads to problems with other programs linking to FreeImage. In this case it is the image_science rubygem that fails to work with the following message: /usr/local/lib/libfreeimage.so.3: Undefined symbol "memalign" - /home/cruise/.ruby_inline/Inline_ImageScience_aa58.so >How-To-Repeat: Build FreeImage, try to use it from Ruby with image_science >Fix: The problem lies in the LibOpenJPEG/opj_malloc.h file where HAVE_MEMALIGN is defined except for OS X and linux_x64. Removing the #define HAVE_MEMALIGN from that file cures the problem. A patch is supplied. Patch attached with submission follows: diff --git a/Source/LibOpenJPEG/opj_malloc.h b/Source/LibOpenJPEG/opj_malloc.h index 6787aed..8ea2c51 100644 --- a/Source/LibOpenJPEG/opj_malloc.h +++ b/Source/LibOpenJPEG/opj_malloc.h @@ -76,8 +76,7 @@ Allocate memory aligned to a 16 byte boundry #if defined(__sun) #define HAVE_MEMALIGN /* Linux x86_64 and OSX always align allocations to 16 bytes */ - #elif !defined(__amd64__) && !defined(__APPLE__) - #define HAVE_MEMALIGN + #elif !defined(__amd64__) && !defined(__APPLE__) #include #endif #endif >Release-Note: >Audit-Trail: >Unformatted: