Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#78800 - [distcc] wrong NATIVE_COMPILER_TRIPLE is compiled in distcc binary

Attached to Project: Community Packages
Opened by Reza Jahanbakhshi (rjahanbakhshi) - Thursday, 15 June 2023, 22:46 GMT
Last edited by Alexander F. Rødseth (xyproto) - Saturday, 17 June 2023, 11:44 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
NATIVE_COMPILER_TRIPLE is already set in the PKGBUILD but the required patch is not applied so the exported variable is unused. In the upstream, the master branch already has the patch but unfortunately, tag 3.4 is a couple of years old and there seems to be no plan to create a new tag.
As a consequence, whitelist symlinks are broken for meson builds and none of the freedesktop projects can be compiled distributedly. This error is reported in the system logs:
(dcc_check_compiler_whitelist) CRITICAL! x86_64-linux-gnu-gcc not in /usr/lib/distcc or /usr/lib/distcc whitelist.

I attached the needed patch based on upstream commit [850db9e](https://github.com/distcc/distcc/pull/427/commits/850db9eec0d5dd7f47ade8ffca91b679081f6d85) for NATIVE_COMPILER_TRIPLE to be taken into account. I also attached the PKGBUILD applying the patch, tested it and it solves the issue completely.

Additional info:
* package version(s) extra/distcc 3.4-7
* This also is related to  FS#78400 

Steps to reproduce:
Build any of the mesa-git, lib32-mesa-git, or virglrenderer-git using distcc by setting up distcc environment in makepkg.conf. Above error will be reported and the package will only build locally.
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Saturday, 17 June 2023, 11:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  Applied patch
Comment by Toolybird (Toolybird) - Friday, 16 June 2023, 06:11 GMT
> whitelist symlinks are broken for meson builds

What does that mean for the uneducated? Please explain..

> CRITICAL! x86_64-linux-gnu-gcc not in

Where is that "x86_64-linux-gnu" path coming from? The only reference I can find is in:

/usr/lib/python3.11/site-packages/include_server/distcc_pump_c_extensions.cpython-311-x86_64-linux-gnu.so

The main binaries seem fine e.g.

$ strings /usr/bin/distcc | grep linux-gnu
x86_64-pc-linux-gnu
Comment by Reza Jahanbakhshi (rjahanbakhshi) - Friday, 16 June 2023, 19:21 GMT
> What does that mean for the uneducated? Please explain..
distcc uses the symlinks in /usr/lib/distcc as the list of compiler binary names allowed to be run distributed. If the detected compiler binary name is absent in /usr/lib/distcc, distcc will complain that the compiler is not in the whitelist.

> Where is that "x86_64-linux-gnu" path coming from?
Meson uses CC --version and parses the output to detect the compiler in use.
If you run /usr/bin/x86_64-pc-linux-gnu-gcc --version it outputs "x86_64-pc-linux-gnu-gcc (GCC) 13.1.1 20230429" in the first line. Notice that the compiler name is "x86_64-pc-linux-gnu-gcc".
But now if you run PATH=/usr/lib/distcc/bin/:$PATH cc --version, you will get "x86_64-linux-gnu-gcc (GCC) 13.1.1 20230429" instead. Notice that the "pc" is missing in the compiler name.
If you run the same command with the patched version of distcc you will get the correct result: "x86_64-pc-linux-gnu-gcc (GCC) 13.1.1 20230429"

This problem is already identified and fixed in the upstream https://github.com/distcc/distcc/pull/427/commits/850db9eec0d5dd7f47ade8ffca91b679081f6d85 but unfortunately, it is not backported to 3.4. This makes distcc unusable when trying to build using meson. As an example, mesa uses meson for its build system. The source is huge and takes some time to compile. Using distcc with enough processors reduces the compile time significantly. I maintain mesa-git and some other aur packages and build them regularly. I've been using distcc-git aur for a while now to workaround this issue. But I think this should be fixed in the official package for everyone to have a smooth experience with Arch Linux.

Thanks and just give me a shout if you need any more info or if there's anything else I can do to assist with this.
Comment by Alexander F. Rødseth (xyproto) - Saturday, 17 June 2023, 11:44 GMT
Thanks for reporting. I applied the patch to the distcc package. distcc 3.4 pkgrel 8 is in [extra] now. Please re-open this issue if there should be further problems with this.

Loading...