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

compile_time_options CI job fails with the latest Abseil lib #13973

Closed
rojkov opened this issue Nov 11, 2020 · 4 comments · Fixed by #14041
Closed

compile_time_options CI job fails with the latest Abseil lib #13973

rojkov opened this issue Nov 11, 2020 · 4 comments · Fixed by #14041

Comments

@rojkov
Copy link
Member

rojkov commented Nov 11, 2020

Title: compile_time_options CI job fails with the latest Abseil lib

Description:
The int128 support in SimpleAtoi introduced in abseil/abseil-cpp@4b915e7 triggers this bug in Clang: __int128_t multiply with -fsanitize=undefined fails to link (undefined reference to __muloti4)

Repro steps:

  1. update Abseil to the latest master in bazel/repository_locations.bzl;
  2. run ci/run_envoy_docker.sh 'ci/do_ci.sh bazel.compile_time_options'

Logs:
The result can be seen in this CI job's log https://dev.azure.com/cncf/envoy/_build/results?buildId=56675&view=logs&jobId=e969334a-0e55-5c18-ac96-8b546753391e&j=e969334a-0e55-5c18-ac96-8b546753391e&t=b5329a9e-93c7-5412-9f4c-6f8d659e1b57

2020-11-05T15:34:46.1334065Z ERROR: /build/tmp/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/external/envoy/test/integration/BUILD:254:14: Linking of rule '@envoy//test/integration:hotrestart_test' failed (Exit 1): clang failed: error executing command 
2020-11-05T15:34:46.1335612Z   (cd /build/tmp/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/execroot/envoy && \
2020-11-05T15:34:46.1336305Z   exec env - \
2020-11-05T15:34:46.1336703Z     BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \
2020-11-05T15:34:46.1337306Z     BAZEL_LINKLIBS=-l%:libstdc++.a \
2020-11-05T15:34:46.1337873Z     BAZEL_LINKOPTS=-lm \
2020-11-05T15:34:46.1338251Z     CC=clang \
2020-11-05T15:34:46.1338572Z     CXX=clang++ \
2020-11-05T15:34:46.1338900Z     ENVOY_ASAN=1 \
2020-11-05T15:34:46.1339237Z     ENVOY_UBSAN_VPTR=1 \
2020-11-05T15:34:46.1339644Z     PATH=/usr/sbin:/usr/bin:/sbin:/bin:/opt/llvm/bin \
2020-11-05T15:34:46.1340034Z     PWD=/proc/self/cwd \
2020-11-05T15:34:46.1340759Z   /opt/llvm/bin/clang @bazel-out/k8-dbg/bin/external/envoy/test/integration/hotrestart_test-2.params)
2020-11-05T15:34:46.1341345Z Execution platform: @rbe_ubuntu_clang//config:platform
2020-11-05T15:34:46.1341798Z ld.lld: error: undefined symbol: __muloti4
2020-11-05T15:34:46.1342380Z >>> referenced by int128_have_intrinsic.inc:251 (external/com_google_absl/absl/numeric/int128_have_intrinsic.inc:251)
2020-11-05T15:34:46.1343451Z >>>               bazel-out/k8-dbg/bin/external/com_google_absl/absl/strings/_objs/strings/numbers.pic.o:(absl::operator*(absl::int128, absl::int128))
2020-11-05T15:34:46.1344374Z clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
@lizan
Copy link
Member

lizan commented Nov 11, 2020

Seems like it's an abseil issue? Can you open an issue there too?

@rojkov
Copy link
Member Author

rojkov commented Nov 11, 2020

Yeap, filed abseil/abseil-cpp#841

@mattklein123 mattklein123 added area/build and removed bug triage Issue requires triage labels Nov 13, 2020
@derekmauro
Copy link

If I recall correctly, Abseil also ran into this problem. I think the solution was to pass --copt=-fsanitize-link-c++-runtime --linkopt=-fsanitize-link-c++-runtime to Bazel in the sanitizer build.

@rojkov
Copy link
Member Author

rojkov commented Nov 16, 2020

@derekmauro Thank you! It looks like in our case it's enough to enforce linking with libc++ instead of libstdc++ when sanitizers are enabled. I'll submit a patch to Envoy.

lizan pushed a commit that referenced this issue Nov 26, 2020
Risk Level: Low
Testing: run integration tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A
Fixes #13973

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants