# Make install error: Unable to locate the kernel source tree.



## ChatNoir (Jun 26, 2014)

Hello,
I have tried to install the new Nvidia driver 337.25 for the new Nvidia GTX750 Ti GPU; I have extracted the compressed files and then I have done a `make install` and it failed; I had the following error. 

```
===> src (install)
make[1]: "/usr/share/mk/bsd.kmod.mk" line 12: Unable to locate the kernel source tree.
Set SYSDIR to override.
*** Error code 1
Stop
Make: stopped in /usr/home/serge/nvidia/NVIDIA-FreeBSD-x86_64-337.25
```
First I would like to understand;
Is this error coming from the Nvidia driver or from FreeBSD?
I am thinking that the error might be coming from FreeBSD because I have read some threads about this error but these posts seem to me like Egyptian hieroglyphes. I am a newby.
Do I have to ask to Nvidia a corrected driver?
Or, is there a patch for FreeBSD or something equivalent in order to solve this issue?
Or, may be I have made mistakes during FreeBSD installation?
Thanks for help.


----------



## ljboiler (Jun 26, 2014)

*Re: Make install error: Unable to locate the kernel source t*

To build a driver, you usually must have the source code for the FreeBSD kernel installed, which is normally found in /usr/src.   The error message is indicating that the needed files cannot be found, most likely because you did not choose to install them when you installed FreeBSD.
What version of FreeBSD do you have?
	
	



```
uname -a
```


----------



## ChatNoir (Jun 26, 2014)

*Re: Make install error: Unable to locate the kernel source t*

Many thanks for feedback,
I have FreeBSD 10.0-RELEASE.
I am going to re install with source code. Installation doesn't take a long time
on my machine.


----------



## wblock@ (Jun 26, 2014)

*Re: Make install error: Unable to locate the kernel source t*



			
				ChatNoir said:
			
		

> Many thanks for feedback,
> I have FreeBSD 10.0-RELEASE.
> I am going to re install with source code. Installation doesn't take a long time
> on my machine.



Reinstalling the operating system does not take long, but doing all the setup and configuration all over again certainly does.  10.0 already has svnlite(), which only takes one command to check out the source.  Or you can download a tar() file.


----------



## SirDice (Jun 27, 2014)

*Re: Make install error: Unable to locate the kernel source t*

You don't want to use the source tree that comes with the CD anyway. You can't use svnlite(1) or svn(1) to update it, unfortunately. And please use the port; x11/nvidia-driver.


----------



## ChatNoir (Jun 29, 2014)

*Re: Make install error: Unable to locate the kernel source t*

Hello, many thanks, your advice about missing source code is right.


			
				ljboiler said:
			
		

> To build a driver, you usually must have the source code for the FreeBSD kernel installed, which is normally found in /usr/src. The error message is indicating that the needed files cannot be found, most likely because you did not choose to install them when you installed FreeBSD.





			
				wblock@ said:
			
		

> Reinstalling the operating system does not take long, but doing all the setup and configuration all over again certainly does. 10.0 already has svnlite, which only takes one command to check out the source. Or you can download a tar file.


I have installed FreeBSD one more time but this time with the source code. Before reinstalling I have tried to use svn and svnlite, without success; it doesn't work on my machine. I was thinking that is maybe a kind of hazing or a ritual test for newbies and "froggies"; No I'm joking! Or I am dealing another time with Murphy's Laws! I am rather unlucky sometimes (that's why my avatar is ChatNoir, black cat in English, black cats are well known for bad luck (see Tex Avery my master).

So I have reinstalled FreeBSD, installed Xorg (first), and then I have installed Nvidia driver 337.25 and it works. The installation works fine without errors. The missing source code was the reason of installation failure of the Nvidia driver. I had different small issues to finalize xorg.conf parameters. It was not easy to find parameters of my monitor and to understand all options of xorg.conf. I found an application Monitor Asset Manager for Windows7 in order to retrieve EDID's information of my monitor. http://www.entechtaiwan.com/util/moninfo.shtm. I am rather sure that this kind of tool exists for FreeBSD but it was easier and faster on Windows. I have launched `startx` and it works. :beer 

Some errors and issues are still remaining, QWERTY keyboard instead of AZERTY, Xauthority etc. but Xorg works.


			
				SirDice said:
			
		

> And please use the port; x11/nvidia-driver.


Thanks for the information and for the link to Nvidia driver ports, I already know this port. 
I have already mentioned that Nvidia 331.67 and 304.88 drivers and earlier drivers are not suitable for most of new Nvidia GPUs Maxwell 700 series, especially for my GeForce GTX 750 Ti. https://forums.freebsd.org/viewtopic.php?f=5&t=46945.
This new driver 337.25 is not yet in ports; I will try, as I said before, to update the port. In the meantime, we can find the drivers on Nvidia's web site. http://www.nvidia.com/object/unix.html for new Nvidia GPUs the 337.25 driver is here: http://www.nvidia.com/Download/driverResults.aspx/76282/en-us

I have tried it today: it seems to work.
This issue is solved.


----------

