Summary: | "Newer" portage versions not honoring CC variable so distcc breaks | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dave Nellans <dnellans> |
Component: | [OLD] Development | Assignee: | Nicholas Jones (RETIRED) <carpaski> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | azarah, ndiin1 |
Priority: | High | ||
Version: | 1.4_rc2 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | diff of /usr/lib/portage/bin/ebuild.sh |
Description
Dave Nellans
2003-01-16 11:00:12 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. 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? 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.) Created attachment 7674 [details, diff]
diff of /usr/lib/portage/bin/ebuild.sh
This small patch should fix the problem permanently as well.
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... 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. 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. I'm not sure I got that patch... I thought I asked for it again in an email. Do you still have it? 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. done and done portage-2.0.47-r1 |