Skip to content

0.17.1 FTBFS: No such file or directory java-atk-wrapper.jar in DumpPlatformClassPath #6150

Closed

Description

@vbatts

Description of the problem / feature request:

the 0.17.1 tag fails to build from source

+ ./compile.sh
🍃  Building Bazel from scratch......
🍃  Building Bazel with Bazel.
.WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
INFO: Analysed target //src:bazel_nojdk (224 packages loaded).
INFO: Found 1 target...
INFO: From Compiling src/main/cpp/blaze_util_posix.cc:
src/main/cpp/blaze_util_posix.cc: In function 'void blaze::Daemonize(const char*, bool)':
src/main/cpp/blaze_util_posix.cc:270:13: warning: ignoring return value of 'int dup(int)', declared with attribute warn_unused_result [-Wunused-result]
   (void) dup(STDOUT_FILENO);  // stderr (2>&1)
          ~~~^~~~~~~~~~~~~~~
src/main/cpp/blaze_util_posix.cc: In function 'void blaze::DieAfterFork(const char*)':
src/main/cpp/blaze_util_posix.cc:317:8: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   write(STDERR_FILENO, message, strlen(message));  // strlen should be OK
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main/cpp/blaze_util_posix.cc:318:8: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   write(STDERR_FILENO, ": ", 2);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
src/main/cpp/blaze_util_posix.cc:319:8: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   write(STDERR_FILENO, error_string, strlen(error_string));
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main/cpp/blaze_util_posix.cc:320:8: warning: ignoring return value of 'ssize_t write(int, const void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
   write(STDERR_FILENO, "\n", 1);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
src/main/cpp/blaze_util_posix.cc: In function 'uint64_t blaze::AcquireLock(const string&, bool, bool, blaze::BlazeLock*)':
src/main/cpp/blaze_util_posix.cc:678:19: warning: ignoring return value of 'int ftruncate(int, __off_t)', declared with attribute warn_unused_result [-Wunused-result]
   (void) ftruncate(lockfd, 0);
          ~~~~~~~~~^~~~~~~~~~~
ERROR: /root/rpmbuild/BUILD/bazel-0.17.1/tools/jdk/BUILD:180:5: Executing genrule //tools/jdk:platformclasspath8 failed (Exit 1): bash failed: error executing command
  (cd /tmp/bazel_6yPZufvk/out/execroot/io_bazel && \
  exec env - \
    PATH=/sbin:/bin:/usr/sbin:/usr/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;
set -eu
TMPDIR=$(mktemp -d -t tmp.XXXXXXXX)
external/embedded_jdk/bin/javac -source 8 -target 8     -Xlint:-options     -cp external/embedded_jdk/lib/tools.jar     -d $TMPDIR tools/jdk/DumpPlatformClassPath.java
external/embedded_jdk/bin/java -XX:+IgnoreUnrecognizedVMOptions     --add-exports=jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED     -cp $TMPDIR DumpPlatformClassPath 8 bazel-out/host/genfiles/tools/jdk/platformclasspath8.jar
rm -rf $TMPDIR
')
Exception in thread "main" java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181.b15-0.fc28.x86_64/jre/lib/ext/java-atk-wrapper.jar (No such file or directory)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:225)
        at java.util.zip.ZipFile.<init>(ZipFile.java:155)
        at java.util.jar.JarFile.<init>(JarFile.java:166)
        at java.util.jar.JarFile.<init>(JarFile.java:130)
        at DumpPlatformClassPath.main(DumpPlatformClassPath.java:99)
Target //src:bazel_nojdk failed to build
INFO: Elapsed time: 13.418s, Critical Path: 3.04s
INFO: 157 processes: 157 local.
FAILED: Build did NOT complete successfully

ERROR: Could not build Bazel
error: Bad exit status from /var/tmp/rpm-tmp.qbJeNt (%build)

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

git clone https://github.com/vbatts/copr-build-bazel.git
cd copr-build-bazel
make rebuild

What operating system are you running Bazel on?

Fedora 28

Activity

  1. cushon commented on Sep 14, 2018

    @cushon
    Contributor
    Exception in thread "main" java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181.b15-0.fc28.x86_64/jre/lib/ext/java-atk-wrapper.jar (No such file or directory)
            at java.util.zip.ZipFile.open(Native Method)
            at java.util.zip.ZipFile.<init>(ZipFile.java:225)
            at java.util.zip.ZipFile.<init>(ZipFile.java:155)
            at java.util.jar.JarFile.<init>(JarFile.java:166)
            at java.util.jar.JarFile.<init>(JarFile.java:130)
            at DumpPlatformClassPath.main(DumpPlatformClassPath.java:99)
    

    This looks related to 2834613.

  2. added
    team-Rules-Java
    on Sep 14, 2018
  3. cushon commented on Sep 14, 2018

    @cushon
    Contributor

    @vbatts can you check if /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181.b15-0.fc28.x86_64/jre/lib/ext/java-atk-wrapper.jar exists on your system? Any chance it's a dangling symlink?

    The root cause might be similar to #400.

  4. self-assigned this
    on Sep 14, 2018
  5. changed the title [-]0.17.1 FTBFS[/-] [+]0.17.1 FTBFS: No such file or directory java-atk-wrapper.jar in DumpPlatformClassPath[/+] on Sep 14, 2018
  6. cushon commented on Sep 26, 2018

    @cushon
    Contributor

    @vbatts are you still seeing this problem?

  7. vbatts commented on Oct 10, 2018

    @vbatts
    Author

    The updated release compiled fine.

  8. nitkon commented on Mar 16, 2019

    @nitkon

    @cushon : I am trying to build bazel from scratch on Fedora 28.

    INFO: From JavacBootstrap src/java_tools/singlejar/java/com/google/devtools/build/singlejar/libbootstrap.jar [for host]:
    warning: Implicitly compiled files were not subject to annotation processing.
      Use -proc:none to disable annotation processing or -implicit to specify a policy for implicit compilation.
    1 warning
    ERROR: /root/nitesh/split_patch/src/github.com/abc/tools/jdk/BUILD:257:1: SkylarkAction tools/jdk/platformclasspath.jar failed (Exit 1): java failed: error executing command 
      (cd /tmp/bazel_yMe0ymVp/out/execroot/io_bazel && \
      exec env - \
      external/local_jdk/bin/java -XX:+IgnoreUnrecognizedVMOptions '--add-exports=jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED' -cp bazel-out/host/bin/tools/jdk/platformclasspath_classes:external/local_jdk/lib/tools.jar DumpPlatformClassPath bazel-out/host/bin/tools/jdk/platformclasspath.jar external/local_jdk)
    Execution platform: @bazel_tools//platforms:host_platform
    Exception in thread "main" java.io.FileNotFoundException: external/local_jdk/jre/lib/ext/java-atk-wrapper.jar (No such file or directory)
    	at java.util.zip.ZipFile.open(Native Method)
    	at java.util.zip.ZipFile.<init>(ZipFile.java:225)
    	at java.util.zip.ZipFile.<init>(ZipFile.java:155)
    	at java.util.jar.JarFile.<init>(JarFile.java:166)
    	at java.util.jar.JarFile.<init>(JarFile.java:130)
    	at DumpPlatformClassPath.writeClassPathJars(DumpPlatformClassPath.java:159)
    	at DumpPlatformClassPath.dumpJDK8BootClassPath(DumpPlatformClassPath.java:77)
    	at DumpPlatformClassPath.main(DumpPlatformClassPath.java:65)
    Target //src:bazel_nojdk failed to build
    INFO: Elapsed time: 69.184s, Critical Path: 15.81s
    INFO: 471 processes: 471 local.
    FAILED: Build did NOT complete successfully
    
    [root@abc]# ls -lrt /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.fc28.ppc64le/jre/lib/ext/java-atk-wrapper.jar 
    lrwxrwxrwx 1 root root 48 Mar 29  2018 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.fc28.ppc64le/jre/lib/ext/java-atk-wrapper.jar -> /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

team-Rules-Java

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions