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!
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!
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
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
|
DetailsDescription:
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 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
Saturday, 17 June 2023, 11:44 GMT
Reason for closing: Fixed
Additional comments about closing: Applied patch
native-compiler-triple.patch
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
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.