Bug 238051 - graphics/drm-current-kmod ${OSVERSION} gets wrong __FreeBSD_version (does not use param.h from ${SRC_BASE})
Summary: graphics/drm-current-kmod ${OSVERSION} gets wrong __FreeBSD_version (does not...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-22 15:16 UTC by Ed Maste
Modified: 2019-05-23 18:41 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2019-05-22 15:16:30 UTC
I tried building drm-current-kmod with SRC_BASE=/home/emaste/src/freebsd (which is the kernel I installed and am running); the rest of my userland has not yet been updated (and so /usr/include/sys/param.h has an older __FreeBSD_version). The kmod build failed with the "not supported on older CURRENT" error. I commented out the check:

.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1300029
IGNORE=                not supported on older CURRENT (${OSVERSION}), no kernel support
.endif

built the module, and it works correctly.

% sysctl kern.osreldate
kern.osreldate: 1300029
% grep 'propagated to newvers' /home/emaste/src/freebsd/sys/sys/param.h /usr/include/sys/param.h 
/home/emaste/src/freebsd/sys/sys/param.h:#define __FreeBSD_version 1300029     /* Master, propagated to newvers */
/usr/include/sys/param.h:#define __FreeBSD_version 1300003      /* Master, propagated to newvers */
Comment 1 Niclas Zeising freebsd_committer 2019-05-22 15:19:22 UTC
This is not a problem with the DRM driver, but if anything, it's a problem with the ports infrastructure.
Comment 2 Antoine Brodin freebsd_committer 2019-05-22 15:25:09 UTC
This looks like a special case to me,  "regular" end users have a kernel matching the headers installed in /usr/include and they don't even have something in /usr/src.
Comment 3 Ed Maste freebsd_committer 2019-05-22 15:33:00 UTC
(In reply to Antoine Brodin from comment #2)
It may not affect "regular" users but is still a bug to be fixed
Comment 4 Ed Maste freebsd_committer 2019-05-23 13:59:06 UTC
Probably the test in the port's Makefile should be against a newly added TARGET_KERN_VERSION?
Comment 5 Niclas Zeising freebsd_committer 2019-05-23 15:32:10 UTC
Hi!
I can't find TARGET_KERN_VERSION in ports, is it supposed to be added, or is this a suggestion to add that?
Comment 6 Ed Maste freebsd_committer 2019-05-23 16:37:52 UTC
I mean ports infra should add TARGET_KERN_VERSION then it could be used in this port.
Comment 7 Niclas Zeising freebsd_committer 2019-05-23 18:41:49 UTC
Thank you for the clarification.  I'll see if I can get something like that working.