-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit 23db075
authored
[envoy] fix clang18 libclang_rt linkage issue (#11980)
Envoy's UBSAN build current fails with the following error:
```
�[1A�[K�[31m�[1mERROR: �[0m/src/envoy/test/common/router/BUILD:233:21: Linking test/common/router/config_impl_test_static failed: (Exit 1): clang-18 failed: error executing command (from target //test/common/router:config_impl_test_static)
Step #23 - "compile-libfuzzer-undefined-x86_64": (cd /root/.cache/bazel/_bazel_root/4e9824db8e7d11820cfa25090ed4ed10/execroot/envoy && \
Step #23 - "compile-libfuzzer-undefined-x86_64": exec env - \
Step #23 - "compile-libfuzzer-undefined-x86_64": BAZEL_COMPILER=clang \
Step #23 - "compile-libfuzzer-undefined-x86_64": BAZEL_CXXOPTS='-stdlib=libc++' \
Step #23 - "compile-libfuzzer-undefined-x86_64": BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a \
Step #23 - "compile-libfuzzer-undefined-x86_64": BAZEL_LINKOPTS=-lm:-pthread \
Step #23 - "compile-libfuzzer-undefined-x86_64": CC=clang \
Step #23 - "compile-libfuzzer-undefined-x86_64": CXX=clang++ \
Step #23 - "compile-libfuzzer-undefined-x86_64": CXXFLAGS='-stdlib=libc++' \
Step #23 - "compile-libfuzzer-undefined-x86_64": FUZZINTRO_OUTDIR=/src \
Step #23 - "compile-libfuzzer-undefined-x86_64": LDFLAGS='-stdlib=libc++' \
Step #23 - "compile-libfuzzer-undefined-x86_64": PATH=/bin:/usr/bin:/usr/local/bin \
Step #23 - "compile-libfuzzer-undefined-x86_64": PWD=/proc/self/cwd \
Step #23 - "compile-libfuzzer-undefined-x86_64": /usr/local/bin/clang-18 @bazel-out/k8-fastbuild-ST-0a6de8256f3b/bin/test/common/router/config_impl_test_static-2.params)
Step #23 - "compile-libfuzzer-undefined-x86_64": # Configuration: bcd0434cd1f68317f811560892076634a5706878d94e6459b56108eb78a3a66e
Step #23 - "compile-libfuzzer-undefined-x86_64": # Execution platform: @local_config_platform//:host
Step #23 - "compile-libfuzzer-undefined-x86_64": ld.lld: error: undefined symbol: __ubsan_vptr_type_cache
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced by socket_interface.h:69 (./envoy/network/socket_interface.h:69)
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> bazel-out/k8-fastbuild-ST-0a6de8256f3b/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(Envoy::Network::ioHandleForAddr(Envoy::Network::Socket::Type, std::__1::shared_ptr<Envoy::Network::Address::Instance const>, Envoy::Network::SocketCreationOptions const&))
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced by shared_ptr.h:772 (/usr/local/bin/../include/c++/v1/__memory/shared_ptr.h:772)
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> bazel-out/k8-fastbuild-ST-0a6de8256f3b/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(Envoy::Network::ioHandleForAddr(Envoy::Network::Socket::Type, std::__1::shared_ptr<Envoy::Network::Address::Instance const>, Envoy::Network::SocketCreationOptions const&))
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced by gtest-internal.h:532 (external/com_google_googletest/googletest/include/gtest/internal/gtest-internal.h:532)
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> bazel-out/k8-fastbuild-ST-0a6de8256f3b/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(testing::internal::SuiteApiResolver<Envoy::Router::(anonymous namespace)::RouteMatcherTest>::GetSetUpCaseOrSuite(char const*, int))
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced 174998 more times
Step #23 - "compile-libfuzzer-undefined-x86_64":
Step #23 - "compile-libfuzzer-undefined-x86_64": ld.lld: error: undefined symbol: __ubsan_handle_dynamic_type_cache_miss_abort
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced by socket_interface.h:69 (./envoy/network/socket_interface.h:69)
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> bazel-out/k8-fastbuild-ST-0a6de8256f3b/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(Envoy::Network::ioHandleForAddr(Envoy::Network::Socket::Type, std::__1::shared_ptr<Envoy::Network::Address::Instance const>, Envoy::Network::SocketCreationOptions const&))
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced by socket_interface.h:69 (./envoy/network/socket_interface.h:69)
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> bazel-out/k8-fastbuild-ST-0a6de8256f3b/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(Envoy::Network::ioHandleForAddr(Envoy::Network::Socket::Type, std::__1::shared_ptr<Envoy::Network::Address::Instance const>, Envoy::Network::SocketCreationOptions const&))
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced by shared_ptr.h:772 (/usr/local/bin/../include/c++/v1/__memory/shared_ptr.h:772)
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> bazel-out/k8-fastbuild-ST-0a6de8256f3b/bin/test/common/router/_objs/config_impl_test_lib/config_impl_test.pic.o:(Envoy::Network::ioHandleForAddr(Envoy::Network::Socket::Type, std::__1::shared_ptr<Envoy::Network::Address::Instance const>, Envoy::Network::SocketCreationOptions const&))
Step #23 - "compile-libfuzzer-undefined-x86_64": >>> referenced 244906 more times
```
Further debugging revealed that the upgrade to clang18 caused the
breakage, due to different libclang_rt library file name. This PR fixes
this issue.
---------
Signed-off-by: Adi Suissa-Peleg <adip@google.com>1 parent 8138875 commit 23db075Copy full SHA for 23db075
File tree
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedFilter options
- projects/envoy
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedCollapse file: projects/envoy/build.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
| 44 | + | |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
|
0 commit comments