Using Apache ant without base gcc

Ronald Klop ronald-freebsd8 at klop.yi.org
Wed Sep 25 15:05:12 UTC 2013


On Wed, 25 Sep 2013 13:16:01 +0200, Peter Jeremy <peter at rulingia.com>  
wrote:

> [Please Cc me on any responses]
>
> Hi,
>
> I am the manintainer for graphics/jogl and the build cluster reports that
> it's failing on head on both i386 and amd64 because there's no gcc:
>
> /wrkdirs/usr/ports/graphics/jogl/work/gluegen/make/build.xml:343: Could  
> not launch gcc: java.io.IOException: Cannot run program "gcc" (in  
> directory "/wrkdirs/usr/ports/graphics/jogl/work/gluegen/build/obj"):  
> java.io.IOException: error=2, No such file or directory
>
> The compiler is defined as:
>     <compiler id="compiler.cfg.freebsd" name="gcc">
>     </compiler>
>     <compiler id="compiler.cfg.freebsd.amd64" name="gcc">
>       <compilerarg value="-fPIC"/>
>     </compiler>
>
> If I add "USE_GCC=any" to the port Makefile then it still fails because
> lang/gcc installs 'gcc46', rather than 'gcc'.
>
> If I change all the 'gcc' references to 'cc' (which would pick up
> clang) then it fails with:
> /tank/obj/usr/ports/graphics/jogl/work/gluegen/make/gluegen-cpptasks.xml:497:  
> cc is not a legal value for this attribute
> where gluegen-cpptasks.xml:497 has
>   <compiler id="compiler.cfg.freebsd" name="cc">
>
> I'm a long way from an expert on ant and I've had a rummage around the
> Internet but haven't found a solution.  Can anyone with more ant-foo  
> help?
>

Hi,

I looked at the documentation of the <compiler> and <cc> tags. It does not  
look flexible enough to define your own compiler and it does not support  
clang yet.
So I see these options:
1- lobby with the lang/gcc port maintainer to (optionally) install without  
a ${SUFFIX} set on FreeBSD 10 (where gcc is gone).
2- change the build.xml to directly use the <exec> target.  
http://ant.apache.org/manual/Tasks/exec.html
3- symlink /usr/ports/graphics/jogl/work/gcc -> /usb/bin/cc and add the  
work directory to the PATH before building the port. This will actually  
build with clang. Which might or might not work.

I think option 2 is the most convenient and clear.

Ronald.


More information about the freebsd-java mailing list