Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 773652 - sys-devel/distcc fails at i686 cross compile
Summary: sys-devel/distcc fails at i686 cross compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2021-03-01 22:13 UTC by Ville Syrjala
Modified: 2023-09-27 04:27 UTC (History)
4 users (show)

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


Attachments
[PATCH] distcc: fix i686 cross compile (0001-distcc-fix-i686-cross-compile.patch,777 bytes, patch)
2021-03-02 15:35 UTC, Ville Syrjala
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ville Syrjala 2021-03-01 22:13:28 UTC
I finally got fed up with distcc i686 cross compilation being miserable, and I tracked it down to some silly stuff that removes the "-pc" from the host tuple: https://github.com/distcc/distcc/blob/033630dfe00951d9511c8c2a3dc17f3c9328cf58/src/compile.c#L593
It then goes to look for an executable in PATH that matches the mangled name, which fails since the executable has the "-pc" in the filename.

In fact looks like it's a known issue upstream refuses to fix because they claim it would break Debian/etc.: https://github.com/distcc/distcc/issues/377
I don't have any Debian/etc. installations around to check so won't bother reopening the upstream argument.

I'm now carrying a patch on all my i686 machines to skip that crap. I would suggest such a patch should be part of the actual ebuild.

Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-03-01 23:10:13 UTC
I agree with you and left an angry comment there.  Yes, distcc is a really bad project.  It's the kind of upstream that fixes only bugs that affect their corporate sponsors/employers, and don't care that things are broken for a lot of people (see distcc-pump).

Could you make a patch for me to apply?
Comment 2 Maciej Mrozowski gentoo-dev 2021-03-01 23:52:57 UTC
Did you try setting that DISTCC_NO_CROSS_REWRITE thingy from https://github.com/distcc/distcc/commit/2b160f3d20bc235c02c3b3da89d02a52509768e8 ?
Comment 3 Ville Syrjala 2021-03-02 15:34:01 UTC
(In reply to Maciej Mrozowski from comment #2)
> Did you try setting that DISTCC_NO_CROSS_REWRITE thingy from
> https://github.com/distcc/distcc/commit/
> 2b160f3d20bc235c02c3b3da89d02a52509768e8 ?

We want it to rewrite, not prevent it from rewriting.
Comment 4 Ville Syrjala 2021-03-02 15:35:36 UTC
Created attachment 689082 [details, diff]
[PATCH] distcc: fix i686 cross compile

This is the patch I threw into /etc/portage/patches on my i686 machines.
Comment 5 Larry the Git Cow gentoo-dev 2021-03-02 18:16:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76151f32fbd41247e5d01f88207db2a084f6e661

commit 76151f32fbd41247e5d01f88207db2a084f6e661
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-03-02 17:23:51 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-03-02 18:16:45 +0000

    sys-devel/distcc: Disable CHOST rewrites that break i686 cross
    
    Closes: https://bugs.gentoo.org/773652
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 ...stcc-3.3.3-r2.ebuild => distcc-3.3.3-r3.ebuild} |  2 ++
 .../files/distcc-3.3.3-no-rewrite-chost.patch      | 28 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
Comment 6 Ville Syrjala 2023-09-26 14:20:15 UTC
This broke again because the patch was not included in the distcc-3.4 ebuild for whatever reason.

Apparently upstream has finally come up with a fix for this:
https://github.com/distcc/distcc/commit/850db9eec0d5dd7f47ade8ffca91b679081f6d85

Tested that one here and it works too. So please either pick that up, or reinstate the original hack patch.
Comment 7 Larry the Git Cow gentoo-dev 2023-09-27 04:27:11 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a43ee9d85165ae7913807d321bf3e73c32fd3247

commit a43ee9d85165ae7913807d321bf3e73c32fd3247
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-27 04:26:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-27 04:26:27 +0000

    sys-devel/distcc: backport CHOST rewriting fix (deux)
    
    Closes: https://bugs.gentoo.org/773652
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/distcc/distcc-3.4-r3.ebuild              | 186 +++++++++++++++++++++
 .../distcc/files/distcc-3.4-rewrite-chost.patch    |  79 +++++++++
 2 files changed, 265 insertions(+)
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-27 04:27:31 UTC
Thank you!