Cannot build chrome_junit_tests using Java 1.8. |
|||||
Issue description
[~/src/chrome/src]$ ninja -j128 -C out/and chrome_junit_tests
...
chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/OfflinePageTabObserverTest.java:49: error: cannot access NetworkChangeNotifier
spy(new OfflinePageTabObserver(mContext, mSnackbarManager, mSnackbarController));
^
...
1 error
1 warning
ninja: build stopped: subcommand failed.
,
Mar 30 2016
This is using a clean, tip of tree build @ 92333c0e5ca6b7768e5bcf6d41ff8fc733ebbfc1
,
Mar 30 2016
I can't reproduce this. With a clean ToT build, chrome_junit_tests builds just fine. Does this happen after removing your out direction? What javac are you using?
,
Mar 30 2016
I tried multiple ways to work around this, all failed:
* ninja -C out/and -t clean
* rm -rf out/and; ninja -j128 -C out/and chrome_junit_tests
* Remove enable_incremental_javac from my gn args.
$ gn args out/and
target_os = "android"
target_cpu = "arm" # (default)
is_debug = true # (default)
# Other args you may want to set:
is_component_build = true
is_clang = true
enable_incremental_javac = true # Much faster; experimental
use_goma = true
goma_dir = "/usr/local/google/home/dewittj/src/goma"
disable_incremental_isolated_processes = true
Full error output from `ninja -C out/and chrome_junit_tests` is attached.
$ javac -version
javac 1.8.0-google-v7
,
Mar 30 2016
I wonder if it's because you're using java 1.8. The bots and most developers are still using 1.7 (though we'll be upgrading soon-ish).
,
Mar 30 2016
Looks like that's the issue. I ran: $ export PATH=/usr/local/buildtools/java/jdk7/bin:$PATH $ ninja -C out/and -t clean $ ninja -C out/and chrome_junit_tests [2156/2156] STAMP obj/chrome/android/chrome_junit_tests.stamp $ # cool.
,
Mar 30 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/44af6ef24f6a9bc2822e4f294919ae71f7288015 commit 44af6ef24f6a9bc2822e4f294919ae71f7288015 Author: dewittj <dewittj@chromium.org> Date: Wed Mar 30 21:11:56 2016 chrome_junit_tests: Update BUILD.gn to allow building with Java 1.8 Looks like dependency management works a little differently than 1.7 does. BUG= 599168 Review URL: https://codereview.chromium.org/1844993003 Cr-Commit-Position: refs/heads/master@{#384092} [modify] https://crrev.com/44af6ef24f6a9bc2822e4f294919ae71f7288015/chrome/android/BUILD.gn
,
Mar 31 2016
,
Mar 31 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dewittj@chromium.org
, Mar 30 2016