Bug 297564 - sysutils/smartmontools: fix build after base 749318f2ae56
Summary: sysutils/smartmontools: fix build after base 749318f2ae56
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Oleksii Samorukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-08-15 22:33 UTC by Dimitry Andric
Modified: 2026-09-04 06:15 UTC (History)
6 users (show)

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


Attachments
sysutils/smartmontools: fix build after base 749318f2ae56 (2.08 KB, patch)
2026-08-15 22:34 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 2026-08-15 22:33:11 UTC
After base 749318f2ae56127abdffee405f8f4658efa1c807 ("libusb:
capsicumize libusb"), sysutils/smartmontools fails to build with errors
similar to:

  os_freebsd.cpp:2227:9: error: no matching function for call to 'libusb20_be_alloc_default'
   2227 |   pbe = libusb20_be_alloc_default();
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~
  /usr/include/libusb20.h:299:26: note: candidate function not viable: requires single argument 'pctx', but no arguments were provided
    299 | struct libusb20_backend *libusb20_be_alloc_default(struct libusb20_be_ctx *pctx);
        |                          ^                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.

This is because base 749318f2ae56127abdffee405f8f4658efa1c807 changed
the prototype for libusb20_be_alloc_default() to add a "struct
libusb20_be_ctx *pctx" parameter. It looks like passing NULL is fine in
this case.

Since there was no separate __FreeBSD_version bump for this libusb
refactoring, use base f77fa28422ee455580d44498a4f36c6418e96dd0 ("video:
bump __FreeBSD_version for video(4) refactor") instead, which was
committed one day later.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2026-08-15 22:34:33 UTC
Created attachment 273804 [details]
sysutils/smartmontools: fix build after base 749318f2ae56
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2026-08-16 03:36:35 UTC
This should go upstream?
https://github.com/smartmontools/smartmontools/
Comment 3 ShengYi Hung freebsd_committer freebsd_triage 2026-08-17 08:39:34 UTC
(In reply to Dimitry Andric from comment #1)

I bump the LIBUSB_VERSION in the different patch but at the very close time. Would it be better to check that?
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2026-08-17 18:21:41 UTC
(In reply to ShengYi Hung from comment #3)
Unfortunately, LIBUSB_API_VERSION is not available in libusb20.h, which smartmontools uses. You might consider a LIBUSB20_API_VERSION? I'm unsure what the Linux world does here.