Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42125 - Makefile fails to determine the correct kernel directory
Summary: Makefile fails to determine the correct kernel directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-19 02:40 UTC by Andreas Sahlbach
Modified: 2004-03-27 07:13 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sahlbach 2004-02-19 02:40:46 UTC
Compilation fails due to my absolute /usr/src/linux link. See below.

Reproducible: Always
Steps to Reproduce:
1.create a link /usr/src/linux and let it be an absolute link
2.emerge bestcrypt (stable or masked, doesn't matter)
	
Actual Results:  
[...] 
gcc -c -D__KERNEL__ -DMODULE  
-I/var/tmp/portage/bestcrypt-1.5_p1/work/bcrypt/mod/../include/ -I/include/ 
-O3 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe 
-fno-strength-reduce -fno-strict-aliasing    -c -o bc_dev22.o bc_dev22.c 
In file included from bc_dev22.c:35: 
bc_cfg.h:45:35: linux/modversions.h: No such file or directory 
In file included from bc_dev22.c:49: 
[...] 
make[1]: *** [bc_dev22.o] Error 1 
make[1]: Leaving directory `/var/tmp/portage/bestcrypt-1.5_p1/work/bcrypt/mod' 
make: *** [subdirs] Error 2 
 
!!! ERROR: app-crypt/bestcrypt-1.5_p1 failed. 
!!! Function src_compile, Line 41, Exitcode 2 
!!! (no error message) 
 

Expected Results:  
a working ebuild 

The problem is the absolute link and the Makefile in bestcrypt/mod. 
My link is:  
ls -l /usr/src/linux 
lrwxrwxrwx    1 root     root           31 Jan 29 16:34 /usr/src/linux 
-> /usr/src/linux-2.4.22-gentoo-r5 
The Makefile has this line: 
KVER = $(shell readlink /usr/src/linux|sed -e "s:linux-\([0-9]\+\.
[0-9]\+\)\..*:\1:") 
which sets KVER to: /usr/src/2.4 (should be 2.4) 
and lines like this (for several kernel versions): 
KERNEL_DIR = /lib/modules/$(shell readlink /usr/src/linux|sed -e 
's:linux-::')/build 
 
Replacing the appropriate calls to e.g. 
readlink /usr/src/linux|sed -e "s:.*linux-\([0-9]\+\.[0-9]\+\)\..*:\1:" 
worked for me (there is a new .* in front of linux)
Comment 1 Daniel Ahlberg (RETIRED) gentoo-dev 2004-03-27 07:13:11 UTC
Fixed in 1.5_p2, thanks!