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

Failure builing on ppc64le: Executing genrule filter_netty_dynamic_libs #9263

Closed
clnperez opened this issue Aug 27, 2019 · 6 comments
Closed
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug

Comments

@clnperez
Copy link
Contributor

clnperez commented Aug 27, 2019

Description of the problem / feature request:

I can no longer build bazel on Power. I'm trying to use the dist bundle and building version 0.28.1. I'm not sure what this zip error is all about:
zip error: Nothing to do! (bazel-out/ppc-opt/bin/third_party/netty_tcnative/netty-tcnative-filtered.jar)

1,242 / 1,750][Prepa] ...//:google_bytestream_bytestream_java_grpc_srcs 
SUBCOMMAND:  //third_party:filter_netty_dynamic_libs [action 'Executing genrule //third_party:filter_netty_dynamic_libs'] 
 (cd /tmp/bazel_xA2x7yX3/out/execroot/io_bazel && \ 
    exec env - \                                                                                                                                                                                    
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \                                                                                                                           
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; cp third_party/netty_tcnative/netty-tcnative-boringssl-static-2.0.24.Final.jar bazel-out/ppc-opt/bin/third_party/netty_tcnative/netty-tcnative-filtered.jar && zip -qd bazel-out/ppc-opt/bin/third_party/netty_tcnative/netty-tcnative-filtered.jar *.bogusextension')                                                  
[1,243 / 1,750] [Prepa] //third_party:filter_netty_dynamic_libs                                                                                                                        
ERROR:/bazel/third_party/BUILD:535:1: Executing genrule //third_party:filter_netty_dynamic_libs failed (Exit 12)
[1,244 / 1,750] checking cached actions
[1,244 / 1,750]  checking cached actions
zip error: Nothing to do! (bazel-out/ppc-opt/bin/third_party/netty_tcnative/netty-tcnative-filtered.jar)    Target //src:bazel_nojdk failed to build                                                                                                                                          
                                                                                                                                  
ERROR: Could not build Bazel
The command '/bin/sh -c curl -fSL -o bazel-${BAZEL_RELEASE}-dist.zip https://github.com/bazelbuild/bazel/releases/download/${BAZEL_RELEASE}/bazel-${BAZEL_RELEASE}-dist.zip &&     unzip -q bazel-$BAZEL_RELEASE-dist.zip &&     EXTRA_BAZEL_ARGS="--sandbox_debug -s --verbose_failures --host_javabase=@local_jdk//:jdk --copt=-Wno-unused-result --cxxopt=-Wno-unused-result" ./compile.sh &&     rm bazel-$BAZEL_RELEASE-dist.zip &&     mv output/bazel /usr/local/bin/. &&     cd / &&     rm -rf /bazel' 
returned a non-zero code: 1

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

I'm using this dockerfile:
https://github.com/clnperez/dockerfiles/blob/master/bazel/Dockerfile.bionic.gcc.dist
(fwiw, I've been building bazel in a container for a year maybe)

What operating system are you running Bazel on?

ubuntu bionic

@iirina iirina added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged labels Aug 28, 2019
@philwo philwo self-assigned this Sep 3, 2019
@philwo philwo added type: bug P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Sep 3, 2019
@philwo
Copy link
Member

philwo commented Sep 3, 2019

From the output I don't see what's causing the failure. Unfortunately I don't currently have a PowerPC machine to debug this, but when I get one, I'll try to reproduce.

@clnperez
Copy link
Contributor Author

clnperez commented Sep 3, 2019

@philwo you can request one here: https://osuosl.org/services/powerdev/request_hosting/
You can use me (Christy Norman) as your advocate, choose whatever distro you want (I'd recommend Ubuntu as you can apt install docker there for a recent version), and choose to have the lab create the instance/node for you.

@clnperez
Copy link
Contributor Author

clnperez commented Sep 3, 2019

actually -- it seems to just be an issue with the default here: https://github.com/bazelbuild/bazel/blob/0.28.1/third_party/BUILD#L528-L530

my experiment:

christy@christy-t480 zipdeletetest> zip test.zip *
  adding: a (stored 0%)
  adding: a.ext (stored 0%)
  adding: b (stored 0%)
  adding: b.ext (stored 0%)
  adding: c.delete (stored 0%)
christy@christy-t480 zipdeletetest> zip -d test.zip "*.bogus"
        zip warning: name not matched: *.bogus

zip error: Nothing to do! (test.zip)
christy@christy-t480 zipdeletetest> zip -d test.zip "*.delete"
deleting: c.delete

@clnperez
Copy link
Contributor Author

clnperez commented Sep 6, 2019

submitted #9346 to work around for power

@clnperez
Copy link
Contributor Author

clnperez commented Oct 3, 2019

closing as that fix was merged 🎉

@clnperez clnperez closed this as completed Oct 3, 2019
@clnperez
Copy link
Contributor Author

clnperez commented Oct 7, 2019

j/k. half-merged. reopening.

@clnperez clnperez reopened this Oct 7, 2019
@clnperez clnperez closed this as completed Oct 8, 2019
bazel-io pushed a commit that referenced this issue Feb 12, 2020
…ding something to delete)

Build on s390x fails because the process to remove unnecessary libraries from netty was not configured for x86.  As a result, zip -d failed because it had nothing to remove.  This PR does two things:

1.  Adds conditions for s390x to the src and third_party BUILD files, and
2.  Adds a condition to the genrule so that 'zip -d' does not execute if there's nothing to do.

See also Issue #9263; Pull Requests #9346 and #9945

Closes #10643.

PiperOrigin-RevId: 294698707
bazel-io pushed a commit that referenced this issue Feb 17, 2020
Continuation of PR #10643 for application to third_party directory

Build on s390x fails because the process to remove unnecessary libraries from netty was not configured for x86. As a result, zip -d failed because it had nothing to remove. This PR does two things:

Adds conditions for s390x to the src and third_party BUILD files, and
Adds a condition to the genrule so that 'zip -d' does not execute if there's nothing to do.

See also Issue #9263; Pull Requests #9346 and #9945

Closes #10798.

Signed-off-by: Philipp Wollermann <philwo@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug
Projects
None yet
Development

No branches or pull requests

3 participants