Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 915205

Summary: net-wireless/bluez-5.72 fails to link with clang-17: ld.lld: error: version script assignment of 'global' to symbol 'error' failed: symbol not defined
Product: Gentoo Linux Reporter: ppw0
Component: Current packagesAssignee: Pacho Ramos <pacho>
Status: CONFIRMED ---    
Severity: normal CC: gentoo.qxrin, parona, StormByte, vadorovsky
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/bluez/bluez/pull/623
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 731004, 912821    
Attachments: build log
emerge --info

Description ppw0 2023-10-05 11:17:01 UTC
Created attachment 872164 [details]
build log

In a clang-17[default-libcxx] environment, net-wireless/bluez-5.70 will fail to link during emerge with the following error message:
```
ld.lld: error: version script assignment of 'global' to symbol 'error' failed: symbol not defined
ld.lld: error: version script assignment of 'global' to symbol 'debug' failed: symbol not defined
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:6203: src/bluetoothd] Error 1
make: *** [Makefile:4556: all] Error 2
```

This can be avoided by passing "-Wl,--undefined-version" to LDFLAGS.

Attaching logs.
Comment 1 ppw0 2023-10-05 11:17:25 UTC
Created attachment 872165 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-24 11:10:33 UTC
parona, did you ever send this to the ML? (see comments on https://github.com/bluez/bluez/pull/623)
Comment 3 Agostino Sarubbo gentoo-dev 2024-02-02 15:10:15 UTC
clang-lld_tinderbox has reproduced this issue with version 5.72 - Updating summary.
Comment 4 vadorovsky 2024-02-15 13:02:23 UTC
I don't see this patch being sent to the ML. And bluez doesn't accept Github pull requests.

So far I just applied it to my private overlay and I can confirm it works:

https://gitlab.com/vadorovsky/overlay/-/commit/4f3956048938ba1aa84d19f96cfeaa06f0aa3ea9

But it would be awesome to upstream it.