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

bazel-0.23.0 fail to build /examples/cpp-tutorial/stage2 with --all_incompatible_changes option #7550

Closed
soonho-tri opened this issue Feb 26, 2019 · 3 comments
Labels
P1 I'll work on this now. (Assignee required)

Comments

@soonho-tri
Copy link

soonho-tri commented Feb 26, 2019

Description of the problem / feature request:

bazel-0.23.0 fails to build https://github.com/bazelbuild/examples/tree/master/cpp-tutorial/stage2 with --all_incompatible_changes option.

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

Steps:

git clone https://github.com/bazelbuild/examples/
cd examples/cpp-tutorial/stage2
bazel build //... --all_incompatible_changes

Output:

/examples/cpp-tutorial/stage2/main/BUILD:1:1: Linking of rule '//main:hello-greet' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -shared -o bazel-out/k8-fastbuild/bin/main/libhello-greet.so -Wl,-S '-fuse-ld=gold' -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -pass-exit-codes -Wl,--gc-sections ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/main/_objs/hello-greet/hello-greet.pic.o: requires dynamic R_X86_64_PC32 reloc against '_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/main/_objs/hello-greet/hello-greet.pic.o: requires dynamic R_X86_64_32 reloc against '__gxx_personality_v0' which may overflow at runtime; recompile with -fPIC
collect2: error: ld returned 1 exit status
INFO: Elapsed time: 3.507s, Critical Path: 0.31s
INFO: 3 processes: 3 linux-sandbox.
FAILED: Build did NOT complete successfully

What operating system are you running Bazel on?

Ubuntu 16.04.6 LTS

What's the output of bazel info release?

release 0.23.0

@keith
Copy link
Member

keith commented Feb 26, 2019

This could be because of this flag flipping #7007

@laurentlb laurentlb added the P1 I'll work on this now. (Assignee required) label Feb 26, 2019
@laurentlb
Copy link
Contributor

cc @hlopko @oquenchil

@hlopko
Copy link
Member

hlopko commented Feb 26, 2019

This is the bug that caused #6861 to be postponed til 0.24. Since the flag is not in its migration window, this is all fine. Please don't use --all_incompatible_changes, if you need an automated way of testing all incomping incompatible changes use bazelisk and --strict: https://github.com/philwo/bazelisk#other-features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required)
Projects
None yet
Development

No branches or pull requests

4 participants