confluentinc / librdkafka

The Apache Kafka C/C++ library
Other
268 stars 3.15k forks source link

librdkafka cannot be built with LLD linker #4593

Open artem opened 9 months ago

artem commented 9 months ago

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

  1. Install LLVM LLD 17.0.0 or newer.
  2. Make sure /usr/bin/ld points to LLD binary.
  3. Compile librdkafka with LDS enabled (default).
  4. Linker produces an error.

Checklist

Please provide the following information:

artem commented 8 months ago

cc @emasab

artem commented 8 months ago

FreeBSD seems to be affected as well: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275866

nassibnassar commented 3 weeks ago

4862 fixes the problem for me on FreeBSD 14.1.