How to set up distccd symlinks

This forum is for discussion about general software issues.

How to set up distccd symlinks

Postby keithspg » Thu Oct 20, 2022 6:23 am

I was running distccd and now it will not distribute after I ran this:
$this->bbcode_second_pass_code('', 'sudo update-distcc-symlinks')
Now the symlinks that used to be in /usr/lib/distccd which allowed me to cross compile are gone. How do I put them back?
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: How to set up distccd symlinks

Postby graysky » Thu Oct 20, 2022 10:03 am

You should not need to run that/the package ships them. Recommend you uninstall distcc, remove any custom symlinks you made and reinstall it.
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: How to set up distccd symlinks

Postby keithspg » Thu Oct 20, 2022 12:40 pm

Thanks for the help. When I build some of the arm packages from the RPi and try to distribute to the x86 machine, I get errors of 'file missing' and before I ran that script, it removed some links in that directory which were related to the cross tool packages.

I am building special packages for a custom image on all 3 RPi architectures (I am a glutton for punishment!) and trying to update all the needed packages to get my armv6 build system current with the armv7/aarch64 cross tools. I was finally able to get the cross tool to build for armv6, but keep getting 'failed to distribute' on some packages and others I get some file not found error. Consulting the google, it seemed that a sym link needed to be in that directory which is named the arm compiler but points to distcc. Is this incorrect?
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: How to set up distccd symlinks

Postby graysky » Thu Oct 20, 2022 4:40 pm

Distcc can be tricky. If you goal is to have x86_64 help build ARM packages use https://aur.archlinux.org/packages/distccd-arch-arm on ARM and https://aur.archlinux.org/packages/distccd-alarm-armv8 on x86_64. There is also a toolchain for armv7h but not armv6h anymore.

Helpful info and stuff:
https://github.com/graysky2/distccd-arch-arm
https://github.com/graysky2/distccd-alarm
https://github.com/graysky2/buildhelper
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: How to set up distccd symlinks

Postby keithspg » Fri Oct 21, 2022 3:13 am

Thanks for the help. Still reading through it and trying to understand.
I have a full v6 linux-rpi-legacy install running in a chroot to make sure I have all the associated libraries and dependencies for all of these packages. It is on a Pi4 and I can build many things, but the one I am truing to build now always comes back with:
$this->bbcode_second_pass_code('', 'distccd[897363] (dcc_execvp) ERROR: failed to exec c++: No such file or directory
distccd[897363] (dcc_exit) exit: code 110; self: 0.000175 user 0.000000 sys; children: 0.000000 user 0.000000 sys
distccd[857194] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt
distccd[857194] c++ /Rune_dev/armv6/llvm/src/llvm-14.0.6.src/lib/BinaryFormat/XCOFF.cpp on localhost failed with exit code 110
distccd[857194] job complete
distccd[857194] (dcc_job_summary) client: 192.168.1.199:50758 COMPILE_ERROR exit:110 sig:0 core:0 ret:0 time:489ms c++ /Rune_dev/armv6/llvm/src/llvm-14.0.6.src/lib/BinaryFormat/XCOFF.cpp')
Maybe I am misunderstanding, but I think it is looking for a c++ link in that /usr/lib/distcc directory and there is not one there which aligns with armv6:
$this->bbcode_second_pass_code('', '$ ls -al /usr/lib/distcc/
total 200
drwxr-xr-x 3 root root 4096 Oct 20 07:29 .
drwxr-xr-x 250 root root 192512 Oct 20 07:29 ..
drwxr-xr-x 2 root root 4096 Oct 20 07:29 bin
lrwxrwxrwx 1 root root 16 Oct 18 17:17 c++ -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 c89 -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 c99 -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 cc -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 clang -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 clang++ -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 cpp -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 g++ -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 gcc -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 x86_64-pc-linux-gnu-g++ -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 x86_64-pc-linux-gnu-gcc -> ../../bin/distcc
lrwxrwxrwx 1 root root 16 Oct 18 17:17 x86_64-pc-linux-gnu-gcc-12.2.0 -> ../../bin/distcc')

shouldn't there be some other sym links so that distccd knows they are valid?

Keith
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: How to set up distccd symlinks

Postby keithspg » Tue Oct 25, 2022 2:53 am

So, I am set up a little differently. I have an armv7 host and have a complete armv6 image running in a chroot. I have been using this to build armv6 packages for a number of years until the armv6 updates freom arch arm stopped in February. In the meantime, I have been updating this image bit by bit as I have needed to to continue building specific packages for our purpose.
I have updated makepkg and gcc and many libs by taking the PKGBUILD and associated files form thje archARM and regular Arch Linux package information. I get the current file info from https://archlinux.org/packages/ and when a package does not build, I then build the missing pre-reqs and install then then try again. I was able to build gcc 12.2 and install it and the gcc libs for armv6 in the chroot

Currently, my biggest issue is that makepkg will not build llvm. It builds a binary, but then fails when building the tests then never makes the package. I need this package to build the latest mpd.

When I start it, I get lots of failed to distribute on the build image, and on the x86 machine I get lots of:
$this->bbcode_second_pass_code('', '/llvm-14.0.6.src/unittests/tools/llvm-exegesis/PowerPC/TargetTest.cpp
distccd[925197] (dcc_check_client) connection from 192.168.1.199:52154
distccd[925197] compile from gmock-all.cc to gmock-all.cc.o
distccd[925197] (dcc_r_file_timed) 2650222 bytes received in 0.023329s, rate 110939kB/s
distccd[925611] (dcc_execvp) ERROR: failed to exec c++: No such file or directory
distccd[925611] (dcc_exit) exit: code 110; self: 0.000198 user 0.000000 sys; children: 0.000000 user 0.000000 sys
distccd[925197] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt
distccd[925197] c++ /Rune_dev/armv6/llvm-libs/src/llvm-14.0.6.src/utils/unittest/googlemock/src/gmock-all.cc on localhost failed with exit code 110
distccd[925197] job complete
distccd[925197] (dcc_job_summary) client: 192.168.1.199:52154 COMPILE_ERROR exit:110 sig:0 core:0 ret:0 time:726ms c++ /Rune_dev/armv6/llvm-libs/src/llvm-14.0.6.src/utils/unittest/googlemock/src/gmock-all.cc
')

Do I need to build and install more libs and pre-reqs to get this to work?
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm

Re: How to set up distccd symlinks

Postby keithspg » Wed Oct 26, 2022 3:31 am

I was able to get it to work, again. I compiled xtools for armv6 and also makepkg for armv6 but used the old /etc/makepkg.conf file (When it compiles, it can no longer resolve the architecture type ), but after I did this and ran this script on the x86 machine
$this->bbcode_second_pass_code('', '#!/bin/bash
for file in `ls`; do
if [[ "$file" == "link" ]]; then
continue
fi
# uncomment for v6
ln -s $file ${file#arm-unknown-linux-gnueabihf-}
ln -s $file armv6l-unknown-linux-gnueabihf-${file#arm-unknown-linux-gnueabihf-}
done')
in
$this->bbcode_second_pass_code('', '/opt/x-tools6h/arm-unknown-linux-gnueabihf/bin/')
I now can get compilation, again using distccd. The messages all look like:
$this->bbcode_second_pass_code('', 'distccd[20392] (dcc_job_summary) client: 192.168.1.199:46430 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:5243ms c++ /Rune_dev/armv6/llvm/src/llvm-14.0.6.src/lib/ExecutionEngine/Orc/Speculation.cpp')
in the log on the x86 machine. Woo Hoo!
keithspg
 
Posts: 224
Joined: Mon Feb 23, 2015 4:14 pm


Return to General

Who is online

Users browsing this forum: No registered users and 35 guests

cron