Problem found when building graphics/drm-kmod on FreeBSD 12.2-BETA1 r365618 GENERIC powerpc 32 bit, running on Apple Powerbook 17". # cd /usr/ports/graphics/drm-kmod/ /usr/ports/graphics/drm-kmod # make -DBATCH install clean ===> Staging for drm-kmod-g20190710 ===> drm-kmod-g20190710 depends on file: /boot/modules/drm.ko - not found ===> Building for drm-legacy-kmod-g20200825 ===> drm (all) ===> drm/drm (all) Warning: Object directory not changed from original /usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-3f527d9/drm/drm cc -O2 -pipe -fno-strict-aliasing -Wno-error -D_KERNEL -DKLD_MODULE -nostdinc -I/usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-3f527d9/drm/../src/ -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -mlongcall -fno-omit-frame-pointer -MD -MF.depend.drm_agpsupport.o -MTdrm_agpsupport.o -mno-altivec -msoft-float -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-uninitialized -finline-limit=15000 -fms-extensions --param inline-unit-growth=100 --param large-function-growth=1000 -std=iso9899:1999 -c /usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-3f527d9/src/dev/drm/drm_agpsupport.c -o drm_agpsupport.o In file included from /usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-3f527d9/drm/../src/dev/drm/drmP.h:75, from /usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-3f527d9/src/dev/drm/drm_agpsupport.c:39: /usr/src/sys/vm/vm_page.h:204: error: field 'md' has incomplete type *** [drm_agpsupport.o] Error code 1 make[4]: stopped in /usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-3f527d9/drm/drm 1 error make[4]: stopped in /usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-3f527d9/drm/drm ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/graphics/drm-legacy-kmod *** Error code 1 Stop. make: stopped in /usr/ports/graphics/drm-kmod
Confirmed on my G4 powerpc machines.
I saw this some time ago as well, but the specifics may be a little rusty. I never found a solution. As I recall, this seems to be a consequence of the way the kernel deals with two different ways in which various PowerPC hardware deals with virtual memory. Some use the legacy "AIM" (Apple-IBM-Motorola) model, and others use an alternate Book-E" model, which was added to make PowerPC more palatable for embedded systems. Application code works identically on processors using either VM model, but the kernel code needs to work differently. The FreeBSD kernel has support for both VM models, but a compile-time define needs to be supplied to specify which model is used for the targeted CPU; this configuration parameter leads to, among other things, different definitions of the struct in question. When building drm-kmod, the build system somehow needs to be told whether the kernel module is being built for AIM or Book-E in order to get past this error. Since running into this issue, the increasing in dependency that various ports have on a bootstrap rustc compiler (which doesn't exist upstream for 32-bit PowerPC on FreeBSD) has left me reluctant to go much further in my experiments with graphical environments.
(In reply to lfmorrison from comment #2) > the increasing in dependency that various ports have on a bootstrap rustc > compiler (which doesn't exist upstream for 32-bit PowerPC on FreeBSD) has > left me reluctant to go much further in my experiments with graphical > environments. This is probably due to the new version of librsvg2 which uses rust now. Fortunately, it is possible to stick to the legacy version, see bug #251014 and ports r555776.
Closing, please re-open if this happens with supported FreeBSD version and up to date ports tree.