New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 599168 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Cannot build chrome_junit_tests using Java 1.8.

Project Member Reported by dewittj@chromium.org, Mar 30 2016

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.
 
I cropped too much:
  class file for org.chromium.net.NetworkChangeNotifier not found

This is using a clean, tip of tree build @ 92333c0e5ca6b7768e5bcf6d41ff8fc733ebbfc1

Comment 3 by n...@chromium.org, 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?
Cc: n...@chromium.org
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

bug599168.txt
10.0 KB View Download

Comment 5 by n...@chromium.org, 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).
Labels: -Pri-0 Pri-2
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.
Project Member

Comment 7 by bugdroid1@chromium.org, 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

Status: Fixed (was: Untriaged)
Summary: Cannot build chrome_junit_tests using Java 1.8. (was: Cannot build chrome_junit_tests.)

Sign in to add a comment