Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39374 - i2c-2.8.1 and lm-sensors-2.8.1 not building properly with distcc across different architectures
Summary: i2c-2.8.1 and lm-sensors-2.8.1 not building properly with distcc across diffe...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-25 12:41 UTC by Francois Guimond
Modified: 2006-03-21 04:27 UTC (History)
0 users

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


Attachments
fix to i2c ebuild (i2c-2.8.1.ebuild.patch,574 bytes, patch)
2004-01-25 12:45 UTC, Francois Guimond
Details | Diff
fix to lm-sensors ebuild (lm-sensors-2.8.1.ebuild.patch,602 bytes, patch)
2004-01-25 12:45 UTC, Francois Guimond
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Guimond 2004-01-25 12:41:36 UTC
The i2c and lm-sensors Makefiles use "gcc" as compiler, disregarding the system set CC variable.  This means on systems running distcc across different architectures, the resulting .o files will be of incompatible architectures (if they even build), because these require that the compiler be fully specified (e.g. i686-pc-linux-gnu-gcc instead of only gcc).

Reproducible: Sometimes
Steps to Reproduce:
Reproducing is easy, although results can vary depending on numerous race conditions which determine what gets built on what host and what architecture.  Simply need a setup with different architectures running distcc.  In my case this was a Pentium II 400 running Gentoo, a PowerMac G3 366 running Gentoo/PPC, and an Athlon 800 running Windows 98 SE.  Emerging on such a setup with distcc and make jobs set to spread the work around will almost certainly fail in the ebuilds' current state.
Actual Results:  
i2c resulted in incompatible architecture .o files getting installed as kernel
modules.  lm-sensors build failed when "-mcpu=pentium2" was used as a compile
option (unrecognized by the PowerMac's gcc).

Expected Results:  
Both packages set the compiler with the CC variable in their Makefiles.  Calling
make with CC=${CC} as a parameter, or patching the CC variable in their
Makefiles to the right value, would make sure the right compiler is used. 
Included are patches to the two ebuilds to fix this bug.

Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.22-gentoo-r5)
=================================================================
System uname: 2.4.22-gentoo-r5 i686 Pentium II (Deschutes)
Gentoo Base System version 1.4.3.10
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=pentium2 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-mcpu=pentium2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache distcc sandbox"
GENTOO_MIRRORS="ftp://gentoo.noved.org/ http://gentoo.noved.org/
ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa apm arts artswrappersuid avi berkdb cdr cjk crypt cscope cups dga
doc encode esd faad foomaticdb gatos gdbm gif gnome gpm gtk gtk2 imlib java jpeg
justify kde kerberos lcms ldap libg++ libwww mad mbox mikmod mmx motif mozilla
moznoirc mozsvg mpeg nas ncurses nls objc oggvorbis opengl oss pam parse-clocks
pdflib perl pic png ppds python qt quicktime radeon readline ruby samba sdk sdl
slang slp spell ssl svga tcltk tcpd tetex tiff truetype vim-with-x wmf x86 xml
xml2 xmms xv zlib"
Comment 1 Francois Guimond 2004-01-25 12:45:19 UTC
Created attachment 24404 [details, diff]
fix to i2c ebuild

Note that CC needs to also be specified in the install phase as i2c compiles
additional material during install.
Comment 2 Francois Guimond 2004-01-25 12:45:57 UTC
Created attachment 24405 [details, diff]
fix to lm-sensors ebuild
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-01-25 15:22:14 UTC
Fixed in CVS; should be in rsync within an hour. Thanks!
Comment 4 Francois Guimond 2004-01-29 05:27:49 UTC
looks good, thanks for the quick response
Comment 5 kfm 2006-03-21 04:27:07 UTC
This was resolved quite a while ago. Time for full closure.