Bug 269308 - devel/py-libzfs: Fails to build on 12.4: error: use of undeclared identifier 'ZPOOL_PROP_*'
Summary: devel/py-libzfs: Fails to build on 12.4: error: use of undeclared identifier ...
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: Ryan Moeller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-03 13:04 UTC by John Hein
Modified: 2023-02-07 22:30 UTC (History)
2 users (show)

See Also:
freqlabs: maintainer-feedback+
freqlabs: merge-quarterly?


Attachments
[patch] don't reference newer userquota enum values if unavailable in installed zfs version (3.96 KB, patch)
2023-02-03 14:25 UTC, John Hein
no flags Details | Diff
[patch] don't reference newer userquota enum values if unavailable in installed zfs version (v2) (4.00 KB, patch)
2023-02-03 14:35 UTC, John Hein
jcfyecrayz: maintainer-approval? (freqlabs)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2023-02-03 13:04:01 UTC
undeclared identifier errors from build on 12.4 (maybe others)...


libzfs.c:97129:53: error: use of undeclared identifier 'ZFS_PROP_USEROBJUSED'; did you mean 'ZFS_PROP_USERUSED'?
libzfs.c:97141:53: error: use of undeclared identifier 'ZFS_PROP_USEROBJQUOTA'; did you mean 'ZFS_PROP_USERQUOTA'?
libzfs.c:97153:53: error: use of undeclared identifier 'ZFS_PROP_GROUPOBJUSED'; did you mean 'ZFS_PROP_GROUPUSED'?
libzfs.c:97165:53: error: use of undeclared identifier 'ZFS_PROP_GROUPOBJQUOTA'; did you mean 'ZFS_PROP_GROUPQUOTA'?
libzfs.c:97177:53: error: use of undeclared identifier 'ZFS_PROP_PROJECTUSED'; did you mean 'ZFS_PROP_GROUPUSED'?
libzfs.c:97189:53: error: use of undeclared identifier 'ZFS_PROP_PROJECTQUOTA'
libzfs.c:97201:53: error: use of undeclared identifier 'ZFS_PROP_PROJECTOBJUSED'
libzfs.c:97213:53: error: use of undeclared identifier 'ZFS_PROP_PROJECTOBJQUOTA'
Comment 1 John Hein 2023-02-03 13:05:46 UTC
That is port version 1.1.2023020200 (upstream git tag 1a99a45 - Dec 15, 2022)
Comment 2 John Hein 2023-02-03 14:25:41 UTC
Created attachment 239886 [details]
[patch] don't reference newer userquota enum values if unavailable in installed zfs version

This patch avoids referencing certain [newer] userquota enums if the installed zfs version does not have them.  -current (and 13.2) has ZFS_PROP_USEROBJUSED (and GROUPOBJUSED, et. al.), but 12.x does not.

Possibly suitable for upstream.

To keep the diff simple, I added autoreconf instead of including the diffs for the generated configure script.  Upstream can re-generate configure (either when it generates a distributable release or at the same time the configure.ac is committed).

While here, move a couple Makefile lines around based on portlint & portclippy suggestions.

Tested with 'make stage check-plist stage-qa package' on 12.4/amd64
Comment 3 John Hein 2023-02-03 14:35:30 UTC
Created attachment 239887 [details]
[patch] don't reference newer userquota enum values if unavailable in installed zfs version (v2)

patch v2: No change to upstream bits. Minor sorting tweak (from portfmt -D Makefile).
Comment 4 Ryan Moeller freebsd_committer freebsd_triage 2023-02-07 22:30:28 UTC
Forgot to tag the PR, but the pull request was just merged upstream and the port has been updated:

https://cgit.freebsd.org/ports/commit/?id=119910278a164ab29c0ecbea6b30564ca9677b33