Skip to content
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

librdkafka cannot be built with LLD linker #4593

Open
1 task done
artem opened this issue Jan 28, 2024 · 3 comments · May be fixed by #4862
Open
1 task done

librdkafka cannot be built with LLD linker #4593

artem opened this issue Jan 28, 2024 · 3 comments · May be fixed by #4862

Comments

@artem
Copy link

artem commented Jan 28, 2024

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:

  • librdkafka version: 2.3.0
@artem
Copy link
Author

artem commented Mar 5, 2024

cc @emasab

@artem
Copy link
Author

artem commented Mar 5, 2024

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

StephanDollberg added a commit to StephanDollberg/librdkafka that referenced this issue Oct 4, 2024
Define `rd_ut_coverage_check` even in non-devel mode as the `lds-gen.py`
script adds the symbol unconditionally.

Otherwise LLD complains about ld:

```
error: version script assignment of 'global' to symbol 'rd_ut_coverage_check' failed: symbol not defined
```

Fixes confluentinc#4593
@StephanDollberg StephanDollberg linked a pull request Oct 4, 2024 that will close this issue
StephanDollberg added a commit to StephanDollberg/librdkafka that referenced this issue Oct 4, 2024
Define `rd_ut_coverage_check` even in non-devel mode as the `lds-gen.py`
script adds the symbol unconditionally.

Otherwise LLD complains about ld:

```
error: version script assignment of 'global' to symbol 'rd_ut_coverage_check' failed: symbol not defined
```

Fixes confluentinc#4593
StephanDollberg added a commit to StephanDollberg/librdkafka that referenced this issue Oct 4, 2024
Define `rd_ut_coverage_check` even in non-devel mode as the `lds-gen.py`
script adds the symbol unconditionally.

Otherwise LLD complains about ld:

```
error: version script assignment of 'global' to symbol 'rd_ut_coverage_check' failed: symbol not defined
```

Fixes confluentinc#4593
@nassibnassar
Copy link

#4862 fixes the problem for me on FreeBSD 14.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants