Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915152 - net-libs/libnsl-2.0.0-r1 fails to link with clang-17: ld.lld: error: version script assignment of 'LIBNSL_2.0' to symbol 'xdr_ypcall' failed: symbol not defined
Summary: net-libs/libnsl-2.0.0-r1 fails to link with clang-17: ld.lld: error: version ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LD-is-lld, systemwide-lld 912821
  Show dependency tree
 
Reported: 2023-10-03 23:33 UTC by ppw0
Modified: 2023-10-13 15:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (net-libs:libnsl-2.0.0-r1:20231003-224855.log,27.06 KB, text/x-log)
2023-10-03 23:33 UTC, ppw0
Details
emerge --info (emerge_info.log,7.38 KB, text/x-log)
2023-10-03 23:34 UTC, ppw0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-10-03 23:33:23 UTC
Created attachment 872113 [details]
build log

In a clang-17[default-libcxx] environment, libnsl-2.0.0-r1 will fail to link during emerge:
```
ld.lld: error: version script assignment of 'LIBNSL_2.0' to symbol 'xdr_ypcall' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBNSL_PRIVATE' to symbol '__create_ib_request' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBNSL_PRIVATE' to symbol '__do_niscall3' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBNSL_PRIVATE' to symbol '__follow_path' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBNSL_PRIVATE' to symbol '__nisbind_destroy' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBNSL_PRIVATE' to symbol '__prepare_niscall' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBNSL_PRIVATE' to symbol '_xdr_ib_request' failed: symbol not defined
ld.lld: error: version script assignment of 'LIBNSL_PRIVATE' to symbol '_xdr_nis_result' failed: symbol not defined
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:463: libnsl.la] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-libs/libnsl-2.0.0-r1/work/libnsl-2.0.0-abi_x86_64.amd64/src'
make[1]: *** [Makefile:489: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-libs/libnsl-2.0.0-r1/work/libnsl-2.0.0-abi_x86_64.amd64'
make: *** [Makefile:398: all] Error 2
```

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

Attaching logs.
Comment 1 ppw0 2023-10-03 23:34:22 UTC
Created attachment 872114 [details]
emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2023-10-13 15:00:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d0d7e7a046fb6b188beb9695fe6545338b1e730

commit 5d0d7e7a046fb6b188beb9695fe6545338b1e730
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-13 14:24:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-13 14:59:49 +0000

    net-libs/libnsl: add 2.0.1
    
    Closes: https://bugs.gentoo.org/915152
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/libnsl/Manifest            |  1 +
 net-libs/libnsl/libnsl-2.0.1.ebuild | 47 +++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)