Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 277451 - nvidia-drivers, kernel version, linux-info.eclass and --usepkgonly conflict
Summary: nvidia-drivers, kernel version, linux-info.eclass and --usepkgonly conflict
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-11 18:23 UTC by Fab
Modified: 2009-07-20 15:10 UTC (History)
0 users

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


Attachments
emerge --info from the core2duo (infos,3.46 KB, text/plain)
2009-07-11 18:24 UTC, Fab
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fab 2009-07-11 18:23:06 UTC
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
Comment 1 Fab 2009-07-11 18:24:15 UTC
Created attachment 197574 [details]
emerge --info from the core2duo
Comment 2 Wormo (RETIRED) gentoo-dev 2009-07-17 06:52:50 UTC
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?
Comment 3 Fab 2009-07-20 15:10:30 UTC
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.