ports/187186: [patch] graphics/jogl does not build on machines without gcc in base
Don Lewis
truckman at FreeBSD.org
Sun Mar 2 02:40:00 UTC 2014
>Number: 187186
>Category: ports
>Synopsis: [patch] graphics/jogl does not build on machines without gcc in base
>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: Sun Mar 02 02:40:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Don Lewis
>Release: FreeBSD 11.0-CURRENT i386
>Organization:
FreeBSD Project
>Environment:
System: FreeBSD scratch.catspoiler.org 11.0-CURRENT FreeBSD 11.0-CURRENT #71 r262666M: Sat Mar 1 16:42:54 PST 2014 dl at scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB i386
Ports revision r345674.
apache-ant-1.9.3
>Description:
The following error occurs when attempting to build jogl on recent
versions of FreeBSD where clang is the default compiler and gcc is
not installed:
cx.build:
[echo] Output lib name = gluegen-rt
[mkdir] Created dir: /usr/ports/graphics/jogl/work/gluegen/build/obj
[echo] Compiling src/native/unix/*.c
[echo] user.dir=/usr/ports/graphics/jogl/work/jogl/make
[cc] 1 total files to be compiled.
BUILD FAILED
/usr/ports/graphics/jogl/work/jogl/make/build.xml:1662: The following error occurred while executing this line:
/usr/ports/graphics/jogl/work/jogl/make/build.xml:501: The following error occurred while executing this line:
/usr/ports/graphics/jogl/work/gluegen/make/build.xml:458: The following error occurred while executing this line:
/usr/ports/graphics/jogl/work/gluegen/make/build.xml:378: The following error occurred while executing this line:
/usr/ports/graphics/jogl/work/gluegen/make/build.xml:343: Could not launch gcc: java.io.IOException: Cannot run program "gcc" (in directory "/usr/ports/graphics/jogl
/work/gluegen/build/obj"): java.io.IOException: error=2, No such file or directory
Total time: 17 seconds
*** Error code 1
Stop.
make: stopped in /usr/ports/graphics/jogl
The problems is that apache-ant has a hardwired set of C compilers
that it can use, and plain old cc is not one of them. The default
is gcc. This probably should be considered as a bug in apache-ant
...
Installing gcc from ports doesn't help because apache-ant is
specifically looking for gcc and not gcc46, or whatever version of
gcc we have installed.
>How-To-Repeat:
Attempt to build jogl on a machine without gcc in the $PATH.
>Fix:
The following patch to the graphics/jogl Makefile allows fakes
apache-ant into using our system C compiler. On older FreeBSD
versions this is actually gcc, so it should be a NOP. There doesn't
seem to be any issue with using clang in place of gcc on newer
versions of FreeBSD where it is the default compiler. compiler.
Index: Makefile
===================================================================
--- Makefile (revision 346717)
+++ Makefile (working copy)
@@ -46,6 +46,8 @@
BUILD_WRKSRC= ${WRKSRC}/jogl/make
+MAKE_ENV+= PATH=${WRKDIR}:${PATH}
+
NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} -e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|g' \
@@ -53,6 +55,7 @@
@${REINPLACE_CMD} -e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|g' \
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/jogl/make/build.xml
+ ln -s /usr/bin/cc ${WRKDIR}/gcc
do-install:
.if !defined(NOPORTDOCS)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list