-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Broken build with static libraries #2831
Comments
before v1.3, easy to build alpine image: |
Librdkafka is included as a static object since v1.4.0, should be sufficient to build your app with |
@edenhill With
With |
If you are building for Alpine (musl) you will most likely need to build in an Alpine docker container so that the Go toolchain picks up the correct C library to link. |
Wait, that's not what the initial issue was about. Unless this has been addressed somehow (see issue description), I think this issue should be kept open. |
Whoops, sorry! |
Has this issue been addressed? |
Build in an Alpine container solved this issue, but can anyone provide some instructions on building on a Linux dev machine? |
Description
Starting with 1.4.0, the
pkg-config
file installed by the build does not point to the expectedlibrdkafka.a
but to a missinglibrdkafka-static.a
.I believe the regression was introduced by 86461c0
How to reproduce
/usr/local/lib
containslibrdkafka.a
/usr/local/lib/pkgconfig/rdkafka-static.pc
points tolibrdkakfa-static.a
but it is not installedlibrdkafka < 1.4.0
rdkafka-static.pc
points tolibrdkafka.a
Those exact same steps work without any issue in librdkafka < 1.4.0 and allow me to use
static
build flavor with theconfluent-kafka-go
wrapper library.The reason why I can't use the fully static build
librdkafka-static.a
is because my Go program uses another C library that depends on LZ4. If both libs are built statically, the final linker stage complains about duplicate symbols.Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
1.4.0
<REPLACE with e.g., 0.10.2.3>
<REPLACE with e.g., message.timeout.ms=123, auto.reset.offset=earliest, ..>
Ubuntu 16.04
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: