Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131316 - busybox 1.12.1 can't compile with sys-devel/distcc
Summary: busybox 1.12.1 can't compile with sys-devel/distcc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 04:02 UTC by Lars Langhans
Modified: 2008-11-21 00:13 UTC (History)
4 users (show)

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


Attachments
busybox ebuild without cross compile feature (busybox-1.1.3-r1.ebuild,6.74 KB, text/plain)
2006-09-06 05:55 UTC, Lars Langhans
Details
busybox-1.12.1-cross-distcc.diff (busybox-1.12.1-cross-distcc.diff,581 bytes, patch)
2008-11-05 23:18 UTC, MATSUU Takuto (RETIRED)
Details | Diff
busybox-1.12.2-cross-distcc.diff (busybox-1.12.2-cross-distcc.diff,991 bytes, patch)
2008-11-20 16:18 UTC, MATSUU Takuto (RETIRED)
Details | Diff
busybox-1.12.2-cross-distcc.diff (busybox-1.12.2-cross-distcc.diff,810 bytes, patch)
2008-11-20 16:55 UTC, MATSUU Takuto (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Langhans 2006-04-26 04:02:19 UTC
Can't compile busybox in a normal manner on my system.

emerge busybox failes with:
--------------------- snap ------------------
i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -mtune=athlon-xp -fomit-frame-pointer -pipe -I/var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/libbb -funsigned-char -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wstrict-prototypes -Wshadow -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG    -I/var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/libbb -funsigned-char -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wstrict-prototypes -Wshadow -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG     -c -o /var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/archival/ar.o /var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/archival/ar.c
distcc[21641] ERROR: compile /var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/applets/busybox.c on moon/2,lzo failed with exit code 110
make: *** [/var/tmp/portage/busybox-1.1.0/work/busybox-1.1.0/applets/busybox.o] Fehler 110

!!! ERROR: sys-apps/busybox-1.1.0 failed.
!!! Function src_compile, Line 138, Exitcode 2
!!! build failed
!!! If you need support, post the topmost build error, NOT this status message.
---------------------- snap ---------------------

But I can compile it with
FEATURES="-distcc" emerge busybox

Maybe my distcc/ccache is disconfigured, but most other packages are compileable very well. 
And I found the reason, why is the compiler i686*gcc used instead $(CC) out of my make.conf file? Seems a bug in busybox*ebuild

My distcc compiler helper (the other computer) is a i586*gcc disconfigured system. I set CC="gcc" and CXX="g++" in both make.conf's and most is compileable.

------------------------ snip ---------------------
emerge --info


Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15.1 i686)
=================================================================
System uname: 2.6.15.1 i686 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.14
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -mtune=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -mtune=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS=""
LANG="de_DE"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage-lla"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext 7zip X aac aalib alsa apm arts artswrappersuid audiofile avi berkdb bitmap-fonts bzip2 cdr cli crypt cups curl dga directfb dri dv dvd dvdr dvdread eds emacs emboss encode esd exif expat faad fam fbcon ffmpeg firefox foomaticdb gcj gdbm gif glut gphoto2 gstreamer gtk gtk2 hal idn ieee1394 imagemagick imlib ipv6 isdnlog java jpeg kde kqemu lcms libg++ libwww lua mad maildir mikmod mmx mmxext mng motif mozilla mp3 mpeg ncurses netbeans nls ogg oggvorbis openal opengl oss pam parse-clocks pcre pda pdflib perl png pppd python qemu-fast qt quicktime readline reflection rtc samba scanner sdl session softmmu spell spl sse ssl tcpd tiff transcode truetype truetype-fonts type1-fonts udev usb vorbis xanim xine xml2 xmms xorg xv xvid xvmc zlib video_cards_nv video_cards_nvidia userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Lisa Seelye (RETIRED) gentoo-dev 2006-05-06 09:16:03 UTC
Need the digest fixed before I can work on this, sorry.
Comment 2 Lisa Seelye (RETIRED) gentoo-dev 2006-05-06 09:19:19 UTC
eep sorry for the bug spam, was my error. Wrong pycrpto version. false alarm!
Comment 3 Lisa Seelye (RETIRED) gentoo-dev 2006-05-06 17:08:28 UTC
This WORKSFORME.  What's the emerge --info of your other volunteer machine(s)?
Comment 4 Lars Langhans 2006-05-07 11:43:40 UTC
my emerge of the other machine
Some words, it was a Pentium 200MMX 'til half year ago, now a new ;-) Athlon, I only changed the mainboard, it's proc and RAM, nothing else. The system was never changed/updated from i586 to i686, because why, as long as it runs most the time very well.

------------------ snip ------------------------
Portage 2.0.54 (default-linux/x86/no-nptl, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15.1 i686)
=================================================================
System uname: 2.6.15.1 i686 AMD Athlon(tm) XP 2200+
Gentoo Base System version 1.6.14
distcc 2.18.3 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.2.3-r1, 2.3.5, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.4.3-r4, 1.5.22
virtual/os-headers:  2.4.19-r1, 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=pentium -O2 -fomit-frame-pointer -pipe"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS=""
LANG="de_DE@euro"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage-lla"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apache2 apm berkdb bitmap-fonts bzip2 cdr cli crypt cups curl doc dri eds emboss expat foomaticdb gd gdbm gif gstreamer gtk2 imlib ipv6 isdnlog java jpeg libg++ libwww mad maildir mhash mikmod modperl mp3 nas ncurses nls ogg pam pcre pdflib perl png pppd python readline recode reflection samba session slang spell spl ssl tcpd tetex tiff truetype-fonts type1-fonts udev usb vorbis xml xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS
Comment 5 Lisa Seelye (RETIRED) gentoo-dev 2006-05-28 17:00:08 UTC
Can you try this without using compression in your distcc setup please?
Comment 6 Lars Langhans 2006-05-30 03:11:39 UTC
Yes, I can. 
What I've done: 
I removed the ',lzo' from the /etc/distcc/hosts file but the error seems to be the same. Take a look in my snippet.

But, some more words:
I'm using a working ccache environment also. After do a emerge busybox again, some more files can compile, because the first 2-3 comes out of the cache.
I start at least 4 times the 'emerge busybox' and suddenly it compiles complete.  Hmm....

Due to the fact I can't believe this, I changed CCACHE_DIR to an other directory and try this again and indeed, I have to do emerge busybox 4 times after it compiles complete. But without using distcc :-(

But after I change my processor speed (1GHz to 1.8GHz) by switching the CoolnQuiet feature off, the error occurs more often, I need more than 4 times the emerge command.

So I think my idea by not using distcc for busybox is the best (for me).


-------------------- snip --------------------
i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -mtune=athlon-xp -fomit-frame-pointer -pipe -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/libbb -funsigned-char -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wstrict-prototypes -Wshadow -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG    -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/libbb -funsigned-char -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wstrict-prototypes -Wshadow -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG     -c -o /space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/applets/busybox.o /space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/applets/busybox.c
i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -mtune=athlon-xp -fomit-frame-pointer -pipe -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/libbb -funsigned-char -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wstrict-prototypes -Wshadow -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG    -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/include -I/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/libbb -funsigned-char -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wstrict-prototypes -Wshadow -Os -march=i386 -mpreferred-stack-boundary=2 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG     -c -o /space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/archival/ar.o /space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/archival/ar.c
distcc[25324] ERROR: compile /var/tmp/ccache2/busybox.tmp.monster.25309.i on moon/2 failed with exit code 110
make: *** [/space/local/Media1/big-temp/portage/busybox-1.1.0/work/busybox-1.1.0/applets/busybox.o] Fehler 110
Comment 7 Lisa Seelye (RETIRED) gentoo-dev 2006-08-06 15:23:12 UTC
Sounds like there are some funky hardware issues going on for you.  I'd recommend running memtest or verifying that your hardware is sound.  Also clear your ccache to ensure it hasn't cached bogus things.
Comment 8 Lisa Seelye (RETIRED) gentoo-dev 2006-09-04 04:16:24 UTC
Nothing heard.
Comment 9 Lars Langhans 2006-09-06 05:55:41 UTC
Created attachment 96168 [details]
busybox ebuild without cross compile feature

I removed the "${CROSS}" in the (e)make build, works very well in my environment.
Comment 10 Lars Langhans 2006-09-06 06:04:12 UTC
Sorry for little bit longer absense, but holiday is so important...

I reopend the bug, because it's not fixed. Also it is not a problem of my hardware. It is a problem with distcc and the i686-pc-* names for the compiler.

In the busybox*.ebuild I found the follows line, which checks for ${CHOST]-ar and set the CROSS env variable to it, so the i686-pc-linux-gnu- compiler is taken, but why?

type -p ${CHOST}-ar > /dev/null && export CROSS=${CHOST}-

I changed the ebuild this way, I removed all ${CROSS} appearence and try to emerge again. It works for me in my distcc environment very well.

Ebuild is attached.

In a normal environment the gcc should all the time the right compiler choice not the i686-pc-linux-gcc compiler, isn't it?

Regards
Lars
Comment 11 amette 2007-02-06 21:05:41 UTC
Pretty much the same here with busybox-1.2.2.1, it just seems to fail way earlier. With distcc-cross-compile (from i686 distributed to x86_64), the following happens:
----------------
symbol.c:645: Warnung: Typkonvertierung von Zeiger auf Ganzzahl anderer Breite
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: i386:x86-64 architecture of input file `conf.o' is incompatible with i386 output
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: i386:x86-64 architecture of input file `zconf.tab.o' is incompatible with i386 output
/bin/sh: line 1: 22137 Segmentation fault      ./scripts/config/conf -y /var/tmp/portage/busybox-1.2.2.1/work/busybox-1.2.2.1/Config.in >/dev/null
make: *** [allyesconfig] Error 139
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
make: *** [oldconfig] Segmentation fault
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/busybox-1.2.2.1/work/busybox-1.2.2.1 ...
  HOSTLINK scripts/bb_mkdep
make: *** [include/bb_config.h] Segmentation fault

!!! ERROR: sys-apps/busybox-1.2.2.1 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  busybox-1.2.2.1.ebuild, line 176:   Called die

!!! build failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
------------------

When I emerge like this:
    # FEATURES="-distcc" emerge --resume
it works fine:
------------------
>>> Unpacking busybox-1.2.2.1.tar.bz2 to /var/tmp/portage/busybox-1.2.2.1/work
tar: Read 4096 bytes from -
 * Applying bb.patch ...                                                                                                                                                                     [ ok ]
 * Applying gcc2.patch ...                                                                                                                                                                   [ ok ]
 * # CONFIG_DMALLOC is not set
 * # CONFIG_FEATURE_SUID_CONFIG is not set
 * # CONFIG_BUILD_AT_ONCE is not set
 * # CONFIG_BUILD_LIBBUSYBOX is not set
 * CONFIG_FEATURE_SH_IS_ASH=y
 * # CONFIG_FEATURE_SH_IS_NONE is not set
 * # CONFIG_STATIC is not set
    [...]
 * # CONFIG_DEBUG_CROND_OPTION is not set
 * # CONFIG_FEATURE_UDHCP_DEBUG is not set
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/busybox-1.2.2.1/work/busybox-1.2.2.1 ...
  HOSTLINK scripts/bb_mkdep
  HOSTLINK scripts/usage
  GEN include/bbconfigopts.h
  GEN .depend
  CC applets/applets.o
---------------
........and so on.
Didn't try with removing "${CROSS}".
Comment 12 Lars Langhans 2007-02-07 08:11:52 UTC
FEATURES="-distcc" works all the time for me but
but in a multi computer environment like me (Athlon64, Core Duo, Athlon 2200+) "-distcc" is not a solution. I would like to use all computers to help at compile time. Or is there a possibility to give special packages like "busybox" special FEATURES parameter?
Like /etc/portage/package.use where I can set special USE parameters for some packages?
Maybe there exist a /etc/portage/package.features?

Comment 13 mephinet 2007-09-22 09:43:58 UTC
Lars, can you check whether you've followed the steps outlined in <http://www.gentoo.org/doc/en/cross-compiling-distcc.xml>? Because I had similar problems with distcc on busybox until I correctly setup the wrapper and symlinks in /usr/lib/distcc/bin.
Comment 14 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-05 22:59:23 UTC
reassign to busybox maintainer.

it has still failed to compile in 1.12.1.
Comment 15 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-05 23:18:28 UTC
Created attachment 170864 [details, diff]
busybox-1.12.1-cross-distcc.diff

CROSS_COMPILE and HOSTCC variables are used before including Makefile.flags.
Comment 16 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-19 17:12:34 UTC
vapier: Please apply busybox-1.12.1-cross-distcc.diff to 1.12.2. It fixes the issue.
or could I add busybox-1.12.2-r1.ebuild?
Comment 17 SpanKY gentoo-dev 2008-11-20 00:36:57 UTC
there is no C++ code in use, so there is no point in setting HOSTCXX

if you're going to delete Makefile.flags like that, then move the SKIP_STRIP to the top of src_compile()

the CROSS_COMPILE sed is not very good ... make it look like the others:
s:=.*:
Comment 18 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-20 16:18:50 UTC
Created attachment 172531 [details, diff]
busybox-1.12.2-cross-distcc.diff

rewrite
Comment 19 SpanKY gentoo-dev 2008-11-20 16:20:29 UTC
dont pass SKIP_STRIP via make cmdline, do `export` at the top of src_compile
Comment 20 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-20 16:55:40 UTC
Created attachment 172534 [details, diff]
busybox-1.12.2-cross-distcc.diff
Comment 21 SpanKY gentoo-dev 2008-11-20 19:40:53 UTC
that looks fine ... feel free to commit

thanks
Comment 22 MATSUU Takuto (RETIRED) gentoo-dev 2008-11-21 00:13:07 UTC
1.12.2-r1 in cvs.