envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.71k stars 4.75k forks source link

clang-15 boringssl fips link failure #23784

Open keith opened 1 year ago

keith commented 1 year ago

Building with bazelisk build envoy -c opt --config=clang --define=boringssl=fips on 851606902390f9e650002538114f89ab95596ab4:

ld.lld: error: cannot preempt symbol: bssl::internal::DeleterImpl<stack_st_CRYPTO_BUFFER, void>::Free(stack_st_CRYPTO_BUFFER*)::'lambda'(void (*)(void*), void*)::__invoke(void (*)(void*), void*)
>>> defined in bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a(ssl_cert.cc.o)
>>> referenced by stack.h:460 (../ssl/../include/openssl/stack.h:460)
>>>               ssl_cert.cc.o:(bssl::CERT::~CERT()) in archive bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a

ld.lld: error: cannot preempt symbol: bssl::internal::DeleterImpl<stack_st_CRYPTO_BUFFER, void>::Free(stack_st_CRYPTO_BUFFER*)::'lambda'(void (*)(void*), void*)::__invoke(void (*)(void*), void*)
>>> defined in bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a(ssl_cert.cc.o)
>>> referenced by stack.h:460 (../ssl/../include/openssl/stack.h:460)
>>>               ssl_cert.cc.o:(bssl::ssl_cert_clear_certs(bssl::CERT*)) in archive bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a

ld.lld: error: cannot preempt symbol: sk_CRYPTO_BUFFER_call_copy_func
>>> defined in bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a(ssl_cert.cc.o)
>>> referenced by pool.h:34 (../ssl/../include/openssl/pool.h:34)
>>>               ssl_cert.cc.o:(bssl::ssl_cert_dup(bssl::CERT*)) in archive bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a

ld.lld: error: relocation R_X86_64_32 cannot be used against local symbol; recompile with -fPIC
>>> defined in bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a(ssl_cert.cc.o)
>>> referenced by pool.h:34 (../ssl/../include/openssl/pool.h:34)
>>>               ssl_cert.cc.o:(bssl::ssl_cert_dup(bssl::CERT*)) in archive bazel-out/k8-opt/bin/external/boringssl_fips/ssl/libssl.a

...
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

krissell commented 1 year ago

Hi @keith , did you ever make it past this? I'm hitting something similar. Thanks

keith commented 1 year ago

I don't think so

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

sayboras commented 9 months ago

I have a similar issue when trying to build envoy with clang as well.

krissell commented 9 months ago

I have a similar issue when trying to build envoy with clang as well.

In my case, I unset a bunch of env vars in the patch file which seemed to be interfering with the boring ssl build

unset LDFLAGS
unset BAZEL_CXXOPTS
unset BAZEL_COMPILER
unset BAZEL_LINKLIBS
unset CXXFLAGS
unset LLVM_CONFIG
unset CXX
unset BAZEL_LINKOPTS
unset CLANG_FORMAT
unset CC