Skip to content

Loading of target 'JavaBuilder_deploy.jar' failed (RHEL 6.7) #925

@drgriffis

Description

@drgriffis

I'm working on building bazel for downstream installation of TensorFlow. Platform is an RHEL 6.7 server, with local installations of gcc (5.2.1), java (1.8.0_25), etc.

I've followed the edit steps from @sethbruder's excellent answer to #649, which change the resource paths in tools/cpp/CROSSTOOL and src/test/java/com/google/devtools/build/lib/MOCK_CROSSTOOL to my local installations. I've also added all the flags I could think of to the beginning of the compile.sh script:

export LDFLAGS="-Wl,-rpath,/opt/rh/devtoolset-4/root/usr/lib64"
export CC="/opt/rh/devtoolset-4/root/usr/bin/gcc"
export CXX="/opt/rh/devtoolset-4/root/usr/bin/g++"
export JAVA_HOME="/u/drspeech/opt/jdks/jdk1.8.0_25"
export LD_LIBRARY_PATH="/opt/rh/devtoolset-4/root/usr/lib:${LD_LIBRARY_PATH}"
export BAZEL_ARGS="--verbose_failures"
export BAZEL_ARGS="${BAZEL_ARGS} --linkopt=-Wl,-rpath,/opt/rh/devtoolset-4/root/usr/lib64"
export BAZEL_ARGS="${BAZEL_ARGS} --linkopt=-Wl,-rpath,/u/drspeech/opt/jdks/jdk1.8.0_25/lib"

This has gotten me pretty far from where I started, but I'm now having a build error when running compile.sh, complaining that target 'JavaBuilder_deploy.jar' not declared in package 'tools/jdk'. The full output is below:

�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.
.WARNING: Output base '/homes/2/griffisd/.cache/bazel/_bazel_griffisd/0c351f5da62226ebed1a9ea812ccda52' is on NFS. This may lead to surprising failures and undetermined behavior.
Extracting Bazel installation...
Sending SIGTERM to previous Bazel server (pid=14925)... done.
........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
____Loading package: src
____Loading...
____Loading package: tools/defaults
____Loading package: @bazel_tools//tools/cpp
____Loading package: src/main/cpp/util
ERROR: Loading of target '@bazel_tools//tools/jdk:JavaBuilder_deploy.jar' failed; build aborted: no such target '@bazel_tools//tools/jdk:JavaBuilder_deploy.jar': target 'JavaBuilder_deploy.jar' not declared in package 'tools/jdk' defined by /homes/2/griffisd/.cache/bazel/_bazel_griffisd/0c351f5da62226ebed1a9ea812ccda52/external/bazel_tools/tools/jdk/BUILD.
ERROR: Loading failed; build aborted.
____Elapsed time: 1.511s

Building output/bazel

Just to make it more fun, it's not always JavaBuilder_deploy.jar: I've also seen it complain about ijar and SingleJar_deploy.jar on different runs, from the same tools/jdk area. All of those files are mentioned in the tools/jdk/BUILD file, which I have not modified.

This has occurred with releases 0.1.1, 0.1.4, and 0.1.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions