Bug 274089 - devel/gamin: fix build with lld 17
Summary: devel/gamin: 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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 273753
  Show dependency treegraph
 
Reported: 2023-09-25 19:25 UTC by Dimitry Andric
Modified: 2023-10-06 17:56 UTC (History)
1 user (show)

See Also:


Attachments
devel/gamin: fix build with lld 17 (709 bytes, patch)
2023-09-25 19:26 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-25 19:25:11 UTC
Building devel/gamin with lld 17 results in the following link error:

cc -shared  .libs/gam_api.o .libs/gam_data.o .libs/gam_fork.o .libs/gam_error.o .libs/gam_event.o  -lpthread -L/usr/local/lib  -fstack-protector-strong -Wl,--version-script=./gamin_sym.version -fstack-protector-strong -Wl,-soname -Wl,libfam.so.0 -o .libs/libfam.so.0.0.0
ld: error: version script assignment of 'global' to symbol 'FAMDebugLevel' failed: symbol not defined
ld: error: version script assignment of 'global' to symbol 'FAMDebug' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocation)

This is because the FAMDebugLevel and FAMDebug symbols are only defined when gamin is configured with --enable-debug, which we have no option for in the port.

So fix it by removing the undefined symbols from the linker version script.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-09-25 19:26:03 UTC
Created attachment 245230 [details]
devel/gamin: fix build with lld 17
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-10-03 04:34:52 UTC
Port has no maintainer, knock yourself out.
LGMT for ports from my side.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-10-06 17:52:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9b934eb81abe3155ced3ea0a592b6256169ea595

commit 9b934eb81abe3155ced3ea0a592b6256169ea595
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-09-25 19:19:43 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-10-06 17:48:53 +0000

    devel/gamin: fix build with lld 17

    Building devel/gamin with lld 17 results in the following link error:

      cc -shared  .libs/gam_api.o .libs/gam_data.o .libs/gam_fork.o .libs/gam_error.o .libs/gam_event.o  -lpthread -L/usr/local/lib  -fstack-protector-strong -Wl,--version-script=./gamin_sym.version -fstack-protector-strong -Wl,-soname -Wl,libfam.so.0 -o .libs/libfam.so.0.0.0
      ld: error: version script assignment of 'global' to symbol 'FAMDebugLevel' failed: symbol not defined
      ld: error: version script assignment of 'global' to symbol 'FAMDebug' failed: symbol not defined
      cc: error: linker command failed with exit code 1 (use -v to see invocation)

    This is because the FAMDebugLevel and FAMDebug symbols are only defined
    when gamin is configured with --enable-debug, which we have no option
    for in the port.

    So fix it by removing the undefined symbols from the linker version
    script.

    PR:             274089
    MFH:            2023Q4

 devel/gamin/files/patch-libgamin_gamin__sym.version (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)