Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17869 - media-libs/svgalib-1.9.17-r1 emerge fails on development kernel
Summary: media-libs/svgalib-1.9.17-r1 emerge fails on development kernel
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-20 06:54 UTC by Henti Smith
Modified: 2003-03-20 07:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes 2.5.x kernel breaking when not in /usr/src/linux (svgalib-1.9.17-r1.diff,228 bytes, text/plain)
2003-03-20 07:21 UTC, Henti Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henti Smith 2003-03-20 06:54:52 UTC
emerge fails finding kernel includes with any non /usr/src/linux 
kernel.

Reproducible: Always
Steps to Reproduce:
1.run non default kernel.
2.emerge svgalib

Actual Results:  
!!! ERROR: media-libs/svgalib-1.9.17-r1 failed.
!!! Function check_kernel, Line 18, Exitcode 1
!!! Cannot find kernel includes!



I'm running some dev kernels for testing scheduling, this is done in
/local/sources/kernel so it's not in the default /usr/src/linux/include
I knwo thi is really my problem, but I'm hoping to see if there is a more 
elegant way to handle it rather then just dying.
Comment 1 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-20 07:01:58 UTC
exactly what sort of elegance did you have in mind?
Comment 2 Henti Smith 2003-03-20 07:19:59 UTC
I had a look around in the ebuild.

when setting the INCLUDEDIR to check the kernel includes for it uses a simple line
"export INCLUDEDIR="/usr/src/linux/include"

I was thinking of something more along the lines of:

local KV_FULL="`uname -r`"
export INCLUDEDIR="/lib/modules/${KV_FULL}/build/include"

this will use the current running kernel includes for compiling.

See this problem appears because the ebuild see's my running kernel as 2.5.x
and tries to find the kernel source in /usr/src/linux instead of wherever it really is. 

Use ${KV_FULL} in the modules build dir is a much easer way to find where the kernel source used for the currenr kernel is 

Henti Smith 

I'll attach a diff for the ebuild.




Henti Smith 
Comment 3 Henti Smith 2003-03-20 07:21:29 UTC
Created attachment 9631 [details]
Fixes 2.5.x kernel breaking when not in /usr/src/linux

adds ${KV_FULL} and uses /lib/modules to find kernel includes.
better handling of 2.5.x kernels includes esp for people running leading edge
dev kernels.
Comment 4 Troy Dack 2003-03-20 07:22:32 UTC
Since this is a pretty rare case, why not simply add a few commands in  
/etc/conf.d/local.start to set a symlink to the right place.  
  
eg:  
	rm -fr /usr/src/linux  
	ln -sf /local/sources/kernel/linux-`uname -r` /usr/src/linux  
  
(Of course you should check that /usr/src/linux is a symlink etc..., but I'll leave the  
details to you)  
Comment 5 Henti Smith 2003-03-20 07:32:36 UTC
Spoke to Seemant and since this is related to 2.5.x kernel and is still deemed 
unstable it's pretty pointless fixing things while it's changing .. so if it's there in 2.6 can look at it again .. in the mean time I'll make it work other ways :) 

henti