Solved Error compiling drm-kmod

Code:
In file included from radeon_ARUBA_me_bin.c:2:
In file included from /usr/src/sys/sys/param.h:100:
/usr/src/sys/sys/types.h:45:10: fatal error: 'machine/endian.h' file not found
   45 | #include <machine/endian.h>
      |          ^~~~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1

Code:
$ locate machine/endian.h
/usr/include/machine/endian.h

Any ideas what's going on?
 
Looks like you're missing (part of) the /usr/src tree. Make sure your source tree is complete and up to date with your installed version. It's a kernel module and therefor needs access to the source tree to build properly.
 
Code:
$ locate machine/endian.h
/usr/include/machine/endian.h
locate(1) searches a database for search patterns (/var/db/locate.database), not the file system. The database is updated once in a week, files added in this period won't show up in the search result, until the database is updated by /etc/periodic/weekly/310.locate.

"machine/endian.h" is most likely
Code:
% find /usr/src  -name  endian.h  |  grep machine
/usr/src/tools/build/cross-build/include/common/machine/endian.h
 
locate(1) searches a database for search patterns (/var/db/locate.database), not the file system. The database is updated once in a week, files added in this period won't show up in the search result, until the database is updated by /etc/periodic/weekly/310.locate.
Yeah, I usually run /usr/libexec/locate.updatedb before using it. I exclude /usr/src.

"machine/endian.h" is most likely

Code:
% find /usr/src  -name  endian.h  |  grep machine
/usr/src/tools/build/cross-build/include/common/machine/endian.h
Including /usr/src produces:

Code:
# locate 'machine/endian.h'
/usr/include/machine/endian.h
/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/include/machine/endian.h
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/machine/endian.h
/usr/src/tools/build/cross-build/include/common/machine/endian.h

Compilation still fails in the same way.
 
Looks like you're missing (part of) the /usr/src tree. Make sure your source tree is complete and up to date with your installed version. It's a kernel module and therefor needs access to the source tree to build properly.
git thinks it is up to date, but I deleted the tree and re-cloned it with no better result.
 
I recompiled the kernel for fun, no help.

I updated the ports tree again (18 hour difference) ->compilation success! Still somewhat baffled, but what ends well, ends well.
 
Back
Top