# Nvidia_Root not set in scr/Makefile



## john2867 (Sep 20, 2018)

Please forgive me, I stuck, I am attempting to do a fresh install of FreeBSD 11.2 with the kde5 desktop and nvidia-driver. I updated ports with portsnap with fetch extract, then installed xorg from port, install kde5 with pkg and nvidia-driver from port. I added proc to fstab, added dbus and kld_list="nvidia-modeset", Linux_enable="YES" and sddm_enable="YES" to rc.conf. Added Linux_load="YES" and nvidia-modeset_load="YES" to /boot/loader.conf, also added exec ck-launch-session startkde to a .xinitrc file in my user directory. After a reboot, and no graphic login, I check /var/log/xorg.log, and discovered no nvidia module was loaded. After checking the nvidia-driver port Makefile. I found NVIDIA_ROOT  is not set in scr/Makefile, which results in bogus -I/src passed to compiler and broken build on head since r221320 when option -Wmissing-include-dirs was added for kernel sources, use this hack below to universally set NVIDIA_ROOT. I am not sure how to proceed. Could someone point me in the right direction. Thank you in advance


----------



## john2867 (Oct 9, 2018)

Problem Solved


----------



## scottro (Oct 9, 2018)

It might be useful for others if you explained how you solved it.


----------

