Summary: | net-misc/lksctp-tools-1.0.16 with gold linker - ld: error: symbol sctp_connectx has undefined version | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeroen Roovers (RETIRED) <jer> |
Component: | Current packages | Assignee: | Luca Barbato <lu_zero> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | base-system, bug, esigra, lu_zero, l_indien, ziebell_marco |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 269315 | ||
Attachments: | net-misc:lksctp-tools-1.0.16:20141124-113421.log |
Description
Jeroen Roovers (RETIRED)
2014-11-24 11:41:12 UTC
Same issue seen here. ld.bfd and ld.gold seem to handle the version map differently. Also confirmed here. Confirmed here as well. If I switch to ld.bfd, the problem goes away. This problem, or a similar one, seems always releveant with version 1.0.19-r1 This tiny patch seems to fix this issue: --- lksctp-tools-1.0.19/src/lib/connectx.c 2021-09-01 13:05:56.966925187 +0200 +++ lksctp-tools-1.0.19/src/lib/connectx.c 2021-09-01 13:06:57.795679552 +0200 @@ -195,3 +195,6 @@ int sctp_connectx3(int fd, struct sockad return __connectx(fd, addrs, addrs_size, id); } +__attribute__(( __alias__("sctp_connectx3") )) +int sctp_connectx(int fd, struct sockaddr *addrs, int addrcnt, + sctp_assoc_t *id); Update: this fix is not compatible with LTO... It would end with a "multiple symbol definition" error at link time. Compiling with this patch would only do if using gcc without LTO as far as I can see. It seems that the proper fix is to append -fpic -fPIC and disable LTO, _this is to be confirmed_. |