Created attachment 241629 [details] Poudriere test log for multimedia/dav1d on 12.4-RELEASE multimedia/dav1d fails to build with TEST=ON with the message: BEGINS ../tests/checkasm/checkasm.c:623:13: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'? cpu_set_t set; ^~~~~~~~~ cpuset_t /usr/include/sys/_cpuset.h:50:24: note: 'cpuset_t' declared here typedef struct _cpuset cpuset_t; ^ 1 error generated. ENDS The missing cpu_set_t type appears to be a GNU extension to the POSIX standard: https://www.gnu.org/software/libc/manual/html_node/CPU-Affinity.html It seems equivalent to cpuset_t on FreeBSD. Other ports have been affected; see PR 259787.
Created attachment 241642 [details] [patch] cpu_set_t is not in 12.4 The change that added cpu_set_t in FreeBSD base has not been merged back to 12.x (and probably never will be?). The main dav1d source (in src/cpu.c) already has this: #if defined(__FreeBSD__) #define cpu_set_t cpuset_t #endif That is not needed anymore except in 12.x (and 13.0 which is no longer supported). So that conditional #define won't be needed after 12.x goes EOL and is [now] overly broad as it is not needed in 13.1 and later. Try the attached patch - it is just for TEST code and can be removed after 12.x goes EOL. I didn't see the point in bothering with an upstream change for the relatively short time before 12.x EOL.
Thanks, John, that patch works well; I've attached the log. I agree with your sentiment about the upstream change given that it is unnecessary for supported 13.x releases onwards. In your opinion would it would be worth changing upstream now to remove the conditional define from src/cpu.c and instead including it as a patch to the port so that all the conditional defines are in one codebase (that is, the multimedia/dav1d port)? Many thanks.
Created attachment 241694 [details] Poudriere test log for patched multimedia/dav1d on 12.4-RELEASE
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a50457696509832e70738d2afa9f68e11ab4e171 commit a50457696509832e70738d2afa9f68e11ab4e171 Author: John Hein <jcfyecrayz@liamekaens.com> AuthorDate: 2023-04-21 21:03:56 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-04-25 00:44:41 +0000 multimedia/dav1d: unbreak TEST=on on FreeBSD < 13 after 17e9745faede ../tests/checkasm/checkasm.c:623:13: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'? cpu_set_t set; ^~~~~~~~~ cpuset_t /usr/include/sys/_cpuset.h:50:24: note: 'cpuset_t' declared here typedef struct _cpuset cpuset_t; ^ PR: 270977 Reported by: Ross McKelvie multimedia/dav1d/files/patch-freebsd12 (new) | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
A commit in branch 2023Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d8032adfa543d561592525ac9142cc144954c7e0 commit d8032adfa543d561592525ac9142cc144954c7e0 Author: John Hein <jcfyecrayz@liamekaens.com> AuthorDate: 2023-04-21 21:03:56 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-04-25 00:47:57 +0000 multimedia/dav1d: unbreak TEST=on on FreeBSD < 13 after 17e9745faede ../tests/checkasm/checkasm.c:623:13: error: unknown type name 'cpu_set_t'; did you mean 'cpuset_t'? cpu_set_t set; ^~~~~~~~~ cpuset_t /usr/include/sys/_cpuset.h:50:24: note: 'cpuset_t' declared here typedef struct _cpuset cpuset_t; ^ PR: 270977 Reported by: Ross McKelvie (cherry picked from commit a50457696509832e70738d2afa9f68e11ab4e171) multimedia/dav1d/files/patch-freebsd12 (new) | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
Comment on attachment 241642 [details] [patch] cpu_set_t is not in 12.4 I've slightly reworded the patch comment and dropped superfluous Makefile conditional.