Getting Java compiler messages for Android build

78 views
Skip to first unread message

Max

unread,
Jun 27, 2016, 6:31:38 AM6/27/16
to Chromium-dev
Hi!

I successfully built and can run Chromium for Android.
But when I try to experiment with the source code written in Java, and make a syntax or other kind of error, I'm getting very weird messages:

> ninja -C out/Default chrome_public_apk
ninja: Entering directory `out/Default'
[1/69] ACTION //chrome/android:chrome_java__compile_java__javac(//build/toolchain/android:clang_x86)
FAILED: gen/chrome/android/chrome_java__compile_java__javac.d gen/chrome/android/chrome_java__compile_java.javac.jar gen/chrome/android/chrome_java__compile_java.javac.jar.md5.stamp gen/chrome/android/chrome_java__compile_java.javac.jar.pdb
python ../../build/android/gyp/javac.py --depfile=gen/chrome/android/chrome_java__compile_java__javac.d --jar-path=gen/chrome/android/chrome_java__compile_java.javac.jar --java-srcjars=...
[HERE GOES LONG LIST OF JAVA SOURCES]
Traceback (most recent call last):
  File "../../build/android/gyp/javac.py", line 417, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../../build/android/gyp/javac.py", line 413, in main
    pass_changes=True)
  File "/home/knuckles/proj/chromium/src/build/android/gyp/util/build_utils.py", line 527, in CallAndWriteDepfileIfStale
    pass_changes=True)
  File "/home/knuckles/proj/chromium/src/build/android/gyp/util/md5_check.py", line 87, in CallAndRecordIfStale
    function(*args)
  File "/home/knuckles/proj/chromium/src/build/android/gyp/util/build_utils.py", line 511, in on_stale_md5
    function(*args)
  File "../../build/android/gyp/javac.py", line 407, in <lambda>
    classpath_inputs),
  File "../../build/android/gyp/javac.py", line 212, in _OnStaleMd5
    attempt_build()
  File "../../build/android/gyp/javac.py", line 210, in <lambda>
    stderr_filter=ColorJavacOutput)
  File "/home/knuckles/proj/chromium/src/build/android/gyp/util/build_utils.py", line 174, in CheckOutput
    raise CalledProcessError(cwd, args, stdout + stderr)
util.build_utils.CalledProcessError: Command failed: ( cd /home/knuckles/proj/chromium/src/out/Default; bin/jmake -pdb gen/chrome/android/chrome_java__compile_java.javac.jar.pdb -C-g -C-encoding -CUTF-8 -classpath ...
[SAME LONG LIST OF JAVA SOURCES AGAIN]
jmake: error interacting with the compiler:
jmake: error loading compiler main class com.sun.tools.javac.Main
jmake: original exception:
jmake: com.sun.tools.javac.Main

The question is: is this normal, and how do I get meaningful Java compiler error messages?
General Chromium for Android development tips (e.g. how to set up a Java IDE for it) are also highly welcome.

Max

unread,
Jun 27, 2016, 8:31:40 AM6/27/16
to Chromium-dev
Sorry, it seems my build environment got screwed up during system update.
It doesn't really depend on whether there are errors in the source code, even the clean copy gives me this error.
Will investigate myself for now.

Max

unread,
Jun 27, 2016, 9:12:04 AM6/27/16
to Chromium-dev
Solved it.
Problem was caused by Java-1.8 set as default alternative. It was changed during system update.
Reply all
Reply to author
Forward
0 new messages