Bug 265397 - irc/irssi: nvlist_create not found
Summary: irc/irssi: nvlist_create not found
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: Daniel Engberg
URL: https://github.com/irssi/irssi/pull/1407
Keywords: regression
Depends on:
Blocks: 264838
  Show dependency treegraph
 
Reported: 2022-07-23 06:15 UTC by Charlie Li
Modified: 2022-08-20 07:33 UTC (History)
6 users (show)

See Also:
dor.bsd: maintainer-feedback+


Attachments
patch v1 (779 bytes, patch)
2022-08-18 19:42 UTC, Guido Falsi
dor.bsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Li freebsd_committer freebsd_triage 2022-07-23 06:15:48 UTC
After base 000321bab7be and base e4c36b7aa952, with CAPSICUM enabled, fails to build or run due to the titled error. Finds the header and library correctly, but not the symbol:

Checking for function "cap_enter" with dependency -lc: YES
Library nv found: YES
Checking for function "nvlist_create" with dependency -lnv: NO

meson.build:501:8: ERROR: Problem encountered: nvlist_create not found
Comment 1 Kristof Provost freebsd_committer freebsd_triage 2022-07-26 08:13:30 UTC
This appears to be because the current meson file does not include 'sys/nv.h' while testing for nvlist_create().

I changed the relevant line to:
    nvlist_create_found = libnv.found() and cc.has_function('nvlist_create', dependencies : libnv,  prefix : '#include <sys/nv.h>')

and can now compile successfully.
Comment 2 Dima Panov freebsd_committer freebsd_triage 2022-08-05 19:36:21 UTC
(In reply to Kristof Provost from comment #1)
please submit it as patch :)
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2022-08-06 06:33:46 UTC
...and submit it upstream over at GitHub
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2022-08-18 19:42:37 UTC
Created attachment 236000 [details]
patch v1

Hi,

I've created a patch implementing what is suggested in comment #1

Hope maintainer can approve it.
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2022-08-19 08:40:23 UTC
Filed patch upstream:

https://github.com/irssi/irssi/pull/1407
Comment 6 David O'Rourke 2022-08-19 10:39:52 UTC
Sorry I hadn't looked at this yet, the patch is approved now.

-David
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-08-20 07:33:24 UTC
A commit in branch main references this bug:

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

commit ab22566cfdf3becc9a5569e519a3ecab1449a755
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-08-20 07:19:45 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-08-20 07:32:11 +0000

    irc/irssi: Backport buildfix for Capsicum in -CURRENT

    After base 000321bab7be and base e4c36b7aa952 with CAPSICUM enabled
    build fails to find nvlist_create() .
    Backport upstream commit 7baefc3315e9dc11c8a3a787a3b6c6888c2b590a to
    fix this issue

    PR:             265397
    Reported by:    vishwin
    Reviewed by:    David O'Rourke <dor.bsd@xm0.uk> (maintainer)
    Tested by:      kp

 irc/irssi/Makefile | 3 +++
 irc/irssi/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2022-08-20 07:33:58 UTC
Committed, thanks everyone involved!