Bug 274148 - devel/basu: fix build with lld 17
Summary: devel/basu: fix build with lld 17
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jan Beich
URL:
Keywords:
Depends on:
Blocks: 273753
  Show dependency treegraph
 
Reported: 2023-09-28 17:40 UTC by Dimitry Andric
Modified: 2023-09-28 17:51 UTC (History)
0 users

See Also:
jbeich: maintainer-feedback+


Attachments
devel/basu: fix build with lld 17 (845 bytes, patch)
2023-09-28 17:40 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2023-09-28 17:40:09 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-09-28 17:40:28 UTC
Created attachment 245312 [details]
devel/basu: fix build with lld 17
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-09-28 17:48:52 UTC
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(+)