Solved Installing Latest Nvidia drivers

Having problem with installing x11/nvidia-driver for my GeForce GTX 1660 SUPER on my FreeBSD 14.1

make install clean went smoothly and dependencies were installed, but it stops the compiling at this part

Code:
===> Building for nvidia-driver-550.54.14 all_subdir_src ===> sro (all) - all_subdir_src/nvidia ===> src/nvidia (all) make[ ]: Jusr/share/mk/bsd.sysdir.mk ee. Set SYSDIR to override
 line 16: Unable to locate the kerrel
source tr
make[ ]: stopped in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBS0-x86_64- /src/nvidia
 make[]: /src
 stopped in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-
make: stopped in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64- ===> Compilation failed unexpectedly Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer <xx Error code 1
 Stop make[l]: stopped in /usr/ports/x11/nvidia-driver xxx Error code 1
 Stop make: stopped in /usr/ports/x11/nvidia-driver

I don't understand this log so I really need help.

P.S.
I tried installing the drivers threw pkg but they didn't work
 
I would not recommend using ports if you don't need to add extra options to your build, and it's not recommended to mix ports and packages.

The package in the repo is the same as the port - just that it's already compiled.
So the problem you had with the package is probably gonna be the same with the port.

What issues did you have with the package? Why didn't it work?
 
Is /usr/src populated? It might be looking for kernel source tree.

 
It might be looking for kernel source tree.
That's exactly what it's looking for.

Rich (BB code):
===> Building for nvidia-driver-550.54.14 all_subdir_src
===> sro (all) - all_subdir_src/nvidia
===> src/nvidia (all) make[ ]: Jusr/share/mk/bsd.sysdir.mk ee. Set SYSDIR to override
Current missing kernel source error message seems not so verbose anymore as it was in the linked thread from 2014, although it should be

/usr/share/mk/bsd.sysdir.mk
Code:
16 .error Unable to locate the kernel source tree. Set SYSDIR to override.

See also origin of SYSDIR for ports:

/usr/ports/Mk/Uses/kmod.mk
Rich (BB code):
55 MAKE_ENV+=      KMODDIR="${KMODDIR}" SYSDIR="${SRC_BASE}/sys" NO_XREF=yes

/usr/ports/Mk/bsd.port.mk
Rich (BB code):
471 # SRC_BASE              - The root of the src tree.  (Some ports require this to get
472 #                                 kernel sources).  Default: /usr/src
 
Is /usr/src populated? It might be looking for kernel source tree.

This worked

I downloaded src.xzf file for 14.1 at https://download.freebsd.org/ftp/releases/amd64/14.1-RELEASE/ and extracted the content to /usr/src

The compiling was a success and it runs with no problem now 😄
 
Back
Top