Build error with javac Main not being found when building java.transaction module on Mac OS X

Martijn Verburg martijnverburg at gmail.com
Mon Feb 9 10:52:45 UTC 2015


Hi Magnus,

I tried:

rm -rf build
bash configure
make interim-langtools

That worked successfully and I have the interim-langtools.jar at:

/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/buildtools/interim-langtools.jar

=====================

Unfortunately the build still fails with a slightly different error (to
stderr) of:

Fatal Error: Unable to find package java.lang in classpath or bootclasspath
make[3]: ***
[/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch]
Error 3
make[2]: *** [java.transaction-java] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [main-wrapper] Error 2
make: *** [all] Error 2

===========

The debug log doesn't contain any explicit errors, but does contain the
following (I've added 2 line breaks for readability) section around
compiling that module:

SetupJavaCompilation(java.transaction)
 [2] SETUP := GENERATE_JDKBYTECODE
 [3] SRC :=
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/jdk/src/java.transaction/share/classes
 [4] INCLUDES:=
 [5] BIN :=
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction
 [6] HEADERS :=
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/support/headers/java.transaction
 [7] ADD_JAVAC_FLAGS := -bootclasspath
":/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction"
/bin/mkdir -p
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction
/bin/rm -f
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch.tmp
/bin/echo  Writing 3 paths to ' >>
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch.tmp'
Writing 3 paths to  >>
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch.tmp
/bin/echo Compiling `/usr/bin/wc
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch.tmp
| /usr/bin/tr -s ' ' | /usr/bin/cut -f 2 -d ' '` files for java.transaction

Compiling 3 files for java.transaction
(/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java
-Xms64M -Xmx1600M -XX:ThreadStackSize=1536
"-Xbootclasspath/p:/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/buildtools/interim_langtools.jar"
-cp
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/buildtools/interim_langtools.jar
com.sun.tools.javac.Main -source 9 -target 9 -encoding ascii
-XDignore.symbol.file=true -Xlint:all,-deprecation -Werror  -bootclasspath
":/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction"
-implicit:none -d
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction
-h
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/support/headers/java.transaction.java.transaction.tmp
@/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch.tmp
&& /bin/mv
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch.tmp
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/build/macosx-x86_64-normal-server-release/jdk/modules/java.transaction/_the.java.transaction_batch)

make[3]: Nothing to be done for `default'.
(cd /Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/make &&
/usr/bin/make  VERBOSE="" LOG_LEVEL="debug" -R -I
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/make/common
SPEC="/Users/karianna/Documents/workspace/AdoptOpenJDK_Projects/jdk9/build/macosx-x86_64-normal-server-release/spec.gmk"
LOG_LEVEL="debug" VERBOSE="" MAIN_TARGETS="all" LOG="debug" -f
ModuleWrapper.gmk
-I/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/jdk/make
-I/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/jdk/make/copy
MODULE=jdk.jdwp.agent MAKEFILE_PREFIX=Copy)
(cd /Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/jdk/make
&& /usr/bin/make  VERBOSE="" LOG_LEVEL="debug" -R -I
/Users/karianna/Documents/workspace/AdoptOpenJDK_projects/jdk9/make/common
SPEC="/Users/karianna/Documents/workspace/AdoptOpenJDK_Projects/jdk9/build/macosx-x86_64-normal-server-release/spec.gmk"
VERBOSE="" MAIN_TARGETS="all" LOG_LEVEL="debug" LOG="debug" -f
CopySamples.gmk)
SetupCopyFiles(COPY_LIBS_TO_LIB)
...
...

===========

To Erik's later suggestion, there's also no mention of java.transaction in
the module-deps.gmk file.

Cheers,
Martijn

On 6 February 2015 at 23:16, Magnus Ihse Bursie <
magnus.ihse.bursie at oracle.com> wrote:

> On 2015-02-06 17:46, Martijn Verburg wrote:
>
>>
>> /Users/karianna/Documents/workspace/AdoptOpenJDK_
>> projects/jdk9/build/macosx-x86_64-normal-server-release/
>> buildtools/interim_langtools.jar
>> does not exist!  So it's not being built correctly or moved to the right
>> place.
>>
>> I'm not seeing any other clues (even at trace) that indicates why
>> interim_langtools.jar has not been built....
>>
>
> Sometimes mercurial forests can get messed up. If an unmodified source
> fails to compile after dist-clean, this can be the case. One thing to to is
> to try and re-clone the forest. Make sure get_source.sh runs to completion
> without any errors.
>
> Otherwise, you have narrowed down the issue quite well. We need to figure
> out why interim_langtools.jar is not being built.
>
> Start by rm -rf build && configure.
>
> Then run "make interim-langtools". Check the contents of
> build/$BUILD/buildtools. Is it there? If so, you should be able to do just
> "make" and continue.
>
> Otherwise, start again with more logging. rm -rf build && configure &&
> make interim-langtools LOG=debug  (trace is not being helpful).
>
> /Magnus
>


More information about the jdk9-dev mailing list