Building devel/basu with lld 17 results in the following link errors: cc -o libbasu.so.0 -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libbasu.so.0 -Wl,--whole-archive src/libsystemd/libsystemd_static.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now -pie -Wl,--gc-sections -fstack-protector-strong -O2 -pipe -fstack-protector-strong -fno-strict-aliasing src/basic/libbasic.a -shared -Wl,--version-script=/wrkdirs/share/dim/ports/devel/basu/work/basu-v0.2.1/src/libsystemd/libsystemd.sym -pthread -lrt -lm -Wl,--end-group cc: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument] ld: error: version script assignment of 'global' to symbol 'sd_bus_attach_event' failed: symbol not defined ld: error: version script assignment of 'global' to symbol 'sd_bus_detach_event' failed: symbol not defined ld: error: version script assignment of 'global' to symbol 'sd_bus_get_event' failed: symbol not defined cc: error: linker command failed with exit code 1 (use -v to see invocation) Those symbols mentioned in libsystemd.sym are never defined anywhere, so remove them from the linker version script.
Created attachment 245312 [details] devel/basu: fix build with lld 17
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3ff32fdca51b54be84edf47d2f1d33af96c4b8ab commit 3ff32fdca51b54be84edf47d2f1d33af96c4b8ab Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-09-28 17:36:09 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-09-28 17:47:47 +0000 devel/basu: unbreak build with LLD 17 ld: error: version script assignment of 'global' to symbol 'sd_bus_attach_event' failed: symbol not defined ld: error: version script assignment of 'global' to symbol 'sd_bus_detach_event' failed: symbol not defined ld: error: version script assignment of 'global' to symbol 'sd_bus_get_event' failed: symbol not defined PR: 274148 Reported by: antoine (via bug 273753 exp-run) devel/basu/files/patch-src_libsystemd_libsystemd.sym (new) | 14 ++++++++++++++ 1 file changed, 14 insertions(+)