From owner-freebsd-ports@FreeBSD.ORG Mon Feb 13 03:33:56 2012 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6D46106566B for ; Mon, 13 Feb 2012 03:33:56 +0000 (UTC) (envelope-from dewayne.geraghty@heuristicsystems.com.au) Received: from nschwqsrv03p.mx.bigpond.com (nschwqsrv03p.mx.bigpond.com [61.9.189.237]) by mx1.freebsd.org (Postfix) with ESMTP id 3420C8FC15 for ; Mon, 13 Feb 2012 03:33:55 +0000 (UTC) Received: from nschwotgx04p.mx.bigpond.com ([58.172.112.105]) by nschwmtas03p.mx.bigpond.com with ESMTP id <20120213022530.ELQA11739.nschwmtas03p.mx.bigpond.com@nschwotgx04p.mx.bigpond.com>; Mon, 13 Feb 2012 02:25:30 +0000 Received: from hermes.heuristicsystems.com.au ([58.172.112.105]) by nschwotgx04p.mx.bigpond.com with ESMTP id <20120213022530.TXJV1687.nschwotgx04p.mx.bigpond.com@hermes.heuristicsystems.com.au>; Mon, 13 Feb 2012 02:25:30 +0000 Received: from white (white.hs [10.0.5.2]) by hermes.heuristicsystems.com.au (8.14.5/8.13.6) with ESMTP id q1D2N4d2093848 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Mon, 13 Feb 2012 13:23:05 +1100 (EST) (envelope-from dewayne.geraghty@heuristicsystems.com.au) From: "Dewayne" To: Date: Mon, 13 Feb 2012 13:23:04 +1100 Organization: Heuristic Systems Pty Ltd Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Aczp9mofQ9n5RjVkT3+CzKQlWmsJ0A== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-SIH-MSG-ID: ox87Ed36TAD0zmQv0WC2O1J3yArnq3Mt8ZoaRdJjqwQZTUTduMHbU7f8LbM3lNz21T1cNhiPPGQqYKz0X4/QsOM= Cc: ports@FreeBSD.org Subject: Ghostscript9 build fails - patch included. X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2012 03:33:56 -0000 The following patch enables ghostscript9-nox11 to build cleanly on FreeBSD 9.0Stable (patched to r231556) --- openjpeg/libopenjpeg/opj_malloc.h.orig 2012-02-13 11:51:18.000000000 +1100 +++ openjpeg/libopenjpeg/opj_malloc.h 2012-02-13 11:50:11.000000000 +1100 @@ -85,8 +85,8 @@ #define HAVE_MEMALIGN /* Linux x86_64 and OSX always align allocations to 16 bytes */ #elif !defined(__amd64__) && !defined(__APPLE__) - #define HAVE_MEMALIGN - #include + #define HAVE_POSIX_MEMALIGN + #include #endif #endif I copied the patch to /usr/ports/print/ghostscript9/files/ as patch-ghostscript9-nox11-opj_malloc.h. This patch addresses two compilation failures: cc -O2 -pipe -pipe -O2 -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUGGING -UEBUGGING -fno-strict-aliasing -g -fPIC -DUPD_SIGNAL=0 -I. -I/var/ports/usr/ports/print/ghostscript9-nox11/work/ghostscript-9.05/lcms/include -I/usr/local/include/libpng -I/usr/local/include -I/usr/local/include/freetype2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_SYS_TIME_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -O2 -pipe -pipe -O2 -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUGGING -UEBUGGING -fno-strict-aliasing -I/usr/local/include -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/9.05\" -DA4 -DOPJ_STATIC -I./soobj/ -Iopenjpeg/libopenjpeg -Iopenjpeg/libopenjpeg/.. -DUSE_OPENJPEG_JP2 -o ./soobj/opj_bio.o -c openjpeg/libopenjpeg/bio.c In file included from openjpeg/libopenjpeg/bio.c:32: openjpeg/libopenjpeg/opj_includes.h:80:6: warning: "__STDC_VERSION__" is not defined In file included from openjpeg/libopenjpeg/opj_malloc.h:89, from openjpeg/libopenjpeg/opj_includes.h:108, from openjpeg/libopenjpeg/bio.c:32: /usr/include/malloc.h:3:2: error: #error " has been replaced by " gmake[2]: *** [soobj/opj_bio.o] Error 1 gmake[2]: Leaving directory `/var/ports/usr/ports/print/ghostscript9-nox11/work/ghostscript-9.05' gmake[1]: *** [so-subtarget] Error 2 gmake[1]: Leaving directory `/var/ports/usr/ports/print/ghostscript9-nox11/work/ghostscript-9.05' gmake: *** [so] Error 2 *** Error code 1 And after addressing this one, the following turned-up cc -DHAVE_MKSTEMP -DHAVE_FONTCONFIG -DHAVE_SETLOCALE -O2 -pipe -pipe -O2 -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUGGING -UEBUGGING -fno-strict-aliasing -g -DUPD_SIGNAL=0 -I. -I/var/ports/usr/ports/print/ghostscript9-nox11/work/ghostscript-9.05/lcms/include -I/usr/local/include/libpng -I/usr/local/include -I/usr/local/include/freetype2 -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -Wdeclaration-after-statement -fno-builtin -fno-common -DHAVE_STDINT_H=1 -DHAVE_SYS_TIME_H=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -O2 -pipe -pipe -O2 -g0 -ggdb0 -DSTRIP_FBSDID -UDEBUGGING -UEBUGGING -fno-strict-aliasing -I/usr/local/include -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/9.05\" -DA4 -I./soobj -I./base -DWHICH_CMS="lcms2" -g -o ./sobin/gsc ./psi/dxmainc.c \ -L./sobin -lgs ./sobin/libgs.so: undefined reference to `memalign' gmake[2]: *** [sobin/gsc] Error 1 gmake[2]: Leaving directory `/var/ports/usr/ports/print/ghostscript9-nox11/work/ghostscript-9.05' gmake[1]: *** [so-subtarget] Error 2 gmake[1]: Leaving directory `/var/ports/usr/ports/print/ghostscript9-nox11/work/ghostscript-9.05' gmake: *** [so] Error 2 *** Error code 1 I trust that this assists. Regards, Dewayne. Sydney, Australia (GMT +11 hours) M: +61 (0)409-337-196 T: +61 (0)2-8206-9468