librdkafka
librdkafka copied to clipboard
librdkafka cannot be built with LLD linker
Description
lds-gen.py appends rd_ut_coverage_check for linker script unconditionally. However, LLD produces a warning if coverage is disabled. This warning becomes an error since LLVM LLD 17.0.0.
ld: error: version script assignment of 'global' to symbol 'rd_ut_coverage_check' failed: symbol not defined
How to reproduce
- Install LLVM LLD 17.0.0 or newer.
- Make sure /usr/bin/ld points to LLD binary.
- Compile librdkafka with LDS enabled (default).
- Linker produces an error.
Checklist
Please provide the following information:
- [x] librdkafka version:
2.3.0
cc @emasab
FreeBSD seems to be affected as well: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275866