Reputation: 1070
os: ubuntu 20.04 distcc: 3.4 (compiled from source) with method in below common:
sudo apt-get install gcc make python3 python3-dev libiberty-dev autoconf -y
wget https://github.com/distcc/distcc/releases/download/v3.4/distcc-3.4.tar.gz -O /tmp/distcc.tar.gz
tar xvf /tmp/distcc.tar.gz -C /tmp/
cd /tmp/distcc-*; ./configure && make && sudo make install; sudo update-distcc-symlinks
build project:
sudo apt-get build-dep python3 -y
sudo apt-get install pkg-config -y
# for building all modules
sudo apt-get install build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev -y
cd /tmp/
wget https://www.python.org/ftp/python/3.11.2/Python-3.11.2.tgz
tar xzf Python-3.11.2.tgz
cd Python-3.11.2
I tried to build the project with below environments
export DISTCC_VERBOSE=1
export PATH=/usr/lib/distcc/:$PATH
export DISTCC_HOSTS="Test-7F-BR10-1-f1-1 Test-7F-SR4-11-14"
export DISTCC_POTENTIAL_HOSTS="Test-7F-BR10-1-f1-1 Test-7F-SR4-11-14"
I was expecting distcc will use remote servers to build but it failed to use localhost to build the code with below contents. I google a lot but haven't found useful info.
distcc[13888] (dcc_trace_version) distcc 3.4 aarch64-unknown-linux-gnu; built Mar 22 2023 13:43:26
distcc[13888] (dcc_recursion_safeguard) safeguard level=0
distcc[13888] (main) compiler name is "gcc"
distcc[13888] (dcc_set_path) setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
distcc[13888] (dcc_scan_args) scanning arguments: gcc
distcc[13888] (dcc_scan_args) LTO cc invocations are not worth distributing
distcc[13888] (dcc_get_hostlist) read hosts from environment
distcc[13888] (dcc_parse_hosts) found tcp token "Test-7F-BR10-1-f1-1"
distcc[13888] (dcc_parse_hosts) found tcp token "Test-7F-SR4-11-14"
distcc[13888] (dcc_lock_host) got cpu lock on localhost slot 0 as fd3
distcc[13888] exec on localhost: gcc -pthread -fno-semantic-interposition
What's more, the server side is ok. I ran below codes to start the server and i found the thread with commands ps -ef --forest
DISTCC_VERBOSE=1 distccd --jobs $(nproc) --log-stderr --no-detach --daemon --allow 0.0.0.0/0
Upvotes: 0
Views: 200
Reputation: 12983
distcc[13888] (dcc_scan_args) LTO cc invocations are not worth distributing
The command that is invoked contains -flto
which tells gcc
to enable link-time optimization, but In February 2021, the developers of distcc
decided not to distribute the compilation when such an optimization is enabled (see commit).
It's likely that you are trying to compile all the source files using the same options, which includes -flto
, so none of the compilation is distributed, and everything is done on your local machine.
Note that this seems to have been reverted in July 2021 in this commit, but the latest release was cut in May 2021.
In short, either:
distcc
from the last commit of masterUpvotes: 1