Where does 'make sanity' look for the ANT version?

Stuart Marks stuart.marks at oracle.com
Wed Mar 28 00:22:02 UTC 2012


Hi Martijn!

One of my colleagues ran into this the other day. I don't know all the details 
and the solution but I have a clue that might help you move forward.

In make/common/shared/Sanity.gmk there are the lines,

> _ANT_VER:=$(shell $(ANT) -version 2>&1 )
> ANT_VER:=$(call GetVersion,"$(_ANT_VER)")

The GetVersion function (defined in Defs.gmk) extracts the version number from 
the shell output using a regexp. Unfortunately there seem to be circumstances 
-- not sure exactly what they are though -- when the shell output includes a 
*java* version number, either in the output or in a path. Clearly you're using 
Java 7 -- that is, JDK 1.7.0 -- and the GetVersion regexp is happily picking 
this up thinking it's the ant version number.

One path forward would be to investigate why "shell $(ANT) -version" is 
returning some unexpected output and is possibly not even running ant at all.

I'll forward this to my colleague to see whether he has anything to add.

s'marks


On 3/26/12 3:55 AM, Martijn Verburg wrote:
> Hi all,
>
> So I'm building new VMs to try the various OpenJDK builds and have run
> across a pretty consistent problem using Lubuntu 11.10 (32-bit) with
> the detection of ANT.
>
> I have ANT 1.8.2 installed (Ant 1.7 is clearly removed) but 'make
> sanity' insists that the ANT version I have is 1.7.0.
>
> * My DEVTOOLS_PATH is pointing at /usr/bin which has the correct version of ANT
> * When I set ANT_HOME (export ANT_HOME=/usr/share/ant) before running
> 'make sanity' it doesn't appear to take hold (the output from make
> sanity shows ANT_HOME to be blank)
>
> I'm not sure where else it might be reading this from, does anyone
> where I should go spelunking to see where it makes this check?
>
> Cheers,
> Martijn



More information about the build-dev mailing list