Tiny Core Extensions > TCE Q&A Forum

Setting up distcc

(1/6) > >>

polikuo:
Has anyone managed to get it working on TC ?

I compiled distcc on Raspberry Pi 4 4G (aarch64) a few days ago, but couldn't find a working configuration, so I never mail it.

Here are some notes

Compile Flags:

--- Code: ---CFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions'
CXXFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti'
LDFLAGS='-Wl,-O1'
--- End code ---

Dependencies:

--- Code: ---tce-load -ci compiletc coreutils procps-ng python3.8-dev gtk3-dev
--- End code ---

Note that I use copy mode because I feel like doing so. :)

LTO plug-in fix, see Topic: Wrong path gcc:bfd-plugins

--- Code: ---P=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0
sudo mkdir -p /usr/local/lib/bfd-plugins
sudo ln -sfv $P /usr/local/lib/bfd-plugins/liblto_plugin.so

--- End code ---

Commands for building and checking:

--- Code: ---$ tar xf distcc-3.4.tar.gz
$ cd distcc-3.4
$ ./configure --prefix=/usr/local --without-libiberty
$ time make -j4
real    0m 17.39s
user    0m 47.03s
sys     0m 8.63s
$ time make check
real    3m 36.39s
user    0m 36.88s
sys     0m 19.73s
## add . to PATH
$ export PATH=".:$PATH"
## add user temporarily for installcheck
$ sudo adduser -DH distcc
$ time make installcheck
real    3m 21.65s
user    0m 23.87s
sys     0m 16.88s

--- End code ---

I have 2 RPIs, a Pi3B and a Pi4B.
Both running PiCore-13.1 with latest tczs

I've tried the instructions by dentonlt here.
His thread isn't helping, and it's been more than a year since his last active.

The instructions on distcc official page sounds easy but doesn't work, most likely did something wrong somewhere.

I check the dependencies, the daemon wouldn't run without procps-ng and coreutils.
I edit the hosts file, both /usr/local/etc/distcc/hosts ~/.distcc/hosts
I export the environment variables DISTCC_HOSTS, DISTCC_POTENTIAL_HOSTS, PATH
I create symbolic links for the masquerade directory.
I try the pump command when calling make.

All above only leads me to a local build on pi4.
Pi3 sometimes helps, but I can't replicate when I retry.
I'm running out of ideas~  :P

Rich:
Hi polikuo

--- Quote from: polikuo on January 24, 2022, 11:29:45 AM --- ... All above only leads me to a local build on pi4.
Pi3 sometimes helps, but I can't replicate when I retry.
I'm running out of ideas~  :P
--- End quote ---
Maybe try turning on the debugging options to see if they provide anything useful:

--- Quote ---5. If you run into problems it is highly recommended to use DISTCC_VERBOSE=1
   on the client and "--log-level debug" on the server.
--- End quote ---
Found here:
https://raw.githubusercontent.com/distcc/distcc/master/INSTALL

Rich:
Hi polikuo
Just a couple more notes:

--- Quote ---You should create a "distcc" account on server machines so that distcc
can run with minimal privilege.  It is not necessary for this account
to own any files or have a home directory.  If this account doesn't
exist, distccd uses the "nobody" account.
--- End quote ---
Tinycore has  "nobody"  account, I presume piCore does too, so it should still work without a  "distcc"  account.


--- Quote ---By default distccd writes messages to the "daemon" syslog, which
typically ends up in /var/log/messages or /var/log/daemon.
--- End quote ---
You may want to start  syslog  to capture messages.


--- Quote ---Distcc will only improve performance if your build is parallelized.
So you need to use the "-j" option to make, or its equivalent with
your build tools.  If your build contains too many sequential steps,
e.g. if your Makefile contains

   all:
            for subdir in `SUBDIRS`; ... Removed due to forum error

then you may need to rewrite your Makefile to get better parallelism.
This is especially important if you're using pump mode.
--- End quote ---
If you forget the  -j , the pi3 won't help.

polikuo:

--- Quote from: Rich on January 24, 2022, 04:46:47 PM ---Maybe try turning on the debugging options to see if they provide anything useful:

--- Quote ---5. If you run into problems it is highly recommended to use DISTCC_VERBOSE=1
   on the client and "--log-level debug" on the server.
--- End quote ---
Found here:
https://raw.githubusercontent.com/distcc/distcc/master/INSTALL

--- End quote ---
Hi Rich
Thanks for the input.
I had turned on the debug log before I started this thread.
They were somewhat useful, I managed to fix some issues by adding some additional links and directories.
I'm starting this thread because they stop reporting anything that looks helpful.

--- Quote from: Rich on January 24, 2022, 05:19:44 PM ---Tinycore has  "nobody"  account, I presume piCore does too, so it should still work without a  "distcc"  account.

--- End quote ---
From my observation, I've tried with all three users, tc distcc nobody, it's OK to run as any of these.

--- Quote ---You may want to start  syslog  to capture messages.

--- End quote ---
There's a log-file option for distccd, so you don't need syslog.

--- Quote ---If you forget the  -j , the pi3 won't help.

--- End quote ---
Of course I had that, I use -j10 all the time.

The thing is, I can't replicate what I had done.
There were times that, distcc stop working without any changes to the setting.

--- Code: ---make -j10 # I can see pi3 CPU running with htop
make clean
make -j10 # pi3 is idling, it sees nothing
--- End code ---

Rich:
Hi polikuo

--- Quote ---If you're using TCP connections, it should look like
this:

  localhost red green blue

For SSH connections

  localhost @red @green @blue

The hosts should be listed in descending order of speed.  localhost
should normally be first, unless it is significantly slower than
another machine.
--- End quote ---
If the job is small enough and localhost is fast enough, the local machine may start compiling locally and sometimes
finish before it has a chance to give the next part to a remote machine. Since the local machine is once again free, it
may process that part itself. Try removing  localhost  from your  DISTCC_HOSTS  list. It should send all jobs to remote
machines.

Navigation

[0] Message Index

[#] Next page

Go to full version