Hi, I have a core2duo system with a make.conf like following : CFLAGS="-O2 -march=i686 -pipe" CXXFLAGS="${CFLAGS}" CHOST="i686-pc-linux-gnu" VIDEO_CARDS="nvidia" FEATURES="buildpkg" This system build packages. I unpack them on a pentium4 system on the local network (/usr/portage is shared with nfs). Here is the make.conf from the pentium4 : CFLAGS="-O2 -march=i686 -pipe" CXXFLAGS="${CFLAGS}" CHOST="i686-pc-linux-gnu" VIDEO_CARDS="nvidia" EMERGE_DEFAULT_OPTS="--usepkgonly" On the core2duo system, the running kernel is 2.6.27-gentoo-r8. On the pentium4 system, the running kernel is 2.6.29-gentoo-r5. Everything works fine, except one thing : on the pentium4 system, I'm unable to emerge the nvidia-drivers package built from the core2duo system. Here is the error : # emerge nvidia-drivers Calculating dependencies... done! >>> Emerging binary (1 of 1) x11-drivers/nvidia-drivers-180.60 * nvidia-drivers-180.60.tbz2 MD5 SHA1 size ;-) ... [ ok ] >>> Extracting info * Could not find a usable .config in the kernel source directory. * Please ensure that /usr/src/linux points to a configured set of Linux sources. * If you are using KBUILD_OUTPUT, please set the environment var so that * it points to the necessary object directory so that it might find .config. * * ERROR: x11-drivers/nvidia-drivers-180.60 failed. * Call stack: * ebuild.sh, line 49: Called pkg_setup * environment, line 3425: Called linux-mod_pkg_setup * environment, line 2745: Called require_configured_kernel * environment, line 3685: Called die * The specific snippet of code: * die "Kernel not configured; no .config found in ${KV_OUT_DIR}"; * The die message: * Kernel not configured; no .config found in /lib/modules/2.6.27-gentoo-r8/build * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/temp/environment'. * I found a workaround : temporarily remove --usepkgonly from EMERGE_DEFAULT_OPTS on the pentium4 system to emerge the nvidia-drivers. But I think I will have the same problem each time I will upgrade the drivers, and/or for each package which use the require_configured_kernel() function from linux-info.eclass. Is there a better workaround please ? Is it possible to define a list of packages which will be built, even if --usepkgonly is used ? I tried to export KV_OUT_DIR="/usr/src/linux" before emerging nvidia-drivers, it didn't help. I will attach the emerge --info from the core2duo system. Thanks. Reproducible: Always
Created attachment 197574 [details] emerge --info from the core2duo
Kernel modules for the p4 should definitely be built on the p4 since kernels are not matching; no surprise there. Is there any reason you can't have --usepkg instead of --usepkgonly, move aside any core2-built packages for kernel modules so the p4 will not find them, and let p4 build all the kernel modules for itself?
I simply don't want to use the traditional portage tree on this system, or just for exceptions. I want to test as much as possible packages on the core2 system before merging them on the p4 system. But you're right, packages which requires a certain version of the kernel cannot be merged on another system with another kernel version. I will probably have the same problem when I want to merge dev-libs/klibc. I think I will upgrade both kernels to 2.6.30 to fix the problem and I will try to match them in the future. Sorry for the inconvenience, it's just frustrating to run an *emerge xorg-server*, and see a merging process of 140 binary packages fail on this kind of error.