Bug 264225 - security/keepassxc: Fix build on recent head (after lld 14 import)
Summary: security/keepassxc: Fix build on recent head (after lld 14 import)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Li-Wen Hsu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-25 08:17 UTC by Guido Falsi
Modified: 2022-06-01 13:43 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (lwhsu)


Attachments
patch v1 (1.01 KB, patch)
2022-05-25 08:17 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer freebsd_triage 2022-05-25 08:17:21 UTC
Created attachment 234197 [details]
patch v1

Hi,

I upgraded to latest head and keepassxc now fails to build.

Attached patch addresses the issue. I did not make it conditional on the OS version because it seems to make no difference.

The problem is lld refusing an option which it was accepting but I could not find any documentation for, so I guess it was a compatibility nop before.

on 13.1:

> ld --no-add-needed
ld: error: no input files

on head after 1400059:

> ld --no-add-needed
ld: error: unknown argument '--no-add-needed'


so my patch simply removes that option from the command line.

If required I can make it depend on __FreeBSD_version, by moving from a patch to a reinplace command in the Makefile, but as I said it looks like this linker option is actually a nop.
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-05-29 16:26:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=19ceed92123e6e2612056b42566974421b6834de

commit 19ceed92123e6e2612056b42566974421b6834de
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-05-29 16:23:58 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2022-05-29 16:23:58 +0000

    security/keepassxc: Fix build on recent head (after lld 14 import)

    PR:             264225

 security/keepassxc/files/patch-CMakeLists.txt (new) | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2022-05-29 16:28:06 UTC
(In reply to Guido Falsi from comment #0)
Thanks for the patch, after reading some more documents and testing, I think it might be able to be replaced by `--no-copy-dt-needed-entries` to keep the compatibility with GNU ld and easier to be accepted by upstream.  I'll work on this more.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-05-29 16:32:03 UTC
A commit in branch 2022Q2 references this bug:

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

commit b6b7a839ea2af3df87446a9acd42d78b8a016757
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-05-29 16:23:58 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2022-05-29 16:31:29 +0000

    security/keepassxc: Fix build on recent head (after lld 14 import)

    PR:             264225
    (cherry picked from commit 19ceed92123e6e2612056b42566974421b6834de)

 security/keepassxc/files/patch-CMakeLists.txt (new) | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2022-06-01 13:43:28 UTC
Thanks!