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)
Fixed in 1.5_p2, thanks!