Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Unable to calculate Linux Kernel version for build
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 821
Location: /mnt/Gentoo/

PostPosted: Fri Feb 22, 2013 9:56 am    Post subject: [SOLVED] Unable to calculate Linux Kernel version for build Reply with quote

Hi,

I had some problems with nvidia-drives and kernel 3.8.0:
http://forums.gentoo.org/viewtopic-t-951692-highlight-.html
so I had to downgrade to 3.7.8.

It looks like everything is fine, but I had some such messages 'Could not find a Makefile in the kernel source directory' after last emerge -uDN world.

Code:
 * Messages for package www-client/chromium-25.0.1364.97:

 * Could not find a Makefile in the kernel source directory.
 * Please ensure that /usr/src/linux points to a complete set of Linux sources
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * Unable to check for the following kernel config options due


Code:
* Messages for package x11-drivers/xf86-video-intel-2.21.3:

 * Could not find a Makefile in the kernel source directory.
 * Please ensure that /usr/src/linux points to a complete set of Linux sources
 * Unable to calculate Linux Kernel version for build, attempting to use running version


Code:
# eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.7.7-gentoo
  [2]   linux-3.7.8-gentoo *
  [3]   linux-3.8.0-gentoo


Code:
$ ls -la /usr/src/linux
lrwxrwxrwx 1 root root 18 Feb 20 07:42 /usr/src/linux -> linux-3.7.8-gentoo


Last edited by Xywa on Wed Feb 27, 2013 8:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Advocate
Advocate


Joined: 29 May 2005
Posts: 4656
Location: Saint Amant, Acadiana

PostPosted: Fri Feb 22, 2013 10:14 am    Post subject: Reply with quote

You probably ran depclean, too, and it cleaned your kernel sources, leaving only files that were not part of source package.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 821
Location: /mnt/Gentoo/

PostPosted: Wed Feb 27, 2013 10:01 am    Post subject: Reply with quote

Jaglover wrote:
You probably ran depclean, too, and it cleaned your kernel sources, leaving only files that were not part of source package.


Yes, I was running depclean to add one of the driver (in manually install) after moving into 3.8.0.
But because there is a problem with 3.8.0 and nvidia-drivers:
http://forums.gentoo.org/viewtopic-t-951692-highlight-.html
I had to go back to 3.7.8.

Now some more packages says Unable to calculate Linux Kernel version for build...
So what should I do? I cannot go for 3.8.0 as this bug with nvidia.
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Wed Feb 27, 2013 5:01 pm    Post subject: Reply with quote

Xywa wrote:
Now some more packages says Unable to calculate Linux Kernel version for build... So what should I do? I cannot go for 3.8.0 as this bug with nvidia.

Xywa ... its not simply a matter of installing the sources, you have to prepare, and or/build, them. It sounds as you have installed sys-kernel/gentoo-sources-3.7.8 but haven't run 'menuconfig', 'oldconfig', 'make' (or what-have-you) and for this reason there is no 'Makefile'. So, assuming you have CONFIG_IKCONFIG_PROC=y you will have the .config for the currently booted kernel in /proc and can do the following:

Code:
# zcat /proc/config.gz > /usr/src/linux/.config
# cd /usr/src/linux && make oldconfig

If you don't have IKCONFIG_PROC enabled but have a known working config from some previous build then you can do the following:

Code:
# cp /path/to/gentoo-sources/.config /usr/src/linux/.config
# cd /usr/src/linux && make oldconfig

This should create the missing Makefile, and your ready to either 'make && make modules_install' or 'emerge nvidia-drivers'.

best ... khay
Back to top
View user's profile Send private message
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 821
Location: /mnt/Gentoo/

PostPosted: Wed Feb 27, 2013 8:09 pm    Post subject: Reply with quote

khayyam wrote:
Xywa wrote:
Now some more packages says Unable to calculate Linux Kernel version for build... So what should I do? I cannot go for 3.8.0 as this bug with nvidia.

Xywa ... its not simply a matter of installing the sources, you have to prepare, and or/build, them. It sounds as you have installed sys-kernel/gentoo-sources-3.7.8 but haven't run 'menuconfig', 'oldconfig', 'make' (or what-have-you) and for this reason there is no 'Makefile'. So, assuming you have CONFIG_IKCONFIG_PROC=y you will have the .config for the currently booted kernel in /proc and can do the following:

Code:
# zcat /proc/config.gz > /usr/src/linux/.config
# cd /usr/src/linux && make oldconfig

If you don't have IKCONFIG_PROC enabled but have a known working config from some previous build then you can do the following:

Code:
# cp /path/to/gentoo-sources/.config /usr/src/linux/.config
# cd /usr/src/linux && make oldconfig

This should create the missing Makefile, and your ready to either 'make && make modules_install' or 'emerge nvidia-drivers'.

best ... khay


Many thanks for all sugestions.

Anyway, I did emerge gentoo-sources again (with masked >3.7.8) and it did the job :)
SOLVED
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum