Created attachment 368292 [details] emerge --info configure step fails building openvswitch: checking for Linux build directory... /usr/src/linux checking for Linux source directory... /usr/src/linux checking for kernel version... 3.10.0 configure: error: Linux kernel source in /usr/src/linux is not configured actual kernel build is in /opt/kernel/build/linux as specified in /etc/portage/make.conf: KBUILD_OUTPUT=/opt/kernel/build/linux In my case I have a valid configured kernel in /opt/kernel/build/linux as shown below. But the configure script ends up looking in /usr/src/linux instead and determines there is no configured kernel present. jharvell@wolfhound ~ $ ls -l /opt/kernel/build/linux lrwxrwxrwx 1 root root 22 Oct 22 14:55 /opt/kernel/build/linux -> 3.10.0-gentoo-gcc4.7.3 jharvell@wolfhound ~ $ ls -l /opt/kernel/build/linux/include/linux/version.h ls: cannot access /opt/kernel/build/linux/include/linux/version.h: No such file or directory jharvell@wolfhound ~ $ ls -l /opt/kernel/build/linux/include/generated/uapi/linux/version.h -rw-r--r-- 1 jharvell cta 97 Jul 2 2013 /opt/kernel/build/linux/include/generated/uapi/linux/version.h jharvell@wolfhound ~ $ ls -l /opt/kernel/build/linux/include/linux/autoconf.h ls: cannot access /opt/kernel/build/linux/include/linux/autoconf.h: No such file or directory jharvell@wolfhound ~ $ ls -l /opt/kernel/build/linux/include/generated/autoconf.h -rw-r--r-- 1 jharvell cta 79703 Jul 2 2013 /opt/kernel/build/linux/include/generated/autoconf.h
Created attachment 368294 [details] config.log from failed build excerpt of error: configure:7884: checking for Linux build directory configure:7887: result: /usr/src/linux configure:7899: checking for Linux source directory configure:7933: result: /usr/src/linux configure:7936: checking for kernel version configure:7948: result: 3.10.0 configure:7968: error: Linux kernel source in /usr/src/linux is not configured
Created attachment 368296 [details] configure script for failed build excerpt from configure script with line numbers: 7964 if (test ! -e "$KBUILD"/include/linux/version.h && \ 7965 test ! -e "$KBUILD"/include/generated/uapi/linux/version.h)|| \ 7966 (test ! -e "$KBUILD"/include/linux/autoconf.h && \ 7967 test ! -e "$KBUILD"/include/generated/autoconf.h); then 7968 as_fn_error $? "Linux kernel source in $KBUILD is not configured" "$LINENO" 5 7969 fi
Created attachment 368300 [details] build.log
Created attachment 368302 [details] environment from build
Created attachment 368304 [details] corrected environment Normally I have LC_ALL set to a French locale....but I set LC_ALL="" when submitting bug reports. All the other attachments were with LC_ALL="", but I accidentally added the first environment attachment from a run where I had not set LC_ALL="".
Created attachment 368306 [details] corrected build.log Normally I have LC_ALL set to a French locale....but I set LC_ALL="" when submitting bug reports. All the other attachments were with LC_ALL="", but I accidentally added the first build.log attachment from a run where I had not set LC_ALL="".
(In reply to Joe Harvell from comment #0) > checking for Linux build directory... /usr/src/linux This is what it would be looking for by default. You cannot override it with KBUILD_OUTPUT. > KBUILD_OUTPUT=/opt/kernel/build/linux Try with KERNEL_DIR, maybe. Or just set the /usr/src/linux symlink correctly.
(In reply to Jeroen Roovers from comment #7) > Try with KERNEL_DIR, maybe. I just tried this and get the same result. > Or just set the /usr/src/linux symlink correctly. It is set correctly; it points to the source code for the running Linux kernel. But since I compile the kernel with O=/opt/kernel/build/linux, the only thing in the directory referenced by /usr/src/linux is the source code...no artifacts of configuring it. The configure script clearly expects to find the kernel build directory in a different place from the sources. It's just failing to find it in my case. lrwxrwxrwx 1 root root 19 22 oct. 14:55 /usr/src/linux -> linux-3.10.0-gentoo jharvell@wolfhound ~ $ ls -l /usr/src/linux-3.10.0-gentoo/ total 548 drwxr-xr-x 32 root root 4096 2 juil. 2013 arch drwxr-xr-x 5 root root 4096 2 juil. 2013 b drwxr-xr-x 3 root root 4096 2 juil. 2013 block -rw-r--r-- 1 root root 18693 30 juin 2013 COPYING -rw-r--r-- 1 root root 95317 30 juin 2013 CREDITS drwxr-xr-x 4 root root 4096 2 juil. 2013 crypto drwxr-xr-x 100 root root 12288 2 juil. 2013 Documentation drwxr-xr-x 112 root root 4096 2 juil. 2013 drivers drwxr-xr-x 36 root root 4096 2 juil. 2013 firmware drwxr-xr-x 73 root root 4096 2 juil. 2013 fs drwxr-xr-x 26 root root 4096 2 juil. 2013 include drwxr-xr-x 2 root root 4096 2 juil. 2013 init drwxr-xr-x 2 root root 4096 2 juil. 2013 ipc -rw-r--r-- 1 root root 2536 30 juin 2013 Kbuild -rw-r--r-- 1 root root 252 30 juin 2013 Kconfig drwxr-xr-x 11 root root 4096 2 juil. 2013 kernel drwxr-xr-x 9 root root 4096 2 juil. 2013 lib -rw-r--r-- 1 root root 255012 30 juin 2013 MAINTAINERS -rw-r--r-- 1 root root 48426 2 juil. 2013 Makefile drwxr-xr-x 2 root root 4096 2 juil. 2013 mm drwxr-xr-x 55 root root 4096 2 juil. 2013 net -rw-r--r-- 1 root root 18736 30 juin 2013 README -rw-r--r-- 1 root root 7485 30 juin 2013 REPORTING-BUGS drwxr-xr-x 12 root root 4096 2 juil. 2013 samples drwxr-xr-x 13 root root 4096 2 juil. 2013 scripts drwxr-xr-x 9 root root 4096 2 juil. 2013 security drwxr-xr-x 22 root root 4096 2 juil. 2013 sound drwxr-xr-x 17 root root 4096 2 juil. 2013 tools drwxr-xr-x 2 root root 4096 2 juil. 2013 usr drwxr-xr-x 3 root root 4096 2 juil. 2013 virt
Jereon, what is the basis for setting this to resolved/invalid? Are you saying that Gentoo doesn't support compiling the kernel with O=? I find that hard to believe since this works fine with other packages (nvidia-drivers, e.g.). Also, I only know about this from having read it in past versions of the Gentoo Handbook, though now I don't find any reference to it there. I do see the following in linux-info.eclass. Note the documentation for the last one. # @ECLASS-VARIABLE: KBUILD_OUTPUT # @DESCRIPTION: # A string passed on commandline, or set from the kernel makefile. It contains the directory # which is to be used as the kernel object directory. # There are also a couple of variables which are set by this, and shouldn't be # set by hand. These are as follows: # @ECLASS-VARIABLE: KV_FULL # @DESCRIPTION: # A read-only variable. It's a string containing the full kernel version. ie: 2.6.9-gentoo-johnm-r1 # @ECLASS-VARIABLE: KV_MAJOR # @DESCRIPTION: # A read-only variable. It's an integer containing the kernel major version. ie: 2 # @ECLASS-VARIABLE: KV_MINOR # @DESCRIPTION: # A read-only variable. It's an integer containing the kernel minor version. ie: 6 # @ECLASS-VARIABLE: KV_PATCH # @DESCRIPTION: # A read-only variable. It's an integer containing the kernel patch version. ie: 9 # @ECLASS-VARIABLE: KV_EXTRA # @DESCRIPTION: # A read-only variable. It's a string containing the kernel EXTRAVERSION. ie: -gentoo # @ECLASS-VARIABLE: KV_LOCAL # @DESCRIPTION: # A read-only variable. It's a string containing the kernel LOCALVERSION concatenation. ie: -johnm # @ECLASS-VARIABLE: KV_DIR # @DESCRIPTION: # A read-only variable. It's a string containing the kernel source directory, will be null if # KERNEL_DIR is invalid. # @ECLASS-VARIABLE: KV_OUT_DIR # @DESCRIPTION: # A read-only variable. It's a string containing the kernel object directory, will be KV_DIR unless # KBUILD_OUTPUT is used. This should be used for referencing .config.
Created attachment 368404 [details, diff] fixed ebuild Fix to allow compiling against a kernel whose build output directory is different from the source directory
Jeroen, I attached what I believe is the fix for this issue. I changed the status to Unconfirmed since I don't know if you receive notifications for bugs in the Resolved state.
fixed in 2.0.0-r2