LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2015, 03:34 AM   #1
hamdy01
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Rep: Reputation: Disabled
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
 
Old 11-26-2015, 07:32 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
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))



-
 
Old 11-26-2015, 07:37 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
have you installed kernel headers?
 
Old 11-26-2015, 08:58 AM   #4
hamdy01
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
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
 
Old 11-26-2015, 09:42 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Re #4.

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

Suse : 'kernel-devel' will do.
 
Old 11-27-2015, 02:22 AM   #6
hamdy01
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by knudfl View Post
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?
 
Old 11-27-2015, 02:23 AM   #7
hamdy01
LQ Newbie
 
Registered: Apr 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 11-27-2015, 02:36 AM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
it looks like the kernel headers structure is not supported by that driver? Can you check the documentation?
 
Old 11-27-2015, 07:41 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
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



-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
third party makefile not correct? Missing version.h with installed kernel-headers. Lytse Flap Programming 3 07-31-2008 06:24 PM
missing /build in my kernel version dir so i can't install madwifi Learath Linux - Newbie 2 10-26-2007 06:21 PM
Kernel source missing?? iansoundz Linux - General 2 12-05-2005 12:26 AM
Kernel version Source Version mismatch after recompile chuckleberry Linux - Software 1 06-20-2005 07:37 PM
bad kernel tree ? version.h missing !!! 2.4.22 qwijibow Linux - Software 2 11-11-2003 12:53 PM


All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration