Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262773 - sys-devel/distcc-3.* init script fails to set up distccd for cross compiling
Summary: sys-devel/distcc-3.* init script fails to set up distccd for cross compiling
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-17 08:16 UTC by Yang Zhao
Modified: 2009-03-20 16:36 UTC (History)
1 user (show)

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


Attachments
Pull all available and active compilers into distccd PATH (distcc_init.patch,698 bytes, patch)
2009-03-17 08:16 UTC, Yang Zhao
Details | Diff
distcc-init.patch (distcc-init.patch,695 bytes, patch)
2009-03-19 00:02 UTC, MATSUU Takuto (RETIRED)
Details | Diff
distcc-init.patch (distcc-init.patch,548 bytes, patch)
2009-03-19 17:22 UTC, MATSUU Takuto (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yang Zhao 2009-03-17 08:16:02 UTC
The init script for distcc-3.* currently starts distccd with PATH set to "$(gcc-config --get-bin-path):${PATH}".

This only pulls the current active gcc into PATH, and excludes all other cross-compiling gcc that's available, making the host unable to participate in certain compiles.
Comment 1 Yang Zhao 2009-03-17 08:16:46 UTC
Created attachment 185285 [details, diff]
Pull all available and active compilers into distccd PATH
Comment 2 Yang Zhao 2009-03-17 08:18:13 UTC
Comment on attachment 185285 [details, diff]
Pull all available and active compilers into distccd PATH

This patch to distccd init file pulls gcc bin paths for all active gcc profiles into PATH.
Comment 3 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-18 12:10:34 UTC
hmm, ${PATH} has all active pcompilers on my env.
Could you put results of these commands?

# gcc-config -l
# echo ${PATH}

btw, please don't remove '$(gcc-config --get-bin-path)' from first part of ${PATH}. It works as fail-safe.
Comment 4 Yang Zhao 2009-03-18 15:52:07 UTC
(In reply to comment #3)
> hmm, ${PATH} has all active pcompilers on my env.
> Could you put results of these commands?
> 
> # gcc-config -l
> # echo ${PATH}

yzhao@sui ~ $ gcc-config -l
 [1] i686-pc-linux-gnu-4.1.2 *

 [2] x86_64-pc-linux-gnu-4.1.2 *
yzhao@sui ~ $ echo ${PATH}
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/i686-pc-linux-gnu/gcc-bin/4.1.2:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2:/usr/qt/3/bin


${PATH} for a normal user will be set properly, but not for distccd launched through start-stop-daemon. This is related to #164818, where the fix involved explicitly extracting GCC_SPECS from profile.env instead of sourcing the whole thing. PATH needs some extra handling as well.
Comment 5 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-19 00:02:57 UTC
Created attachment 185477 [details, diff]
distcc-init.patch

how about this used $(gcc-config -E) and 'start-stop-daemon --env'?
Comment 6 Yang Zhao 2009-03-19 01:21:43 UTC
(In reply to comment #5)
> Created an attachment (id=185477) [edit]
> distcc-init.patch
> 
> how about this used $(gcc-config -E) and 'start-stop-daemon --env'?

Looks good to me; just confirmed it works as expected. I missed the -E option entirely.

On a minor point, you forgot to include a number reference to bug #164818.
Comment 7 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-19 17:22:02 UTC
Created attachment 185545 [details, diff]
distcc-init.patch

gcc-config-1.4.1 supports GCC_SPECS:

  28 Jan 2009; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.4.1,
  gcc-config-1.4.1.ebuild:
  Update libgcj.pc symlinks #136382 #216241 and set GCC_SPECS with -E
  #251271 by Diego E. Pettenò.
Comment 8 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-19 17:57:06 UTC
3.1-r3 in cvs. thanks.
Comment 9 Yang Zhao 2009-03-20 16:36:28 UTC
Verified. Thanks!