Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351979 - app-emulation/virtualbox-4.0.0-r1 FEATURES=distcc - argument to '-o' is missing
Summary: app-emulation/virtualbox-4.0.0-r1 FEATURES=distcc - argument to '-o' is missing
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 2 votes (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL: http://code.google.com/p/distcc/issue...
Whiteboard:
Keywords:
: 306409 451558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-18 08:32 UTC by Paolo Pedroni
Modified: 2013-07-01 13:58 UTC (History)
8 users (show)

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


Attachments
ebuild environment for app-emulation/virtualbox-4.0.0-r1 (environment,199.50 KB, text/plain)
2011-01-18 08:34 UTC, Paolo Pedroni
Details
Build log for app-emulation/virtualbox-4.0.0-r1 (virtualbox-4.0.0-r1:20110118-075634.log.gz.gz,5.49 KB, application/gzip)
2011-01-18 08:35 UTC, Paolo Pedroni
Details
Build log for app-emulation/virtualbox-4.0.0-r1 (virtualbox-4.0.0-r1:20110118-075634.log.gz,5.49 KB, application/gzip)
2011-01-18 10:39 UTC, Paolo Pedroni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Pedroni 2011-01-18 08:32:35 UTC
Whenever I try to compile and install app-emulation/virtualbox-4.0.0-r1 (it was the same with version 4.0.0) on a PC with distcc enabled it bombs out almost at once with the following message:

kmk: *** Exiting with status 2
emake failed
 * ERROR: app-emulation/virtualbox-4.0.0-r1 failed:
 *   kmk failed
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 5428:  Called die
 * The specific snippet of code:
 *       MAKE="kmk" emake TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" TOOL_YASM_AS=yasm KBUILD_PATH="${S}/kBuild" all || die "kmk failed"
 * 
 * If you need support, post the output of 'emerge --info =app-emulation/virtualbox-4.0.0-r1',
 * the complete build log and the output of 'emerge -pqv =app-emulation/virtualbox-4.0.0-r1'.
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME="/home/paolo/.gentoo/java-config-2/current-user-vm"
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info
 * The complete build log is located at '/var/log/portage/build/app-emulation/virtualbox-4.0.0-r1:20110118-075634.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/temp/environment'.
 * S: '/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE'

If I check the log I see several instances of this kind of error (on different file, of course):

x86_64-pc-linux-gnu-g++: x86_64-pc-linux-gnu-g++: argument to '-o' missing

distcc[9284] ERROR: compile (null) on localhost failed
argument to '-o' missing

kmk: *** [/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/out/linux.amd64/release/obj/RuntimeBldProg/common/checksum/adler32.o] Error 1
The failing command:
@x86_64-pc-linux-gnu-g++ -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-long-long -Wno-variadic-macros -O2 -fno-omit-frame-pointer -fno-strict-aliasing -m64 -I/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/src/VBox/Runtime/include -I/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/src/libs/liblzf-3.4 -I/usr/include/libxml2 -I/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/src/libs/boost-1.37.0 -I/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/include -I/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/out/linux.amd64/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib64/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib64/virtualbox\" -DRTPATH_APP_DOCS=\"\" -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -D_REENTRANT -DBOOST_DISABLE_ASSERTS -DIN_RING3 -DLOG_DISABLED -DIN_RT_R3 -DIN_SUP_R3 -DLDR_WITH_NATIVE -DLDR_WITH_ELF32 -DLDR_WITH_PE -DRT_WITH_VBOX -DRT_NO_GIP -DRT_WITH_ICONV_CACHE -Wp,-MD,/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/out/linux.amd64/release/obj/RuntimeBldProg/common/checksum/adler32.o.dep -Wp,-MT,/var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/out/linux.amd64/release/obj/RuntimeBldProg/common/checksum/adler32.o -Wp,-MP -o /var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/out/linux.amd64/release/obj/RuntimeBldProg/common/checksum/adler32.o /var/tmp/portage/app-emulation/virtualbox-4.0.0-r1/work/VirtualBox-4.0.0_OSE/src/VBox/Runtime/common/checksum/adler32.cpp

If I disable distcc with "FEATURES=-distcc MAKEOPTS=-j3 emerge -1 virtualbox", then everything works.

I will post the ebuild log and the environment ASAP.

Reproducible: Always

Steps to Reproduce:
1. Enable distcc
2. emerge -1 app-emulation/virtualbox
Actual Results:  
The errors above.

Expected Results:  
Package compiling and emerging fine.

# emerge --info =app-emulation/virtualbox-4.0.0-r1
Portage 2.1.9.25 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_185-with-gentoo-2.0.1
Timestamp of tree: Tue, 18 Jan 2011 07:25:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache compress-build-logs distcc distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ http://gentoo.mneisen.org/ http://gentoo.tiscali.nl/ http://gentoo.mirror.pw.edu.pl/ http://gentoo.supp.name/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac aalib acl acpi alsa amd64 ao audiofile bash-completion bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus dga djvu dri dts dvd dvdr emboss encode exif expat fam fbcon ffmpeg fftw firefox flac fontconfig foomaticdb fortran ftp gd gdbm gdu geoip ggi gif gimp gmp gnutls gphoto2 gpm graphviz gstreamer gtk handbook iconv icu idn ieee1394 imagemagick imlib java jbig jpeg jpeg2k kde lame lcms libcaca libnotify libsamplerate lm_sensors lua lzo mad mikmod mmap mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp pam pango pch pcre pdf perl png policykit ppds pppd python qt3support qt4 quicktime rdesktop readline recode samba scanner sdl semantic-desktop session smartcard sndfile sockets sox speex spell sqlite sqlite3 sse sse2 ssl startup-notification svg symlink sysfs syslog sysvipc taglib tcpd theora threads tidy tiff truetype udev unicode usb vcd vim-syntax vnc vorbis wmf wxwidgets x264 xattr xcb xcomposite xine xinerama xml xorg xpm xscreensaver xulrunner xv xvid yahoo zlib" ALSA_CARDS="intel8x0 virmidi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="kodak ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" SANE_BACKENDS="epson" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-emulation/virtualbox-4.0.0-r1 was built with the following:
USE="additions alsa extensions java (multilib) opengl python qt4 test vnc -doc -headless -pulseaudio -sdk -vboxwebsrv"

# emerge -pqv =app-emulation/virtualbox-4.0.0-r1
[ebuild   R   ] app-emulation/virtualbox-4.0.0-r1  USE="additions alsa extensions java opengl python qt4 -doc -headless -pulseaudio -sdk -vboxwebsrv (-vnc%*)"
Comment 1 Paolo Pedroni 2011-01-18 08:34:43 UTC
Created attachment 260107 [details]
ebuild environment for app-emulation/virtualbox-4.0.0-r1
Comment 2 Paolo Pedroni 2011-01-18 08:35:29 UTC
Created attachment 260109 [details]
Build log for app-emulation/virtualbox-4.0.0-r1
Comment 3 Rafał Mużyło 2011-01-18 10:21:58 UTC
All of the errors are along the lines of:
distcc[9272] ERROR: compile (null) on localhost failed
distcc[9277] ERROR: compile (null) on localhost failed
x86_64-pc-linux-gnu-gcc: distcc[9279] ERROR: compile (null) on localhost failed
distcc[9275] ERROR: compile (null) on localhost failed
argument to '-o' is missing

Perhaps it needs '-j1' ?
Comment 4 Paolo Pedroni 2011-01-18 10:38:18 UTC
(In reply to comment #3)
> Perhaps it needs '-j1' ?

No, it works fine with -j3 if run locally, without distcc.

Comment 5 Paolo Pedroni 2011-01-18 10:39:48 UTC
Created attachment 260124 [details]
Build log for app-emulation/virtualbox-4.0.0-r1
Comment 6 Paolo Pedroni 2011-01-19 16:29:26 UTC
Still there with app-emulation/virtualbox-4.0.2
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-19 19:34:06 UTC
*** Bug 306409 has been marked as a duplicate of this bug. ***
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-19 19:36:02 UTC
Guys this is a longstanding bug. Just have a look at the dupe I linked to this bug. 
Don't expect this bug becoming fixed anytime soon unless someone comes up with a working patch.
For the time being please compile it with distcc being disabled.
Comment 9 Alexey Timoshenko 2011-01-20 12:58:51 UTC
I tried to compile VirtualBox 4.0.2 with (or withot, nothing changed):

FEATURES=-distcc MAKEOPTS=-j7 emerge -l virtualbox

- with same results:

 ERROR: app-emulation/virtualbox-4.0.2 failed:
 *   kmk failed
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 5426:  Called die
 * The specific snippet of code:
 *       MAKE="kmk" emake TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" TOOL_YASM_AS=yasm KBUILD_PATH="${S}/kBuild" all || die "kmk failed"

!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm"
JAVACFLAGS="" COMPILER=""

But I have some syntax errors:

Config.kmk:4682: /var/tmp/portage/app-emulation/virtualbox-4.0.2/work/VirtualBox-4.0.2_OSE/out/linux.amd64/release/revi$
  File "/var/tmp/portage/app-emulation/virtualbox-4.0.2/work/VirtualBox-4.0.2_OSE/src/libs/xpcom18a4/python/gen_python_$
    print "VBOX_PYTHON%s_INC=%s%s" %(vers, known[0], sep)
                                 ^
SyntaxError: invalid syntax
  GEN     {C}/out/linux.amd64/release/revision.kmk

------
and

 File "/var/tmp/portage/app-emulation/virtualbox-4.0.2/work/VirtualBox-4.0.2_OSE/src/libs/xpcom18a4/python/gen_python_$
    print "VBOX_PYTHON%s_INC=%s%s" %(vers, known[0], sep)
                                 ^
SyntaxError: invalid syntax
  C       bin2c - {C}/src/bldprogs/bin2c.c

and

  File "/var/tmp/portage/app-emulation/virtualbox-4.0.2/work/VirtualBox-4.0.2_OSE/src/VBox/GuestHost/OpenGL/spu_loader/$
    """
      ^
SyntaxError: invalid syntax

-----
This is my first bug report and I am newbie at Gentoo, so may be it's not really THAT problem - but 'Syntax error' and the same error messages looks too strange for simple newbie mistake.


emerge --info output

rattus lesha # emerge --info
Portage 2.1.9.25 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-AMD_Phenom-tm-_II_X6_1075T_Processor-with-gentoo-1.12.14
Timestamp of tree: Wed, 19 Jan 2011 10:30:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r1
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/alexxy /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm gtk hal iconv ipv6 jpeg kde lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 10 Ștefan Talpalaru 2011-01-25 00:09:19 UTC
here's a way to disable distcc from the ebuild. In pkg_setup() add:

        if hasq distcc $FEATURES ; then
                export PATH=`echo $PATH | sed 's%/usr/lib/distcc/bin:%%'`
        fi
Comment 11 Alex Buell 2011-04-21 12:24:48 UTC
Just hit this one with virtualbox-4.0.4-r1. Something about the way it builds makes distcc barf.
Comment 12 Alex Buell 2011-05-19 21:27:08 UTC
FYI: Still present in 4.0.8
Comment 13 NiTr0 2011-06-05 13:32:18 UTC
It looks like distcc strips too long gcc command lines.
It'll good if maintainer add in future ebuilds workaround for disabling distcc for virtualbox (possible with some 'use' flag - for ex., 'safedistcc') - at least till it'll be compiled with distcc successfully.
Comment 14 Luca Santarelli 2011-06-12 08:50:44 UTC
I dont' know distcc more than the average guy, but I've just done a couple of tests and it seems to me the problem is not in the lenth of the command line but in a specific gcc option.

These are my observations:

luca@aiace ~ $ distcc
distcc 3.1 i686-pc-linux-gnu
[...]
Usage:
   distcc [COMPILER] [compile options] -o OBJECT -c SOURCE
[...]

Notice the -c SOURCE

The first compilation error for VirtualBox is this one:

i686-pc-linux-gnu-g++ -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-long-long -Wno-variadic-macros -O2 -fno-omit-frame-pointer -fno-strict-aliasing -m32 -I/mnt/storage/portage/tmp/portage/app-emulation/virtualbox-4.0.8/work/VirtualBox-4.0.8_OSE/include -I/mnt/storage/portage/tmp/portage/app-emulation/virtualbox-4.0.8/work/VirtualBox-4.0.8_OSE/out/linux.x86/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib/virtualbox\" -DRTPATH_APP_DOCS=\"\" -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_X86 -D__X86__ -DIN_RING3 -DLOG_DISABLED -Wp,-MD,/mnt/storage/portage/tmp/portage/app-emulation/virtualbox-4.0.8/work/VirtualBox-4.0.8_OSE/out/linux.x86/release/obj/filesplitter/filesplitter.o.dep -Wp,-MT,/mnt/storage/portage/tmp/portage/app-emulation/virtualbox-4.0.8/work/VirtualBox-4.0.8_OSE/out/linux.x86/release/obj/filesplitter/filesplitter.o -Wp,-MP -o /mnt/storage/portage/tmp/portage/app-emulation/virtualbox-4.0.8/work/VirtualBox-4.0.8_OSE/out/linux.x86/release/obj/filesplitter/filesplitter.o /mnt/storage/portage/tmp/portage/app-emulation/virtualbox-4.0.8/work/VirtualBox-4.0.8_OSE/src/bldprogs/filesplitter.cpp

Let me rewrite it in a more compact way:

i686-pc-linux-gnu-g++ -c -LOT_OF_OTHER_OPTIONS -o [path]filesplitter.o [path]filesplitter.cpp

Notice the first -c right next to i686-pc-linux-gnu-g++. gcc --help tells me this:

luca@aiace ~ $ gcc --help | grep "do not link"
  -c                       Compile and assemble, but do not link

I guess that distcc gets confused by the "-c" option in gcc, since if I change it, I get different results (both errors and compilation):

1. remove -c from gcc options.
i686-pc-linux-gnu-g++ -LOT_OF_OTHER_OPTIONS -o [path]filesplitter.o [path]filesplitter.cpp

i686-pc-linux-gnu-g++: no input files
distcc[653] ERROR: compile (null) on localhost failed

2. add "-c" before source file (respecting distcc usage but putting -c twice)
i686-pc-linux-gnu-g++ -c -LOT_OF_OTHER_OPTIONS -o [path]filesplitter.o -c [path]filesplitter.cpp

i686-pc-linux-gnu-g++: cannot specify -o with -c or -S with multiple files

3. add source path after first -c 
i686-pc-linux-gnu-g++ -c [path]filesplitter.cpp -LOT_OF_OTHER_OPTIONS -o [path]filesplitter.o [path]filesplitter.cpp

i686-pc-linux-gnu-g++: filesplitter.o: linker input file unused because linking not done

4. Same as 3 but removing source path at end of line:
i686-pc-linux-gnu-g++ -c [path]filesplitter.cpp -LOT_OF_OTHER_OPTIONS -o [path]filesplitter.o

(no output)
Success (but I wonder if .o respects "compile, assemble but not link").

Here my skills come to an end. Is this information useful to make some sense of this issue?
Comment 15 Luca Santarelli 2011-06-12 19:30:59 UTC
(In reply to comment #14)
I may have mis-reported an important information.
> 1. remove -c from gcc options.
> i686-pc-linux-gnu-g++ -LOT_OF_OTHER_OPTIONS -o [path]filesplitter.o
> [path]filesplitter.cpp

Please, read this, and the other three given examples, as:

distcc i686-pc-linux-gnu-g++ -LOT_OF_OTHER_OPTIONS -o [path]filesplitter.o [path]filesplitter.cpp
Comment 16 fergus.henderson 2011-11-02 01:23:46 UTC
I believe this is due to distcc issue 83
<http://code.google.com/p/distcc/issues/detail?id=83>
(a bug in the handling of multiple -Wp,... flags)
which is fixed in upstream svn revision 750
(see distcc.org).
Comment 17 Alex Alexander (RETIRED) gentoo-dev 2012-01-09 13:36:28 UTC
I've committed sys-devel/distcc-3.1-r6 with patch from link in comment #16, which fixes the virtualbox compilation problem, finally xD

Many thanks to fergus for link!

*distcc-3.1-r6 (09 Jan 2012)

  09 Jan 2012; Alex Alexander <wired@gentoo.org> +distcc-3.1-r6.ebuild,
  +files/distcc-3.1-argc-fix.patch:
  added patch that increases argc properly, fixing virtualbox compilation.
  acked by xarthisius and Ultrabug, bug #351979
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-15 12:00:05 UTC
*** Bug 451558 has been marked as a duplicate of this bug. ***
Comment 19 Joe Breuer 2013-07-01 13:58:17 UTC
Building virtualbox (here: virtualbox-4.2.14 on amd64) still fails, since distcc-3.1-r6 is not stable yet.

After upgrading to distcc-3.1-r6, virtualbox-4.2.14 builds correctly.

I've submitted a stabilization request for distcc as bug #475418