LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   version.h missing in linux kernel source (https://www.linuxquestions.org/questions/linux-newbie-8/version-h-missing-in-linux-kernel-source-4175559926/)

hamdy01 11-26-2015 02:34 AM

version.h missing in linux kernel source
 
while trying to compile NVIDIA graphics driver from source on opensuse tumbleweed, i could'n do that because of missing version.h.
In fact this is an old issue, i had the same problem a couple of years ago. and I wonder, why this is still the case.


thanks for any reply

knudfl 11-26-2015 06:32 AM

Example kernel 4.1.7 :

/usr/src/<linux>/include/generated/uapi/linux/version.h
.... 2 lines :

#define LINUX_VERSION_CODE 262407
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))



-

pan64 11-26-2015 06:37 AM

have you installed kernel headers?

hamdy01 11-26-2015 07:58 AM

Quote:

Originally Posted by pan64 (Post 5455604)
have you installed kernel headers?

thank you for reply,

i installed: 1- kernel-devel, 2- kernel-default-devel of opensuse
and there is no package called : kernel-header or the like

is there any other packages to install?

thanks again

knudfl 11-26-2015 08:42 AM

Re #4.

The Debian / Ubuntu name for 'kernel-devel' is "kernel-header".

Suse : 'kernel-devel' will do.

hamdy01 11-27-2015 01:22 AM

Quote:

Originally Posted by knudfl (Post 5455602)
Example kernel 4.1.7 :

/usr/src/<linux>/include/generated/uapi/linux/version.h
.... 2 lines :

#define LINUX_VERSION_CODE 262407
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))



-

unfortunately i don't have the subdirectory generated/uapi/linux under /usr/src/linux
could this be a suse specific issue?

hamdy01 11-27-2015 01:23 AM

thanks again, tipping: find . -name version.h, from /usr/src/linux
i got:
./include/uapi/linux/dvb/version.h
./include/xen/interface/version.h

the NVIDIA software looks nevertheless for /usr/src/linux/include/linux/version.h

copying or linking one of those into the desired place leads to many other "not founds"
so that i think the right version.h is not yet there.

thank you in advance

pan64 11-27-2015 01:36 AM

it looks like the kernel headers structure is not supported by that driver? Can you check the documentation?

knudfl 11-27-2015 06:41 AM

I guess you can just make a copy of include/uapi/linux/dvb/version.h to include/linux/version.h

http://stackoverflow.com/questions/1...source-project



-


All times are GMT -5. The time now is 08:22 PM.