profile
viewpoint

Ask questionsdistcc fails to find the native compiler on rpm based distros

cat > hello.c <<-EOF
#include <stdio.h>
int main(int argc, char **argv) {
     printf("Hello, world!\n");
     return 0;
}
EOF
distcc gcc -Wall -std=gnu89 -I. -O2 -o hello.o -c hello.c

The output is:

free(): invalid next size (fast)
Aborted (core dumped)

There are two unrelated problems here:

  1. distcc (or rather dcc_gcc_rewrite_fqn) fails to find the native compiler due to autoconf idea about canonical system name (x86_64-alt-linux-gnu) being different from that of GCC (x86_64-alt-linux)
  2. dcc_gcc_rewrite_fqn writes beyond the allocated memory (newcmd), see #425 for more details)

Also problem 1 occurs if the toolchain uses a slightly different triple (say, aarch64-unknown-linux-gnu instead of the expected aarch64-linux-gnu)

distcc/distcc

Answer questions shawnl

This is all really ugly. I know that I am the one that added this cross-compile stuff, but GCC is really at fault here. When I met Andrew Pinsky the inferiorness in cross-compile compared to clang was admitted, but no-body has come forward with a canonicalization, and done the work.

I am not sure what distcc can do, as we are kind of at the butt end of the problem.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List