Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu Vivid Vervet - missing required package (openjdk-8-source) #69

Closed
malkia opened this issue Mar 27, 2015 · 20 comments
Closed

Ubuntu Vivid Vervet - missing required package (openjdk-8-source) #69

malkia opened this issue Mar 27, 2015 · 20 comments
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) type: bug

Comments

@malkia
Copy link

malkia commented Mar 27, 2015

TLDR - "sudo apt-get install openjdk-8-source" fixes it.

EDIT: Should've waited for the whole test, but this one is not so critical: "bc" also needs to be installed for the sh_tests to pass (so one more "apt-get install bc")

Here is the full story (without the "bc" failure):
(utopic)malkia@localhost:~/p/google/bazel$ ./bootstrap_test.sh test


*** bootstrap ***


INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
ERROR: /home/malkia/p/google/bazel/tools/jdk/BUILD:50:1: error loading package 'external': Could not access /home/malkia/.cache/bazel/_bazel_malkia/25bda5d738c2f595d569ca82f756ade7/.external-repository/local-jdk/src.zip: /usr/lib/jvm/openjdk-8 (No such file or directory) and referenced by '//tools/jdk:jdk'.
ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.609s
Bootstrap failed
(utopic)malkia@localhost:/p/google/bazel$ ls -l /home/malkia/.cache/bazel/_bazel_malkia/25bda5d738c2f595d569ca82f756ade7/.external-repository/local-jdk/src.zip
lrwxrwxrwx 1 malkia malkia 41 Mar 27 00:36 /home/malkia/.cache/bazel/_bazel_malkia/25bda5d738c2f595d569ca82f756ade7/.external-repository/local-jdk/src.zip -> /usr/lib/jvm/java-8-openjdk-amd64/src.zip
(utopic)malkia@localhost:
/p/google/bazel$ ls -l /usr/lib/jvm/java-8-openjdk-amd64/src.zip
lrwxrwxrwx 1 root root 20 Mar 17 19:18 /usr/lib/jvm/java-8-openjdk-amd64/src.zip -> ../openjdk-8/src.zip
(utopic)malkia@localhost:/p/google/bazel$ ls -l /usr/lib/jvm/openjdk-8
ls: cannot access /usr/lib/jvm/openjdk-8: No such file or directory
(utopic)malkia@localhost:
/p/google/bazel$ sudo apt-get install openjdk-8-source
[sudo] password for malkia:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
openjdk-8-source
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.0 MB of archives.
After this operation, 51.8 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ vivid/universe openjdk-8-source all 8u40-b27-1 [46.0 MB]
Fetched 46.0 MB in 16s (2783 kB/s)
Selecting previously unselected package openjdk-8-source.
(Reading database ... 98820 files and directories currently installed.)
Preparing to unpack .../openjdk-8-source_8u40-b27-1_all.deb ...
Unpacking openjdk-8-source (8u40-b27-1) ...
Setting up openjdk-8-source (8u40-b27-1) ...
(utopic)malkia@localhost:~/p/google/bazel$ ./bootstrap_test.sh test


*** bootstrap ***


INFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.
INFO: Found 2 targets...
INFO: From Building src/main/java/libbazel-core.jar (1171 files):
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
INFO: Elapsed time: 97.663s, Critical Path: 92.35s
==> bootstrap passed

Extracting Bazel installation...
Sending SIGTERM to previous Bazel server (pid=6798)... done.
.............


*** test ***


INFO: Found 69 targets and 19 test targets...
[213 / 323] Still waiting for 54 jobs to complete:
Running (standalone):
action 'CompileProtos src/main/protobuf/libproto_build.jar', 10 s
action 'CompileProtos src/main/protobuf/libproto_bundlemerge.jar', 10 s
action 'CompileProtos src/main/protobuf/libproto_crosstool_config.jar', 10 s
action 'CompileProtos src/main/protobuf/libproto_test_status.jar', 10 s
Scheduling:
action 'CompileProtos src/main/protobuf/libproto_xcodegen.jar', 12 s
action 'CompileProtos src/main/protobuf/libproto_extra_actions_base.jar', 12 s
Executing genrule //examples/gen:genrule, 12 s
Building src/java_tools/buildjar/libjava-langtools-location-lib.jar (1 files), 11 s
Building src/java_tools/buildjar/libjavac-bootclasspath-locations-lib.jar (1 files), 11 s
Extracting interface //third_party:truth, 11 s
Linking src/main/cpp/libmd5.so, 11 s
Building src/main/java/libjava-toolchain-parser.jar (11 files), 11 s
Linking src/main/cpp/libutil.so, 11 s
... 41 more jobs

@lberki
Copy link
Contributor

lberki commented Mar 27, 2015

Assigning to kchodorow, although it's a bit strange becayse src.zip is not referenced in jdk.BUILD.

Once that strangeness is taken care of (probably my ignorance), all this needs at most is a change in the installation instructions.

@hanwen
Copy link
Contributor

hanwen commented Apr 15, 2015

if we have a dependency on "bc" we should remove that dependency

@damienmg
Copy link
Contributor

How do you do floating point addition in a shell script? The bc dependency comes from the shell test framework. It is used to compute test durations

@hanwen
Copy link
Contributor

hanwen commented Apr 15, 2015

ugh. we'll have to add bc to the install instructions then.

@kchodorow
Copy link
Contributor

Do we really need to use Python's time.time()? Why not just use http://stackoverflow.com/questions/16548528/linux-command-to-get-time-in-milliseconds and then $((end-start)) in unittest.bash?

@damienmg
Copy link
Contributor

Because it does not work on OSX :(

On Wed, Apr 15, 2015 at 4:04 PM Kristina notifications@github.com wrote:

Do we really need to use Python's time.time()? Why not just use
http://stackoverflow.com/questions/16548528/linux-command-to-get-time-in-milliseconds
and then $((end-start)) in unittest.bash?


Reply to this email directly or view it on GitHub
#69 (comment).

@damienmg
Copy link
Contributor

I mean date does not provide below seconds precision on OSX.

On Wed, Apr 15, 2015 at 4:06 PM Damien Martin-guillerez dmarting@google.com
wrote:

Because it does not work on OSX :(

On Wed, Apr 15, 2015 at 4:04 PM Kristina notifications@github.com wrote:

Do we really need to use Python's time.time()? Why not just use
http://stackoverflow.com/questions/16548528/linux-command-to-get-time-in-milliseconds
and then $((end-start)) in unittest.bash?


Reply to this email directly or view it on GitHub
#69 (comment).

@kchodorow
Copy link
Contributor

Okay, but Python does and we could turn the fp date it gives into an int.

@damienmg
Copy link
Contributor

Right you mean to get read of the bc operator. SGTM

On Wed, Apr 15, 2015 at 4:11 PM Kristina notifications@github.com wrote:

Okay, but Python does and we could turn the fp date it gives into an int.


Reply to this email directly or view it on GitHub
#69 (comment).

@kchodorow
Copy link
Contributor

The bc dependency has been fixed and I don't think we reference src.zip anymore. Feel free to reopen if this is still broken for you.

@kamalmarhubi
Copy link
Contributor

I ran into the this issue on Debian 8. As suggested in the initial report, installing openjdk-8-source fixed it.

Creating Bazel self-extracting archive...
Creating a .bazelrc pointing to /home/kamal/clones/bazel/base_workspace
Extracting Bazel installation...
.......
ERROR: /home/kamal/clones/bazel/tools/jdk/BUILD:55:1: no such package 'external': Could not access /home/kamal/.cache/bazel/_bazel_kamal/e506a03857a30434de2ae69da1f93613/external/local-jdk/src.zip: /usr/lib/jvm/
openjdk-8 (No such file or directory) and referenced by '//tools/jdk:jdk'.
ERROR: /home/kamal/.cache/bazel/_bazel_kamal/install/09a5a19f6a3b956ceced818dfdee555e/_embedded_binaries/jdk.WORKSPACE:45:1: no such package 'external': Could not access /home/kamal/.cache/bazel/_bazel_kamal/e50
6a03857a30434de2ae69da1f93613/external/local-jdk/src.zip: /usr/lib/jvm/openjdk-8 (No such file or directory) and referenced by '//external:jdk-default'.
ERROR: /home/kamal/.cache/bazel/_bazel_kamal/install/09a5a19f6a3b956ceced818dfdee555e/_embedded_binaries/jdk.WORKSPACE:17:1: no such package 'external': Could not access /home/kamal/.cache/bazel/_bazel_kamal/e50
6a03857a30434de2ae69da1f93613/external/local-jdk/src.zip: /usr/lib/jvm/openjdk-8 (No such file or directory) and referenced by '//external:langtools'.
ERROR: Evaluation of query "deps((//... union //tools/jdk:jdk))" failed: errors were encountered while computing transitive closure.

@philwo
Copy link
Member

philwo commented Jun 11, 2015

I can confirm that Debian 8 also needs the openjdk-8-source package, due to the "src.zip" dependency. Reproduced in a Debian 8.1 64-bit VM.

Should we just add that to the docs?

@philwo philwo reopened this Jun 11, 2015
@kchodorow
Copy link
Contributor

Do we know what's depending on src.zip? We shouldn't need it.

@damienmg
Copy link
Contributor

+1

Also apparently we will need the ErrorProne Javac when we will ship Error Prone so we might as well drop the requirements for Java 8 if we do so.

@damienmg
Copy link
Contributor

0bf90f7 This commit should have removed the requirement. To be confirmed.

@philwo
Copy link
Member

philwo commented Jun 11, 2015

Even with this commit, the issue is still present on Debian 8.1 with openjdk-8-jdk installed, but not openjdk-8-source. Damien and I had a look at it and it looks like Debian ships a broken symlink in the package:

root@debian64:/usr/lib/jvm/java-8-openjdk-amd64# ls -l
total 20
lrwxrwxrwx 1 root root 22 May 19 15:44 ASSEMBLY_EXCEPTION -> jre/ASSEMBLY_EXCEPTION
drwxr-xr-x 2 root root 4096 Jun 11 13:29 bin
lrwxrwxrwx 1 root root 41 May 19 15:44 docs -> ../../../share/doc/openjdk-8-jre-headless
drwxr-xr-x 3 root root 4096 Jun 11 13:29 include
drwxr-xr-x 5 root root 4096 Jun 11 13:29 jre
drwxr-xr-x 3 root root 4096 Jun 11 13:29 lib
drwxr-xr-x 4 root root 4096 Jun 11 13:29 man
lrwxrwxrwx 1 root root 20 May 19 15:44 src.zip -> ../openjdk-8/src.zip
lrwxrwxrwx 1 root root 22 May 19 15:44 THIRD_PARTY_README -> jre/THIRD_PARTY_README

The src.zip symlink goes to ../openjdk-8/src.zip, which doesn't exist (it is part of the openjdk-8-source package).

The error message that I'm getting is this:

philwo@debian64:~/bazel$ ./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: ./compile.sh build /path/to/bazel
🍃 Building Bazel from scratch...........
🍃 Building Bazel with Bazel.
.Extracting Bazel installation...
Sending SIGTERM to previous Bazel server (pid=2324)... done.
.....
ERROR: /home/philwo/bazel/tools/jdk/BUILD:65:1: no such package 'external': Could not access /home/philwo/.cache/bazel/_bazel_philwo/a69a55589c8b323f8b4d3b42a9bb5861/external/local-jdk/src.zip: /usr/lib/jvm/openjdk-8 (No such file or directory) and referenced by '//tools/jdk:jdk'.
ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.451s

Maybe we are globbing somewhere in the external repo code and it trips over the broken symlink?

@kchodorow
Copy link
Contributor

@damienmg damienmg added the P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) label Jun 11, 2015
@damienmg
Copy link
Contributor

Yes but there is a reference from //tools/jdk/jdk to /usr/lib/jvm/java-8-openjdk-amd64/src.zip (probably on everything from the java home dir). It is probably under the magic of the local_repository (symlinks?). Anyway I don't think we should try to fix that one right now except fix the documentation. It is a really weird corner case and we have other priorities.

@kchodorow
Copy link
Contributor

Oh, yeah, maybe here (if anyone wants to work on this).

damienmg added a commit that referenced this issue Jun 24, 2015
This is a dependency due to issue #69.

--
MOS_MIGRATED_REVID=96751552
collinw added a commit to google/shipshape that referenced this issue Jun 30, 2015
According to bazelbuild/bazel#69, Debian ships
a busted symlink in the openjdk-8-jdk package, and installing
openjdk-8-source fixes it.
@nodakai
Copy link

nodakai commented Dec 25, 2015

Git HEAD doesn't suffer from the dangling "src.zip" symlink although it is still created. This issue can probably be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) type: bug
Projects
None yet
Development

No branches or pull requests

8 participants