<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>40577</bug_id>
          
          <creation_ts>2021-07-26 14:24:28 +0300</creation_ts>
          <short_desc>distcc-server: не запускает ни один компилятор</short_desc>
          <delta_ts>2021-07-26 17:24:46 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>distcc-server</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Sheplyakov">asheplyakov</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>grenka</cc>
    
    <cc>lav</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>200907</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Sheplyakov">asheplyakov</who>
    <bug_when>2021-07-26 14:24:28 +0300</bug_when>
    <thetext>1. Ставлю distcc и компиляторы:

sudo apt-get install -y distcc distcc-server gcc gcc-c++
sudo /usr/sbin/update-distcc-symlinks
sudo sed -i /etc/sysconfig/distccd -re &apos;s;^OPTIONS\&gt;[=].*$;OPTIONS=&quot;--log-file=/var/log/distccd.log --log-level=debug&quot;;&apos;
sudo systemctl start distccd

2. Пытаюсь что-нибудь собрать:

cat &gt; hello.c &lt;&lt;-EOF
#include &lt;stdio.h&gt;
int main(int argc, char **argv) {
        printf(&quot;Hello, world!\n&quot;);
        return 0;
}
EOF
env DISTCC_HOSTS=&apos;127.0.0.1/2&apos; DISTCC_VERBOSE=1 DISTCC_FALLBACK=0 /usr/lib/distcc/gcc-8 -c hello.c; echo $?

Ожидаемый результат: успешная сборка hello.o, код возврата 0.

Наблюдаемый результат: код возврата 116, hello.o не собирается:

env DISTCC_VERBOSE=1 DISTCC_HOSTS=&apos;127.0.0.1/2&apos; DISTCC_FALLBACK=0 /usr/lib/distcc/gcc-8 -o hello.o -c hello.c
distcc[4947] (dcc_trace_version) distcc 3.4 x86_64-alt-linux-gnu; built Jul 12 2021 13:09:55
distcc[4947] (dcc_recursion_safeguard) safeguard level=0
distcc[4947] (main) compiler name is &quot;gcc-8&quot;
distcc[4947] (dcc_support_masquerade) not modifying PATH
distcc[4947] (dcc_scan_args) scanning arguments: gcc-8 -o hello.o -c hello.c
distcc[4947] (dcc_scan_args) found object/output file &quot;hello.o&quot;
distcc[4947] (dcc_scan_args) found input file &quot;hello.c&quot;
distcc[4947] compile from hello.c to hello.o
distcc[4947] (dcc_gcc_rewrite_fqn) Re-writing call to &apos;gcc-8&apos; to &apos;x86_64-alt-linux-gcc-8&apos; to support cross-compilation.
distcc[4947] (dcc_get_hostlist) read hosts from environment
distcc[4947] (dcc_parse_hosts) found tcp token &quot;127.0.0.1/2&quot;
distcc[4947] (dcc_check_backoff) still in backoff period for 127.0.0.1/2
distcc[4947] (dcc_remove_disliked) remove 127.0.0.1/2 from list
distcc[4947] (dcc_build_somewhere) ERROR: failed to distribute and fallbacks are disabled
distcc[4947] elapsed compilation time 0.000263s
distcc[4947] (dcc_exit) exit: code 116; self: 0.002205 user 0.003307 sys; children: 0.000000 user 0.000000 sys
distcc[4947] (dcc_cleanup_tempfiles_inner) deleted 1 temporary files
116

В логе сервера вижу:

distccd[4887] (dcc_check_client) connection from 127.0.0.1:48100
distccd[4887] (check_address_inet) match client 0x100007f, value 0x200007f, mask 0xffffff
distccd[4887] (dcc_r_token_int) got DIST00000001
distccd[4887] (dcc_r_token_int) got ARGC00000005
distccd[4887] (dcc_r_argv) reading 5 arguments from job submission
distccd[4887] (dcc_r_token_int) got ARGV00000016
distccd[4887] (dcc_r_token_string) got &apos;x86_64-alt-linux-gcc-8&apos;
distccd[4887] (dcc_r_argv) argv[0] = &quot;x86_64-alt-linux-gcc-8&quot;
distccd[4887] (dcc_r_token_int) got ARGV00000002
distccd[4887] (dcc_r_token_string) got &apos;-o&apos;
distccd[4887] (dcc_r_argv) argv[1] = &quot;-o&quot;
distccd[4887] (dcc_r_token_int) got ARGV00000007
distccd[4887] (dcc_r_token_string) got &apos;hello.o&apos;
distccd[4887] (dcc_r_argv) argv[2] = &quot;hello.o&quot;
distccd[4887] (dcc_r_token_int) got ARGV00000002
distccd[4887] (dcc_r_token_string) got &apos;-c&apos;
distccd[4887] (dcc_r_argv) argv[3] = &quot;-c&quot;
distccd[4887] (dcc_r_token_int) got ARGV00000007
distccd[4887] (dcc_r_token_string) got &apos;hello.c&apos;
distccd[4887] (dcc_r_argv) argv[4] = &quot;hello.c&quot;
distccd[4887] (dcc_r_argv) got arguments: x86_64-alt-linux-gcc-8 -o hello.o -c hello.c
distccd[4887] (dcc_scan_args) scanning arguments: x86_64-alt-linux-gcc-8 -o hello.o -c hello.c
distccd[4887] (dcc_scan_args) found object/output file &quot;hello.o&quot;
distccd[4887] (dcc_scan_args) found input file &quot;hello.c&quot;
distccd[4887] compile from hello.c to hello.o
distccd[4887] (dcc_run_job) output file hello.o
distccd[4887] (dcc_input_tmpnam) input file hello.c
distccd[4887] (dcc_r_token_int) got DOTI00004343
distccd[4887] (dcc_r_file) received 17219 bytes to file /tmp/distccd_bfd698f5.i
distccd[4887] (dcc_r_file_timed) 17219 bytes received in 0.000030s, rate 560514kB/s
distccd[4887] (dcc_set_input) changed input from &quot;hello.c&quot; to &quot;/tmp/distccd_bfd698f5.i&quot;
distccd[4887] (dcc_set_input) command after: x86_64-alt-linux-gcc-8 -o hello.o -c /tmp/distccd_bfd698f5.i
distccd[4887] (dcc_set_output) changed output from &quot;hello.o&quot; to &quot;/tmp/distccd_bfd098f5.o&quot;
distccd[4887] (dcc_set_output) command after: x86_64-alt-linux-gcc-8 -o /tmp/distccd_bfd098f5.o -c /tmp/distccd_bfd698f5.i
distccd[4887] (dcc_check_compiler_masq) /usr/bin/x86_64-alt-linux-gcc-8 is not a symlink
distccd[4887] (dcc_check_compiler_whitelist) CRITICAL! no /usr/lib64/distcc
distccd[4887] (dcc_cleanup_tempfiles_inner) deleted 5 temporary files
distccd[4887] (dcc_job_summary) client: 127.0.0.1:48100 OTHER exit:0 sig:0 core:0 ret:0 time:3ms

То есть, update-distcc-symlinks создаёт ссылки в /usr/lib/distcc, а distccd ожидает их в /usr/lib64.

Это похоже на https://github.com/distcc/distcc/issues/431</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>200917</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2021-07-26 17:24:46 +0300</bug_when>
    <thetext>distcc-3.4-alt3 -&gt; sisyphus:

 Mon Jul 26 2021 Alexey Sheplyakov &lt;asheplyakov@altlinux&gt; 3.4-alt3
 - distccd: fixed search for approved compilers (Closes: #40577)
 - update-distcc-symlinks correctly finds GCC (cross-) compilers
 - automatically run update-distcc-symlinks (Closes: #40579)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>