Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 120001 - linux-mod.eclass fails with distcc across non-identical platforms
Summary: linux-mod.eclass fails with distcc across non-identical platforms
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Kernel Miscellaneous
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-22 18:25 UTC by Yang Zhao
Modified: 2008-11-02 23:41 UTC (History)
4 users (show)

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


Attachments
emerge info of target machine (emerge-info.txt,2.27 KB, text/plain)
2006-01-24 13:28 UTC, Yang Zhao
Details
emerge info of distcc participating host (emerge-info.sui.txt,2.10 KB, text/plain)
2006-01-24 13:29 UTC, Yang Zhao
Details
distccd log from participating host (distcc.log,8.33 KB, text/plain)
2006-02-23 01:20 UTC, Yang Zhao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yang Zhao 2006-01-22 18:25:25 UTC
emerge madwifi-driver will fail if distcc is enabled, and one of the participating hosts is on a not completely compatible architecture with target host


Emerge snippet:

/var/tmp/portage/madwifi-driver-0.1401.20060117/work/madwifi-ng-r1401-20060117/net80211/ieee80211.c:1101: warning: asm operand 1 probably doesn't match constraints
distcc[23395] ERROR: compile /var/tmp/portage/madwifi-driver-0.1401.20060117/work/madwifi-ng-r1401-20060117/net80211/ieee80211.c on sui/1 failed
make[2]: *** [/var/tmp/portage/madwifi-driver-0.1401.20060117/work/madwifi-ng-r1401-20060117/net80211/ieee80211.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/madwifi-driver-0.1401.20060117/work/madwifi-ng-r1401-20060117/net80211] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.15-gentoo-r1'
make: *** [all] Error 2

!!! ERROR: net-wireless/madwifi-driver-0.1401.20060117 failed.
!!! Function linux-mod_src_compile, Line 505, Exitcode 2
!!! Unable to make                                  KERNELPATH=/usr/src/linux ATH_RATE=ath_rate/onoe all.
!!! If you need support, post the topmost build error, NOT this status message.


In this case, localhost is on march=pentium-m while host causing the error is on pentium-3


ebuild should be changed so that madwifi-driver is not distributed on compile
Comment 1 Henrik Brix Andersen 2006-01-23 02:24:35 UTC
Cluster, any idea how to solve this? As far as I know we do not have a RESTRICT=distcc?
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2006-01-23 03:13:01 UTC
(In reply to comment #1)
> Cluster, any idea how to solve this? As far as I know we do not have a
> RESTRICT=distcc?
> 

You can try restricting MAKEOPTS to just -j1 so that there are no jobs to distribute, but this does not of course solve the problem that there is probably a problem in crosscompiling madwifi-driver in general.
Comment 3 Henrik Brix Andersen 2006-01-24 12:13:33 UTC
Reporter, please post `emerge --info` from both localhost and the distcc node.
Comment 4 Yang Zhao 2006-01-24 13:28:34 UTC
Created attachment 78027 [details]
emerge info of target machine
Comment 5 Yang Zhao 2006-01-24 13:29:49 UTC
Created attachment 78028 [details]
emerge info of distcc participating host
Comment 6 Yang Zhao 2006-02-19 15:37:46 UTC
emerge --info provided
Comment 7 Henrik Brix Andersen 2006-02-20 02:49:39 UTC
Does other external kernel module ebuilds (e.g. net-wireless/hostap-driver) work with distcc?
Comment 8 Henrik Brix Andersen 2006-02-20 02:50:04 UTC
Forgot NEEDINFO.
Comment 9 Yang Zhao 2006-02-21 00:37:34 UTC
(In reply to comment #7)
> Does other external kernel module ebuilds (e.g. net-wireless/hostap-driver)
> work with distcc?

Negative. Fails with similar error:

make[1]: Entering directory `/usr/src/linux-2.6.15-gentoo-r1'
  CC [M]  /var/tmp/portage/hostap-driver-0.4.7/work/hostap-driver-0.4.7/driver/modules/hostap.o
  CC [M]  /var/tmp/portage/hostap-driver-0.4.7/work/hostap-driver-0.4.7/driver/modules/hostap_crypt_wep.o
  CC [M]  /var/tmp/portage/hostap-driver-0.4.7/work/hostap-driver-0.4.7/driver/modules/hostap_crypt_tkip.o
include/linux/skbuff.h: In function `prism2_wep_encrypt':
include/linux/skbuff.h:820: warning: asm operand 1 probably doesn't match constraints
include/linux/skbuff.h:820: error: impossible constraint in `asm'
distcc[18237] ERROR: compile /var/tmp/portage/hostap-driver-0.4.7/work/hostap-driver-0.4.7/driver/modules/hostap_crypt_wep.c on sui/1 failed
make[2]: *** [/var/tmp/portage/hostap-driver-0.4.7/work/hostap-driver-0.4.7/driver/modules/hostap_crypt_wep.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/hostap-driver-0.4.7/work/hostap-driver-0.4.7/driver/modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.15-gentoo-r1'
make: *** [2.6] Error 2
Comment 10 Henrik Brix Andersen 2006-02-21 02:34:25 UTC
Looks like a general problem with the kbuild system, then. Thank you for verifying this.
Comment 11 John Mylchreest (RETIRED) gentoo-dev 2006-02-21 04:10:34 UTC
can you please enable distcc debugging and paste the buildlogs please.
as far as I know, it isnt a specific issue with kbuild, since it just calls said compiler - possibly some Kbuild vs gentoo oddity?
Comment 12 Yang Zhao 2006-02-23 01:20:24 UTC
Created attachment 80504 [details]
distccd log from participating host
Comment 13 Yang Zhao 2006-04-11 07:12:32 UTC
Confirmed for util-linux as well...

gpt.c: In function `is_gpt_valid':
gpt.c:306: warning: integer constant is too large for "long" type
partx.c: In function `getblock':
partx.c:343: error: can't find a register in class `BREG' while reloading `asm'
distcc[8126] ERROR: compile partx.c on sui/1 failed
make: *** [partx.o] Error 1

!!! ERROR: sys-apps/util-linux-2.12r-r3 failed.
!!! Function src_compile, Line 139, Exitcode 2
!!! make partx failed
!!! If you need support, post the topmost build error, NOT this status message.


Also, sorry for the lack of distcc longs on target. The last time I tried to get one, it didn't work, and it's slipped my mind since. I'll try and try again sometime later.
Comment 14 Henrik Brix Andersen 2006-04-11 07:48:44 UTC
(In reply to comment #13)
> Confirmed for util-linux as well...

Please open a separate bug report for this as it has nothing to do with linux-mod.eclass.
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-05-08 08:50:40 UTC
This shouldn't be difficult to fix, just need to pass

emake HOSTCC=$(tc-getBUILD_CC) CC=$(tc-getCC)

to tell KBuild the right compilers to use.
I actually do that already in alsa-driver.
Comment 16 John Mylchreest (RETIRED) gentoo-dev 2006-10-16 07:12:58 UTC
Diego, that should already be in the current code anyways. Could you also review 133382 as I think this is going to be relevant?
Comment 17 nobody 2008-04-25 19:54:10 UTC
might help you in case you didn't catch it

but i think that bug is a dup of http://bugs.gentoo.org/show_bug.cgi?id=167844 because the pentium 3 that cause the trouble is also using an hardened kernel.

At least easy to test with same computers with non-hardened kernel
Comment 18 Gordon Malm (RETIRED) gentoo-dev 2008-11-01 14:47:35 UTC
Added RESTRICT="distcc" to linux-mod.eclass w/o realizing it needed special support.  Adding dependency bugs.
Comment 19 Gordon Malm (RETIRED) gentoo-dev 2008-11-02 23:41:53 UTC
This exact error has been fixed.  You're trying to pass a module through distcc to be built on a hardened host.  This wouldn't work before, see bug #167844.

Fixed via patch to distcc adding USE="hardened".  emerge --sync and rebuild
distcc with USE="hardened".