graphics/nvidia-drm-515kmod and graphics/nvidia-drm-61-kmod starts failing build after stable/14 commit 183b64dfd84ad7fd504d04f40c90edad809083c1 [1]. Error part of build log is as follows. ===== Quot ===== nvidia-drm-fence.c:158:14: error: no member named 'm' in 'struct mtx' 158 | WARN_ON(!spin_is_locked(&nv_fence_context->lock)); | ^ ~~~~~~~~~~~~~~~~~~~~~~ ./nvidia-drm-conftest.h:89:45: note: expanded from macro 'spin_is_locked' 89 | #define spin_is_locked(lock) mtx_owned(lock.m) | ~~~~ ^ /usr/src/sys/sys/mutex.h:478:33: note: expanded from macro 'mtx_owned' 478 | #define mtx_owned(m) (mtx_owner(m) == curthread) | ^ /usr/src/sys/sys/mutex.h:476:50: note: expanded from macro 'mtx_owner' 476 | #define mtx_owner(m) lv_mtx_owner(MTX_READ_VALUE(m)) | ^ /usr/src/sys/sys/mutex.h:470:29: note: expanded from macro 'MTX_READ_VALUE' 470 | #define MTX_READ_VALUE(m) ((m)->mtx_lock) | ^ /usr/src/sys/sys/mutex.h:474:45: note: expanded from macro 'lv_mtx_owner' 474 | #define lv_mtx_owner(v) ((struct thread *)((v) & ~MTX_FLAGMASK)) | ^ ===== End quot ===== [1] https://cgit.freebsd.org/src/commit/?h=stable/14&id=183b64dfd84ad7fd504d04f40c90edad809083c1
Created attachment 251235 [details] Patch to fix build Attached patch fixed the build for stable/14. As a large amount of builds are ongoing now, not yet tested wherher it breaks build on main or not. Unfortunately, this patch has usually-fatal problem, as the __FreeBSD_version used for this is BEFORE THE PROBLEMATIC COMMIT. But fortunately, the time window that is problematic is below 5 minutes. Someone really unfortunate could be affected, but usually OK. Another problem is that this kind of fix are needed again if the problematic commit is MFS'ed to releng/14.*.
Patch LGTM thanks. I think that small gap between the __FreeBSD_versions is unfortunate but it is what it is. It should be unlikely to affect anyone as you said. I don't have a commit bit, so someone else will have to commit this for me.
(In reply to Austin Shafer from comment #2) Thanks! Now I can look for a committer to handle this. Will post a mail to freebsd-ports ML as approved by maintainer soon.
Additional notes for triagers/committers kindly picking this. Uploaded patch here is just a "build fix" for specific branch (stable/14). So I think PORTREVISION bump is not needed here. For main, this is already fixed. What I did is to adjust the scope of the fix. For releng/14.1 and stable/13, just confirmed that the offending commit is not yet MFS'ed/MFC'ed at Jun.16, 2024 at 10:39:30 (JST, +9). So currently stable/14 alone is affected.
Add Blocks: 280772 not to be missed when it lands.
Landed as 50bae2203980aacc742dbf1f69bcb5ead7bad4eb
(In reply to Kevin Bowling from comment #6) Confirmed. Thanks!