Bug 298008 - security/keepassxc: fails to build on 16 past src@749318f2ae56
Summary: security/keepassxc: fails to build on 16 past src@749318f2ae56
Status: In Progress
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: 2026-08-28 05:50 UTC by Dan Kotowski
Modified: 2026-09-10 06:28 UTC (History)
5 users (show)

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


Attachments
poudriere bulk -j FreeBSD:16:amd64 -p latest security/keepassxc (727.81 KB, text/plain)
2026-08-28 05:50 UTC, Dan Kotowski
no flags Details
patch to fix libusb build (1.45 KB, patch)
2026-09-01 15:48 UTC, Kenneth Raplee
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kotowski 2026-08-28 05:50:49 UTC
Created attachment 274198 [details]
poudriere bulk -j FreeBSD:16:amd64 -p latest security/keepassxc

16-CURRENT added capsicum support to libusb in src commit 749318f2ae56. Building keepassxc now emits the following error:

/wrkdirs/usr/ports/security/keepassxc/work/keepassxc-2.7.12/src/gui/osutils/nixutils/DeviceListenerLibUsb.cpp:116:26: error: reinterpret_cast from 'Handle' (aka 'long long') to 'libusb_hotplug_callback_handle' (aka 'int') is not allowed

I suspect we can fix this with something similar to what was done for sysutils/smartmontools in @0937ce481bde18171222f1195962091c4678a95d

https://cgit.freebsd.org/ports/commit/?id=0937ce481bde18171222f1195962091c4678a95d
Comment 1 Tomoaki AOKI 2026-08-30 00:25:52 UTC
Me, too, bitten by this issue.
Putting fixes aside, if you don't need YUBIKEY option enabled, disabling it worked around this for me.

And searching Internet, found this.
  https://www.reddit.com/r/cpp_questions/comments/1tl0d1k/better_alternative_to_reinterpret_cast/

But unfortunately, I'm not good at C++ (still sticking with C).
Search using Google suggests -fno-strict-aliasing option to compile.
  https://www.google.com/search?client=firefox-b-d&q=option+to+allow+casting+from+long+long+pointer+to+int+pointer+using+reinterpret_cast+on+clang%2B%2B%3F

But the build option seems to be already active, so wouldn't work.
Comment 2 Kenneth Raplee freebsd_committer freebsd_triage 2026-09-01 15:48:54 UTC
Created attachment 274336 [details]
patch to fix libusb build

This seems to fix it for me based on Dan's suggestion.
Comment 3 ish 2026-09-10 06:28:05 UTC
(In reply to Kenneth Raplee from comment #2)
Thank you.
This patch works fine on 1600023.