Bug 243087

Summary: x11/nvidia-driver: ERROR- requires kernel source files
Product: Ports & Packages Reporter: Gerard Seibert <gerard_seibert>
Component: Individual Port(s)Assignee: Alexey Dokuchaev <danfe>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: gerard_seibert, iwtcex
Priority: --- Flags: bugzilla: maintainer-feedback? (danfe)
Version: Latest   
Hardware: Any   
OS: Any   

Description Gerard Seibert 2020-01-04 17:05:32 UTC
FreeBSD-11.3-RELEASE-p5 amd64

I am attempting to install the x11/nvidia-driver. Unfortunately, it will not install. This is the error message, which is emitted immediately when attempting to build the port.

/usr/ports/x11/nvidia-driver # make                                                                 
===>  nvidia-driver-440.31 requires kernel source files in SRC_BASE=/usr/src.                       
*** Error code 1                                                                                    
                                                                                                    
Stop.                                                                                               
make: stopped in /usr/ports/x11/nvidia-driver

The "/usr/src" directory is in fact, completely empty.
Comment 1 Alex S 2020-01-07 14:56:34 UTC
So, what's the actual issue?
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2020-01-26 13:55:27 UTC
If you want/need to build the driver from the ports tree (that is, from source), just like any other kernel module, it requires kernel sources under SRC_BASE (typically /usr/src).  If this directory is empty, it means that you had neither installed the corresponding FreeBSD distribution set (src.txz) nor checked the source code out from the Subversion repository -- you should do one of those things prior to building the port.

Alternatively, you might want to install the driver in a pre-compiled form from the binary packages with pkg(8) tool.

Please tell us if you manage to successfully install the driver so this bug can be closed (even though it is technically not a bug).
Comment 3 Gerard Seibert 2020-01-26 14:37:23 UTC
(In reply to Alexey Dokuchaev from comment #2)

I can build this port via 'poudriere', but not from the command line.

At the very least, the port should announce that it will not build sans kernel sources under SRC_BASE (typically /usr/src). Perhaps a note in 'pkg-descr' or a mention of this in "UPDATING" when the port is updated.

Feel free to close this report.