Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14042 - "Newer" portage versions not honoring CC variable so distcc breaks
Summary: "Newer" portage versions not honoring CC variable so distcc breaks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-16 11:00 UTC by Dave Nellans
Modified: 2003-02-17 06:11 UTC (History)
2 users (show)

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


Attachments
diff of /usr/lib/portage/bin/ebuild.sh (fix.patch,422 bytes, patch)
2003-01-27 00:09 UTC, Eric Andresen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Nellans 2003-01-16 11:00:12 UTC
I'm not sure at what point this started happening but portage is no longer
honoring CC="distcc gcc" or any variation of when either exported explicitly or
set in /etc/make.conf.  This happens both with and without gcc-config (any
version) installed and is a portage issue because doing a manual compile with
./configure make etc distcc is used everytime.  There is another thread
suggesting line 137 or so in ebuild.sh is where the problem may arrise but i
don't have time to look into it just yet.
Comment 1 Eric Andresen 2003-01-24 16:49:06 UTC
I believe you're referring to line 141 of ebuild.sh which runs "source
/etc/profile.env" and thus replaces the settings of CC/CXX= from anywhere else
(command line, make.conf, etc).

Now, slightly off-topic, but still relevant, bug #13897 makes use of a new
version of the later gcc-config wrappers (1.2.9+) to unify gcc wrappers such as
distcc and ccache. This should make the reported problem not be an issue for
distcc as it currently stands. However, the CC and CXX settings should still
take priority from command line, then make.conf, then profile.env.
Comment 2 Dave Nellans 2003-01-26 23:58:28 UTC
This is exactly correct... as of portage 2.0.46-r9 which is the current unstable
version at least the priority in which CC and CXX is sourced is exactly opposite
of what it should be with profile.env overwriting make.conf which in turn
overwrites command line.  if a rewrite is coming for gcc-config that will make
this work appropriately should we just sit on this one until it is resolved, or
is there still a more fundemental portage problem here that needs to be addressed?
Comment 3 Eric Andresen 2003-01-27 00:04:55 UTC
The gcc-config wrapper replacement is not a 'fix' for this, nor should it really
be considered in the assessment of the problem. It was offered as an alternative
solution for the time being. I'm sure carpaski will get around to fixing this
issue when he can, but perhaps the solution that offers the least fussing at
this point is simply to edit your gcc profile(s) (/etc/env.d/gcc/*) to reflect
the CC/CXX variables you desire. (The usual env-update of course must follow.)
Comment 4 Eric Andresen 2003-01-27 00:09:38 UTC
Created attachment 7674 [details, diff]
diff of /usr/lib/portage/bin/ebuild.sh

This small patch should fix the problem permanently as well.
Comment 5 Dave Nellans 2003-01-27 00:33:17 UTC
the patch resolves the problem allowing command line exports to override
profile.env and possibly make.conf.  but make.conf still does not override
profile.env  i'm not a portage hacker so i'm not sure how this is all being
called to start figuring it out myself...
Comment 6 Nicholas Jones (RETIRED) gentoo-dev 2003-02-03 03:08:56 UTC
Ok. Patch is included for 2.0.46-r10 as an export fix, but the make.conf
cannot be remedied as desired as portage cannot (within reason) pick and
choose which variables it will interpret from the environment.

I've implemented FEATURES=distcc which should alieviate any issues with
it in the meantime.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-03 16:41:38 UTC
Nick, what did you do with the patch I sent you ?  It handled CC and CXX not
being set before /etc/profile.env was sourced a bit better.
Comment 8 Nicholas Jones (RETIRED) gentoo-dev 2003-02-04 21:47:56 UTC
I'm not sure I got that patch... I thought I asked for it again in an email.
Do you still have it?
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-05 05:33:41 UTC
Actually thinking about it .. it may be more complex than needed.  Just
add the:

 [ -n "$OCC" ] && export CC="$OCC"
 [ -n "$OCXX" ] && export CXX="$OCXX"

And im ok.
Comment 10 Nicholas Jones (RETIRED) gentoo-dev 2003-02-17 06:11:55 UTC
done and done
portage-2.0.47-r1