Using a recent macosx-port 1.7.0 Java build for building mlvm fails with a confusing error message -- Bootstrap Settings reports:
ANT_VER = 1.7.0. [requires at least 1.7.1] Here is part of a relevant thread on macosx-port-...@openjdk.java.net: http://mail.openjdk.java.net/pipermail/macosx-port-dev/2011-September/001045.html At 4:19 PM -0400 10/1/11, Stephen Bannasch wrote: >At 2:16 PM +0200 9/30/11, Henri Gomez wrote: >>Hi guys >> >>I got various reports on openjdk-osx-build about failure to detect tools.jar : >> >>http://code.google.com/p/openjdk-osx-build/issues/detail?id=22 >>http://code.google.com/p/openjdk-osx-build/issues/detail?id=23 > >This also broke building OpenJDK8. > >The build system for OpenJSK 8 requires a working Java 1.7. > >The build fails with this error (confusing because I have ant v1.8.2 >installed): > > ANT_VER = 1.7.0. [requires at least 1.7.1] > >When ant -version is called from the build scripts this is the output: > >Unable to locate tools.jar. Expected to find it in >/Users/stephen/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Home/lib/tools.jar > Apache Ant(TM) version 1.8.2 compiled on June 3 2011 > >And unfortunately the code that looks for a version string finds the Java >version '1.7.0' first: > > jdk/make/shared/common/Defs.gmk:135 > > # Given a line of text, get the version number from it > define GetVersion > $(shell echo $1 | sed -e 's@[^0-9]*\([0-9][0-9]*\.[0-9][.0-9]*\).*@\1@' ) > endef > > >>As a temporary fix, I'll add a symlink in package >> >>ln -s lib/tools.jar 1.7.0.jre/Contents/Home/lib/tools.jar >> >>tools.jar is under JAVA_HOME/lib for both OS/X and Linux version. >> >>Could it be something related to JRE_HOME/JAVA_HOME ? > >Adding Henri's fix to my macosx-port build scripts fixes the problem: >https://gist.github.com/908156 > >echo ' >*** fix missing tools.jar in jre >*** see: >http://mail.openjdk.java.net/pipermail/macosx-port-dev/2011-September/001045.html >' >ln -s ../../../../lib/tools.jar >build/macosx-universal/j2sdk-bundle/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Home/lib/tools.jar > >*** while the problem is annoying, and figuring out why my mlvm build was >failing took way more time than I would have liked, the fact that this is open >source and the problem is discussed openly on this list and I can fix it >myself is a huge plus *** _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev