Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 84150 - CC gets set to "distcc distcc distcc" when using Apple's built in distcc-zeroconf
Summary: CC gets set to "distcc distcc distcc" when using Apple's built in distcc-zero...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2005-03-04 19:35 UTC by Robin Perkins
Modified: 2006-05-25 07:09 UTC (History)
1 user (show)

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


Attachments
only add a maximum of one distcc to CC and CXX (hasq_distcc.patch,536 bytes, patch)
2006-05-24 01:08 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Perkins 2005-03-04 19:35:32 UTC
CC gets set to "distcc distcc distcc" when using Apple's built in distcc-zeroconf after setting FEATURES="distcc" on ppc-macos. 

When trying to configure *any* package - configure fails with:
<code>
Beginning configuration for bash-3.0-release for powerpc-apple-darwin

checking for powerpc-apple-darwin-gcc... distcc distcc distcc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/bash-3.0-r8/work/bash-3.0/config.log

!!! ERROR: app-shells/bash-3.0-r8 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message. 
</code>

After investigating I found this block in ebuild.sh:
<code>
        if hasq distcc ${FEATURES} &>/dev/null; then
                if [ -d /usr/lib/distcc/bin ]; then
                        ...
                elif which distcc &>/dev/null; then
                       export CC="distcc $CC"
                       export CXX="distcc $CXX"
                fi
        fi
</code>

Apples distcc does not have /usr/lib/distcc/bin so the elif part is executed.

After changing elif part to:
export CC="distcc"
export CXX="distcc"

everything seems to be fine.

Reproducible: Always
Steps to Reproduce:
1. Add distcc to FEATURES in /etc/make.conf
2. emerge *any package that uses configure*
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-03-04 19:47:22 UTC
FEATURES="distcc" is meant to allow usage of distcc without configuring it outside of portage. You should do one or the other - not both.
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-01-08 22:10:52 UTC
Errr, are we done here then?...
Comment 3 Fabian Groffen gentoo-dev 2006-01-09 00:20:02 UTC
I guess Apple's installation of distcc is just not supported by portage currently.
Comment 4 Zac Medico gentoo-dev 2006-05-23 15:54:14 UTC
(In reply to comment #3)
> I guess Apple's installation of distcc is just not supported by portage
> currently.

Do you suggest some kind of fix or should we close this?
Comment 5 Fabian Groffen gentoo-dev 2006-05-24 00:16:17 UTC
ehm, yeah,  I suggest closed/wontfix.  Should somewhere document that we don't support apple's distcc.  I don't know enough about how this works in portage, and if the proposed fix affects anything else or is correct.
Comment 6 Zac Medico gentoo-dev 2006-05-24 01:01:06 UTC
After looking again at the "distcc distcc distcc" in the summary, I noticed that there's a bug where CC="distcc $CC" causes one more distcc to be added to the CC variable with each phase!  I've reproduced the problem locally. :)
Comment 7 Zac Medico gentoo-dev 2006-05-24 01:08:38 UTC
Created attachment 87365 [details, diff]
only add a maximum of one distcc to CC and CXX

This patch uses hasq to make sure that a maximum of one distcc is added to CC and CXX.
Comment 8 Zac Medico gentoo-dev 2006-05-24 01:57:07 UTC
This is fixed in svn r3408.
Comment 9 Zac Medico gentoo-dev 2006-05-25 07:09:21 UTC
This has been released in 2.1_pre2-r3.