Bug 243087 - x11/nvidia-driver: ERROR- requires kernel source files
Summary: x11/nvidia-driver: ERROR- requires kernel source files
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
Depends on:
Reported: 2020-01-04 17:05 UTC by Gerard Seibert
Modified: 2020-02-20 17:20 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (danfe)


Note You need to log in before you can comment on or make changes to this bug.
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                                                                                    
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 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.