Skip to content

Commit

Permalink
Don't use generated linker script when build Kafka client library (en…
Browse files Browse the repository at this point in the history
…voyproxy#38157)

Commit Message:

The linker script generator that comes with the library is not quite
correct and as a result sometimes generates symbols that are not
exported by the library (see
confluentinc/librdkafka#4593). Since LLVM
version 17 it results in a link failure.

There is a fix sent upstream for this, but the PR fixing the issue has
been out since October 2024 and didn't get any attention and I couldn't
get maintainers of the library to look at the PR or the related bug
either. So for now, I'm just disabling the use of linker script when
building Kafka client library all together to work around the issue on
our side.

I couldn't find the rationale for using custom linker script in the
first place, but from what I can see in the upstream repo the linker
script that they generate and use is a version script. And looking at
the docs (see

https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html)
it looks like this script only really matters when building a shared
library.

If I'm correct, then we don't really care about this, as we build and
link Envoy statically with the Kafka client library anyways. At the very
least I didn't notice any issues because of this change in my tests.

related to work in envoyproxy#37911 

Signed-off-by: Mikhail Krinkin <[email protected]>
  • Loading branch information
krinkinmu authored and bazmurphy committed Jan 29, 2025
1 parent f3c534c commit dc28481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bazel/foreign_cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ configure_make(
],
tags = ["skip_on_windows"],
targets = [
"ARFLAGS='' libs install-subdirs",
"ARFLAGS='' WITH_LDS='n' libs install-subdirs",
],
deps = [":lz4"],
alwayslink = True,
Expand Down

0 comments on commit dc28481

Please sign in to comment.