Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 287225 - linux-mod fails with recent (2.6.32) ARCH handling changes
Summary: linux-mod fails with recent (2.6.32) ARCH handling changes
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 286835 286900 287335 288039 288720 288885 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-01 12:10 UTC by Maciej Piechotka
Modified: 2010-02-04 14:02 UTC (History)
16 users (show)

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


Attachments
Add a check in toolchain-funcs to check for kernel versions 2.6.32 and up. (toolchain-funcs-2.6.32-fix.patch,1.11 KB, patch)
2009-10-04 19:09 UTC, Kelvie Wong
Details | Diff
Unifying kernel arch to x86_64 (toolchain-funcs-fix.patch,601 bytes, patch)
2009-10-07 13:00 UTC, Denis Kaganovich
Details | Diff
Unifying kernel arch to x86_64 + check for kernel versions 2.6.32 for i386 (toolchain-funcs-fix.patch,1.13 KB, patch)
2009-10-07 13:26 UTC, Denis Kaganovich
Details | Diff
x86 -> i386, amd64 -> x86_64, no kernel version check (toolchain-funcs-fix.patch,1.02 KB, patch)
2009-10-07 13:42 UTC, Denis Kaganovich
Details | Diff
same, but minimal (toolchain-funcs-fix.patch,1.25 KB, patch)
2009-10-07 13:58 UTC, Denis Kaganovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2009-10-01 12:10:40 UTC
* Preparing thinkpad_ec module
make HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS= KSRC=/usr/src/linux KBUILD=/usr/src/linux default
make -C /usr/src/linux M=/var/tmp/paludis/app-laptop-tp_smapi-0.40/work/tp_smapi-0.40 O=/usr/src/linux modules
make[1]: Entering directory `/usr/src/linux-2.6.32-rc1'
make[1]: Leaving directory `/usr/src/linux-2.6.32-rc1'
/usr/src/linux-2.6.32-rc1/Makefile:210: *** ARCH changed from "i386" to "x86". Use "make mrproper" to fix it up.  Stop.
make[1]: *** [sub-make] Error 2
make: *** [modules] Error 2
/usr/libexec/paludis/utils/emake: emake returned error 2

!!! ERROR in app-laptop/tp_smapi-0.40::gentoo:
!!! In linux-mod_src_compile at line 3926
!!! Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  KSRC=/usr/src/linux KBUILD=/usr/src/linux default

!!! Call stack:
!!!    * linux-mod_src_compile (/var/tmp/paludis/app-laptop-tp_smapi-0.40/temp/loadsaveenv:3926)
!!!    * src_compile (/var/tmp/paludis/app-laptop-tp_smapi-0.40/temp/loadsaveenv:4886)
!!!    * ebuild_f_compile (/usr/libexec/paludis/2/src_compile.bash:56)
!!!    * ebuild_main (/usr/libexec/paludis/ebuild.bash:598)
!!!    * main (/usr/libexec/paludis/ebuild.bash:626)

diefunc: making ebuild PID 10159 exit with error
die trap: exiting with error.

Install error:
  * In program paludis --log-level qa --preserve-world --install --serialised 0.37 package;=app-laptop/tp_smapi-0.40:0::gentoo;installed;has_all_deps;P:
  * When performing install action from command line:
  * When executing install task:
  * When installing 'app-laptop/tp_smapi-0.40:0::gentoo' replacing { 'app-laptop/tp_smapi-0.40:0::installed' }:
  * When running an ebuild command on 'app-laptop/tp_smapi-0.40:0::gentoo':
  * Install error: Install failed for 'app-laptop/tp_smapi-0.40:0::gentoo'

It seems that now ARCH should be i386 back and Makefile sets SRCARCH to x86.

PS. Problem occures also with default config
PPS. Setting in toolchain eclass to report i386 for kernel works.

Reproducible: Always
Comment 1 Robert Schultz 2009-10-02 02:59:51 UTC
I get the same ARCH error message as Comment #0 mentions. I was attempting to install nvidia-drivers against vanilla-sources-2.6.32-rc1

I downgraded to 2.6.31.1 and it works perfectly fine.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-10-02 12:30:07 UTC
*** Bug 287335 has been marked as a duplicate of this bug. ***
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-10-02 13:33:46 UTC
*** Bug 286835 has been marked as a duplicate of this bug. ***
Comment 4 Kelvie Wong 2009-10-04 19:09:53 UTC
Created attachment 206028 [details, diff]
Add a check in toolchain-funcs to check for kernel versions 2.6.32 and up.

I had to reboot into the new kernel before this would work, so it can detect the new kernel version.
Comment 5 Kelvie Wong 2009-10-04 19:10:54 UTC
Also, in case anyone doesn't know, the file is located in /usr/portage/eclass/

Comment 6 Kevin Parent 2009-10-05 01:40:16 UTC
Kelvie's patch worked for me.
Comment 7 Lubomir Schmidt 2009-10-07 06:46:56 UTC
Thanks Kelvie. Fixed also for me.
Comment 8 Denis Kaganovich 2009-10-07 13:00:22 UTC
Created attachment 206311 [details, diff]
Unifying kernel arch to x86_64

IMHO there are overminded code. Physically trees are unifyed (x86_64 & x86), but kernels - 2.6.20-2.6.32 - understanding ARCH=x86_64 like native. Else show me case, when attached patch is wrong.
Comment 9 Denis Kaganovich 2009-10-07 13:26:06 UTC
Created attachment 206313 [details, diff]
Unifying kernel arch to x86_64 + check for kernel versions 2.6.32 for i386

Kelvie's x86/i386 and unifyed x86_64 for amd64.
Comment 10 Denis Kaganovich 2009-10-07 13:42:14 UTC
Created attachment 206318 [details, diff]
x86 -> i386, amd64 -> x86_64, no kernel version check

I check on 2.6.27 - for 32 bit good ARCH=i386 too. Then no sense to check version. Just 32bit is i386, 64bit is x86_64. If no external reason to else...
Comment 11 Denis Kaganovich 2009-10-07 13:58:16 UTC
Created attachment 206321 [details, diff]
same, but minimal
Comment 12 SpanKY gentoo-dev 2009-10-07 23:58:12 UTC
support for older versions should not be dropped
Comment 13 404 Error 2009-10-08 01:24:34 UTC
toolchain-funcs-fix.patch works wonderfully well for me.

Comment 14 Denis Kaganovich 2009-10-08 11:29:08 UTC
(In reply to comment #12)
> support for older versions should not be dropped
> 

IMHO all versions works same. Just once apon a time "i386" and "x86_64" turned from real arches to aliases for "x86" tree. Only if one lost version do not have temp. bug (I don't know)...

Current code IMHO just trying to use "real" arch, but kernel.org team looks like primary support for aliases.
Comment 15 Patrick Lauer gentoo-dev 2009-10-08 23:48:18 UTC
*** Bug 288039 has been marked as a duplicate of this bug. ***
Comment 16 Justin Lecher (RETIRED) gentoo-dev 2009-10-09 20:00:27 UTC
*** Bug 286900 has been marked as a duplicate of this bug. ***
Comment 17 SpanKY gentoo-dev 2009-10-11 10:03:49 UTC
opinions really arent good enough.  the only way that patch will get merged is if it is actually tested against the versions in question.  otherwise your only option is to add another test for newer kernel versions.
Comment 18 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-10-13 14:47:00 UTC
*** Bug 288885 has been marked as a duplicate of this bug. ***
Comment 19 Raphaël Droz 2009-10-20 12:51:12 UTC
With git-sources-2.6.32_rc4-r1 on amd64, the attachment #206321 [details, diff] solved the compilation error of both :
x11-drivers/nvidia-drivers-190.40 (bug #288720) and app-misc/lirc-0.8.6 (part of #286227)
Comment 20 François Valenduc 2009-10-21 20:06:26 UTC
The problematic commit (575543347b5baed0ca927cb90ba8807396fe9cc9, kbuild: save ARCH & CROSS_COMPILE when building a kernel) was reverted in 2.6.32-rc5. So these patches don't seem to be needed anymore.
Comment 21 SpanKY gentoo-dev 2009-10-22 00:21:21 UTC
no acceptable patches have been posted, and the issue only presents in -rc kernels, so nothing to be done here
Comment 22 SpanKY gentoo-dev 2009-10-22 00:21:34 UTC
*** Bug 288720 has been marked as a duplicate of this bug. ***
Comment 23 Jason 2009-11-04 02:15:01 UTC
Im having the same (i think) issue with the  2.6.31-tuxonice kernel..
can someone please verify and/or suggest if I should open a new bug?

-db


tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:244: error: unknown field 'client_register' specified in initializer
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:244: warning: initialization makes integer from pointer without a cast
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:244: error: initializer element is not computable at load time
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:244: error: (near initialization for 'nv_i2c_adapter_prototype.level')
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:245: error: unknown field 'client_unregister' specified in initializer
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:245: warning: missing braces around initializer
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:245: warning: (near initialization for 'nv_i2c_adapter_prototype.bus_lock')
/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.c:245: warning: initialization makes integer from pointer without a cast
make[4]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv/nv-i2c.o] Error 1
make[3]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86-180.60-pkg0/usr/src/nv] Error 2
make[2]: *** [sub-make] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
 * 
 * ERROR: x11-drivers/nvidia-drivers-180.60 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3880:  Called linux-mod_src_compile
 *             environment, line 2886:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CROSS_COMPILE=${CHOST}-                         LDFLAGS=\"$(get_abi_LDFLAGS)\"                                               ${BUILD_FIXES}                                          ${BUILD_PARAMS}         ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux           SYSOUT=/lib/modules/2.6.31-tuxonice/build HOST_CC=i686-pc-linux-gnu-gcc clean module
 * 
 * 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'.
 * 

>>> Failed to emerge x11-drivers/nvidia-drivers-180.60, Log file:

>>>  '/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/temp/build.log'

 * Messages for package x11-drivers/nvidia-drivers-180.60:

 * 
 * ERROR: x11-drivers/nvidia-drivers-180.60 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3880:  Called linux-mod_src_compile
 *             environment, line 2886:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CROSS_COMPILE=${CHOST}-                         LDFLAGS=\"$(get_abi_LDFLAGS)\"                                               ${BUILD_FIXES}                                          ${BUILD_PARAMS}         ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux           SYSOUT=/lib/modules/2.6.31-tuxonice/build HOST_CC=i686-pc-linux-gnu-gcc clean module
 * 
 * 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'.
 * 

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.
Comment 24 labor_ratte 2010-02-04 14:02:43 UTC
Adding me to CC, and here is a link to my last adventures:
http://www.nvnews.net/vbulletin/showthread.php?t=144436

After changing toolchain-funcs.eclass according to comment #19,
compilation of nvidia-drivers-195.36.03 under vanilla-sources-2.6.33-rc6 (amd64)
was successful.