LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-01-2018, 02:05 PM   #1
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
Distcc troubles between x86_64 host and arm client


I am trying to use distcc to build the Slackware ARM kernel. The system that is building the kernel, and acting as a client to distccd, is a Rapsberry Pi 3 B running the latest SlackwareARM-current. The distccd host is my laptop and it has an i7 with 8 cores. I ran into some trouble with distcc on the client being able to access/find "arm-slackware-linux-gnueabihf-gcc" on the host. The steps I took to get where I am at are below.

I built and installed the ARM x-toolchain on my x86_64 laptop.

http://ftp.arm.slackware.com/slackwa...s/x-toolchain/

I started distccd on the laptop manually executing this script as root:

(taken from: http://ftp.arm.slackware.com/slackwa...local-addition )

Code:
# This is a working example of a script that you may wish to add to your system's
# /etc/rc.d/rc.local in order to start distcc with the Cross compiler toolchain.

# Distcc:
case "$( uname -m )" in
  i?86) export DISTCCARCH=i486 ;;
  # Unless $ARCH is already set, use uname -m for all other archs:
  *) export DISTCCARCH=$( uname -m ) ;;
esac

#DISTCC_SAVE_TEMPS=1 \
DISTCC_BASEDIR=/devel/build-servers
LD_LIBRARY_PATH=$DISTCC_BASEDIR/$DISTCCARCH/arm/$DISTCCARCH-slackware-linux/arm-slackware-linux-gnueabihf/lib/ \
DISTCCD_PATH=$DISTCC_BASEDIR/$DISTCCARCH/arm/bin \
  /usr/bin/distccd \
    --verbose \
    --log-file /tmp/distcc.log \
    -j 20 \
    --daemon \
    --allow 192.168.150.0/24
All of the variables point to the following locations on my laptop, which do indeed exist:
Code:
DISTCCARCH= x86_64
DISTCC_BASEDIR= /devel/build-servers
LD_LIBRARY_PATH= /devel/build-servers/x86_64/arm/x86_64-slackware-linux/arm-slackware-linux-gnueabihf/lib/
DISTCCD_PATH= /devel/build-servers/x86_64/arm/bin
On the ARM client I have exported these variables and started compiling the kernel:

(taken from: http://ftp.arm.slackware.com/slackwa...olchain/dbuild )
Code:
export DISTCC_HOSTS='localhost/4 mothership/8'
export NUMJOBS=-j$[$(sed 's?[^0-9]*/?+?g' <<<$DISTCC_HOSTS)]
PATH=/hd/DISTCC::$PATH # location where compiler symlinks to distcc were added
cd /hd/linux-4.17.19
make -j 12 zImage
Both machines are communitcating but I am seeing the following output in the distccd log on my laptop when I begin compiling the kernel on my client ARM device:
Code:
distccd[25777] (dcc_r_argv) got arguments: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/dtc/fstree.o scripts/dtc/fstree.c
distccd[25777] (dcc_scan_args) scanning arguments: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/dtc/fstree.o scripts/dtc/fstree.c
distccd[25777] (dcc_scan_args) found object/output file "scripts/dtc/fstree.o"
distccd[25777] (dcc_scan_args) found input file "scripts/dtc/fstree.c"
distccd[25777] compile from fstree.c to fstree.o
distccd[25777] (dcc_run_job) output file scripts/dtc/fstree.o
distccd[25777] (dcc_input_tmpnam) input file scripts/dtc/fstree.c
distccd[25777] (dcc_r_token_int) got DOTI0001af12
distccd[25777] (dcc_r_file) received 110354 bytes to file /tmp/distccd_955c4b3f.i
distccd[25777] (dcc_r_file_timed) 110354 bytes received in 0.008751s, rate 12315kB/s
distccd[25777] (dcc_set_input) changed input from "scripts/dtc/fstree.c" to "/tmp/distccd_955c4b3f.i"
distccd[25777] (dcc_set_input) command after: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/dtc/fstree.o /tmp/distccd_955c4b3f.i
distccd[25777] (dcc_set_output) changed output from "scripts/dtc/fstree.o" to "/tmp/distccd_95454b3f.o"
distccd[25777] (dcc_set_output) command after: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o /tmp/distccd_95454b3f.o /tmp/distccd_955c4b3f.i
distccd[25777] (dcc_check_compiler_masq) /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc is not a symlink
distccd[25777] (dcc_check_compiler_whitelist) CRITICAL! arm-slackware-linux-gnueabihf-gcc not in /usr/lib64/distcc whitelist.
distccd[25777] (dcc_cleanup_tempfiles_inner) deleted 5 temporary files
distccd[25777] (dcc_job_summary) client: 192.168.150.200:37684 OTHER exit:0 sig:0 core:0 ret:0 time:9ms
I am sure the solution is simple I am just suffering from brain rot due to looking at it for too long. I searched the web for information about "dcc_check_compiler_whitelist" and did not find anything useful. All the results in Google refer to Gentoo, Arch Linux, and Raspbian. I've spent a few hours at this point troubleshooting. I need someone to point out where I went wrong. The full distccd log is attached below.
Attached Files
File Type: log distcc.log (13.9 KB, 6 views)
 
Old 11-01-2018, 02:53 PM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 822

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by mralk3 View Post
Code:
export DISTCC_HOSTS='localhost/4 mothership/8'
You don't need localhost there - the point of distcc is to outsource compilation to a more capable host, leaving the linking to the native machine. If distcc fails, it'll fall back to localhost anyway.

Quote:
Originally Posted by mralk3 View Post
Code:
distccd[25777] (dcc_check_compiler_masq) /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc is not a symlink


I have the same in my logs. Indeed, it is not a symlink.

Quote:
Originally Posted by mralk3 View Post
Code:

Quote:
Originally Posted by mralk3 View Post
Code:
[B]distccd[25777] (dcc_check_compiler_whitelist) CRITICAL! arm-slackware-linux-gnueabihf-gcc not in /usr/lib64/distcc whitelist.
I don't run -current on my x86's and I have distcc 3.1. Distcc 3.3 as shipped presently in -current, has this new directory and 'whitelist' notion.

My guess is that doing this on the x86_64 will do it:
Code:
ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc /usr/lib64/distcc/
ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-g++ /usr/lib64/distcc/
ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-c++ /usr/lib64/distcc/
If that works, it would go in the rc.local-additions file prior to starting distccd

Last edited by drmozes; 11-01-2018 at 03:09 PM.
 
3 members found this post helpful.
Old 11-01-2018, 03:04 PM   #3
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
Quote:
I don't run -current on my x86's and I have distcc 3.1. Distcc 3.3 as shipped presently in -current, has this new directory and 'whitelist' notion.

My guess is that doing this on the x86_64 will do it:
Code:
ln -rs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc /usr/lib64/distcc/
ln -rs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-g++ /usr/lib64/distcc/
ln -rs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-c++ /usr/lib64/distcc/
If that works, it would go in the rc.local-additions file prior to starting distccd
That did the trick. Thanks!
 
Old 11-01-2018, 03:12 PM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 822

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by mralk3 View Post
That did the trick. Thanks!
thanks I'll update that rc.local script on the FTP site next time.
I'm not sure what's going to happen if distcc is called as "gcc" or "cc" or any name not "arm-slackware.." since the whitelist entries for those point to the x86 toolchain. I'll have to dig in to that if that becomes an issue.
 
Old 11-01-2018, 03:25 PM   #5
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
Quote:
Originally Posted by drmozes View Post
thanks I'll update that rc.local script on the FTP site next time.
I'm not sure what's going to happen if distcc is called as "gcc" or "cc" or any name not "arm-slackware.." since the whitelist entries for those point to the x86 toolchain. I'll have to dig in to that if that becomes an issue.
Since $PATH has the symlinks to distcc on my client and now the symlinks on the host, I don't think it will be an issue as long as PATH has cc and gcc in it prior to reaching the system gcc/cc.

The main problem was the documentation is very sparse in /usr/doc/distcc and on most places on the web. After I read the shell scripts it all made more sense. None of the Gentoo documentation was any help. The Arch Linux docs are too specific to Arch. There isn't much to go on for setup of distcc on Slackware either. Maybe a SlackDoc is in my future.

I tried to build the x-toolchain on my Pi at first and I had an error during the configure of binutils. Then I realized my mistake. Build it on the x86 instead.

Thanks again for the pointer!
 
Old 11-02-2018, 02:36 PM   #6
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
With 8 cores on my laptop and 4 on the Pi I should be using make -j 14? So (8 cores + 1) + (4 cores + 1) = 14, right?

Everything is definitely compiling faster. Htop reports my laptop cores are barely doing much and distccmon-text (running on the Pi) shows localhost is being used for all the "preprocess" and even quite a few of the "compiles". I have distccd running with -j 20. I am curious if I can push it further. See screenshot. The bottom screen window panes are my laptop, top is my pi.
Attached Thumbnails
Click image for larger version

Name:	laptop_and_rpi_2018-11-02_13-23-53.jpg
Views:	20
Size:	267.7 KB
ID:	28903  
 
Old 11-02-2018, 03:04 PM   #7
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 985

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
@mralk
I believe you'll need to consider the limited amount of RAM on your Pi board for some other compilations and tune the jobs number accordingly, see:
https://www.linuxquestions.org/quest...ml#post5780344
 
1 members found this post helpful.
Old 11-03-2018, 03:59 AM   #8
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 822

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by mralk3 View Post
With 8 cores on my laptop and 4 on the Pi I should be using make -j 14? So (8 cores + 1) + (4 cores + 1) = 14, right?

Everything is definitely compiling faster. Htop reports my laptop cores are barely doing much and distccmon-text (running on the Pi) shows localhost is being used for all the "preprocess" and even quite a few of the "compiles". I have distccd running with -j 20. I am curious if I can push it further. See screenshot. The bottom screen window panes are my laptop, top is my pi.
The distcc host list I use comprises solely of x86_64, so the number of parallel jobs is equal to the aggregate of the available x86 cores. That said, I restrict the parallel builds to a max of 15 no matter how many x86s are available at build time, as the ARM machine cannot handle more without diminishing returns.
That's as far and as scientific as I went with tuning it.
 
1 members found this post helpful.
Old 11-03-2018, 07:50 AM   #9
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
Quote:
Originally Posted by abga View Post
@mralk
I believe you'll need to consider the limited amount of RAM on your Pi board for some other compilations and tune the jobs number accordingly, see:
https://www.linuxquestions.org/quest...ml#post5780344
Thanks. I figured there was some limitation due to the Pi hardware. So far I haven't come close to running out of RAM and swap is used very minimally. When I installed Slackware I mounted /tmp as tmpfs with 512MB RAM allocated, added a 1GB swap file on the external hard disk, and disabled the swap partition on board the SD card. I am usually around 150MB of RAM used when building the kernel. I am sure I could allocate more RAM to /tmp. I haven't played with the Pi's GPU memory allocation or CPU frequency scaling in /boot/config.txt.

Quote:
Originally Posted by drmozes View Post
The distcc host list I use comprises solely of x86_64, so the number of parallel jobs is equal to the aggregate of the available x86 cores. That said, I restrict the parallel builds to a max of 15 no matter how many x86s are available at build time, as the ARM machine cannot handle more without diminishing returns.
That's as far and as scientific as I went with tuning it.
I will go with -j 12. It seems to be getting the job done fast enough. I do not want to burn up the Pi.
 
Old 01-25-2019, 05:26 PM   #10
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
I am running into a strange problem. The last few months I haven't compiled anything using this setup because I have been either busy or ill. I am just now getting back to working on this. For some reason distcc on the x86_64 host is looking in /usr/lib/distcc instead of /usr/lib64/distcc for all of the whitelisted symlinks.

I am using the following in my rc.local, http://slackware.uk/slackwarearm/sla...local-addition

Here is the shortened distccd log:

Code:
distccd[11288] (dcc_r_token_int) got ARGV00000002
distccd[11288] (dcc_r_token_string) got '-c'
distccd[11288] (dcc_r_argv) argv[7] = "-c"
distccd[11288] (dcc_r_token_int) got ARGV00000002
distccd[11288] (dcc_r_token_string) got '-o'
distccd[11288] (dcc_r_argv) argv[8] = "-o"
distccd[11288] (dcc_r_token_int) got ARGV00000011
distccd[11288] (dcc_r_token_string) got 'scripts/dtc/dtc.o'
distccd[11288] (dcc_r_argv) argv[9] = "scripts/dtc/dtc.o"
distccd[11288] (dcc_r_token_int) got ARGV00000011
distccd[11288] (dcc_r_token_string) got 'scripts/dtc/dtc.c'
distccd[11288] (dcc_r_argv) argv[10] = "scripts/dtc/dtc.c"
distccd[11288] (dcc_r_argv) got arguments: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/dtc/dtc.o scripts/dtc/dtc.c
distccd[11288] (dcc_scan_args) scanning arguments: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/dtc/dtc.o scripts/dtc/dtc.c
distccd[11288] (dcc_scan_args) found object/output file "scripts/dtc/dtc.o"
distccd[11288] (dcc_scan_args) found input file "scripts/dtc/dtc.c"
distccd[11288] compile from dtc.c to dtc.o
distccd[11288] (dcc_run_job) output file scripts/dtc/dtc.o
distccd[11288] (dcc_input_tmpnam) input file scripts/dtc/dtc.c
distccd[11288] (dcc_r_token_int) got DOTI0001dffb
distccd[11288] (dcc_r_file) received 122875 bytes to file /tmp/distccd_d9119a11.i
distccd[11288] (dcc_r_file_timed) 122875 bytes received in 0.010420s, rate 11516kB/s
distccd[11288] (dcc_set_input) changed input from "scripts/dtc/dtc.c" to "/tmp/distccd_d9119a11.i"
distccd[11288] (dcc_set_input) command after: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o scripts/dtc/dtc.o /tmp/distccd_d9119a11.i
distccd[11288] (dcc_set_output) changed output from "scripts/dtc/dtc.o" to "/tmp/distccd_d9659a11.o"
distccd[11288] (dcc_set_output) command after: arm-slackware-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89 -c -o /tmp/distccd_d9659a11.o /tmp/distccd_d9119a11.i
distccd[11288] (dcc_check_compiler_masq) /devel/build-servers//x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc is not a symlink
distccd[11288] (dcc_check_compiler_whitelist) CRITICAL! no /usr/lib/distcc
distccd[11288] (dcc_cleanup_tempfiles_inner) deleted 5 temporary files
distccd[11288] (dcc_job_summary) client: 192.168.150.200:60538 OTHER exit:0 sig:0 core:0 ret:0 time:94ms
I tried to create the directory and symlinks in /usr/lib/distcc with no result. Maybe I am missing something very similar; I require another set of eyes.
 
Old 01-28-2019, 04:46 AM   #11
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 822

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by mralk3 View Post

Code:
distccd[11288] (dcc_check_compiler_whitelist) CRITICAL! no /usr/lib/distcc
What's in /usr/lib64/distcc and /usr/lib/distcc ?
 
Old 01-28-2019, 06:41 AM   #12
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
Quote:
Originally Posted by drmozes View Post
What's in /usr/lib64/distcc and /usr/lib/distcc ?
It's missing the /devel/build-servers/ in the symlink path. /usr/lib/distcc does not exist.

Code:
[root@mothership /usr/lib64/distcc]# ls -l 
total 0
lrwxrwxrwx 1 root root 57 Jan 28 05:29 arm-slackware-linux-gnueabihf-c++ -> ../../../x86_64/arm/bin/arm-slackware-linux-gnueabihf-c++
lrwxrwxrwx 1 root root 57 Jan 28 05:29 arm-slackware-linux-gnueabihf-g++ -> ../../../x86_64/arm/bin/arm-slackware-linux-gnueabihf-g++
lrwxrwxrwx 1 root root 57 Jan 28 05:29 arm-slackware-linux-gnueabihf-gcc -> ../../../x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc
lrwxrwxrwx 1 root root 16 Jan 25 15:34 c++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 c89 -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 c99 -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 cc -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 clang -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 clang++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 g++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 gcc -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 gcc-8.2.0 -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 x86_64-slackware-linux-g++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 x86_64-slackware-linux-gcc -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 x86_64-slackware-linux-gcc-8.2.0 -> ../../bin/distcc*
[root@mothership /usr/lib64/distcc]# ls -l /usr/lib/distcc
/bin/ls: cannot access '/usr/lib/distcc': No such file or directory
If I remove those symlinks, create new ones with the right path, and restart distccd, I am still getting the following:

Code:
[root@mothership /usr/lib64/distcc]# rm arm-slackware-linux-gnueabihf-c++ arm-slackware-linux-gnueabihf-g++  arm-slackware-linux-gnueabihf-gcc 
[root@mothership /usr/lib64/distcc]# ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc /usr/lib64/distcc/
[root@mothership /usr/lib64/distcc]# ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-g++ /usr/lib64/distcc/
[root@mothership /usr/lib64/distcc]# ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-c++ /usr/lib64/distcc/
[root@mothership /usr/lib64/distcc]# ls -l 
total 12
lrwxrwxrwx 1 root root 77 Jan 28 05:32 arm-slackware-linux-gnueabihf-c++ -> ../../../devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-c++*
lrwxrwxrwx 1 root root 77 Jan 28 05:32 arm-slackware-linux-gnueabihf-g++ -> ../../../devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-g++*
lrwxrwxrwx 1 root root 77 Jan 28 05:32 arm-slackware-linux-gnueabihf-gcc -> ../../../devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 c++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 c89 -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 c99 -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 cc -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 clang -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 clang++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 g++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 gcc -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 gcc-8.2.0 -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 x86_64-slackware-linux-g++ -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 x86_64-slackware-linux-gcc -> ../../bin/distcc*
lrwxrwxrwx 1 root root 16 Jan 25 15:34 x86_64-slackware-linux-gcc-8.2.0 -> ../../bin/distcc*
[root@mothership /usr/lib64/distcc]# vim /etc/rc.d/rc.local
[root@mothership /usr/lib64/distcc]# killall distccd
[root@mothership /usr/lib64/distcc]# bash -x /etc/rc.d/rc.local
+ case "$( uname -m )" in
++ uname -m
++ uname -m
+ export DISTCCARCH=x86_64
+ DISTCCARCH=x86_64
+ DISTCC_BASEDIR=/devel/build-servers/
+ LD_LIBRARY_PATH=/devel/build-servers//x86_64/arm/x86_64-slackware-linux/arm-slackware-linux-gnueabihf/lib/
+ DISTCCD_PATH=/devel/build-servers//x86_64/arm/bin
+ /usr/bin/distccd --verbose --log-file /tmp/distcc.log -j 20 --daemon --allow 192.168.150.0/24
distccd[19201] (dcc_preferred_user) Warning: no such user as "distcc"
distccd[19201] (dcc_discard_root) successfully set no_new_privs
distccd[19201] (dcc_discard_root) discarded root privileges, changed to uid=99 gid=99
Then as a test on the SBC compiling xap/xgames using dbuild I run:
Code:
root@rpi3-srv:/hd/slackware-tree/slackwarearm-current/source/xap/xgames# dbuild arm/build
The output is still the same in distcc.log on my laptop:
Code:
..snip..
distccd[19209] (dcc_check_client) connection from 192.168.150.200:60904
distccd[19209] (check_address_inet) match client 0xc896a8c0, value 0x96a8c0, mask 0xffffff
distccd[19209] (dcc_r_token_int) got DIST00000001
distccd[19209] (dcc_r_token_int) got ARGC00000006
distccd[19209] (dcc_r_argv) reading 6 arguments from job submission
distccd[19209] (dcc_r_token_int) got ARGV00000021
distccd[19209] (dcc_r_token_string) got 'arm-slackware-linux-gnueabihf-gcc'
distccd[19209] (dcc_r_argv) argv[0] = "arm-slackware-linux-gnueabihf-gcc"
..snip..
distccd[19209] (dcc_r_token_int) got ARGV00000009
distccd[19209] (dcc_r_token_string) got 'windows.c'
distccd[19209] (dcc_r_argv) argv[5] = "windows.c"
distccd[19209] (dcc_r_argv) got arguments: arm-slackware-linux-gnueabihf-gcc -O3 -c -o windows.o windows.c
distccd[19209] (dcc_scan_args) scanning arguments: arm-slackware-linux-gnueabihf-gcc -O3 -c -o windows.o windows.c
distccd[19209] (dcc_scan_args) found object/output file "windows.o"
distccd[19209] (dcc_scan_args) found input file "windows.c"
distccd[19209] compile from windows.c to windows.o
distccd[19209] (dcc_run_job) output file windows.o
distccd[19209] (dcc_input_tmpnam) input file windows.c
distccd[19203] (dcc_r_token_int) got DOTI00037ac2
distccd[19203] (dcc_r_file) received 228034 bytes to file /tmp/distccd_c36bf744.i
distccd[19203] (dcc_r_file_timed) 228034 bytes received in 0.019563s, rate 11383kB/s
distccd[19203] (dcc_set_input) changed input from "gfx.c" to "/tmp/distccd_c36bf744.i"
distccd[19203] (dcc_set_input) command after: arm-slackware-linux-gnueabihf-gcc -O3 -c -o gfx.o /tmp/distccd_c36bf744.i
distccd[19203] (dcc_set_output) changed output from "gfx.o" to "/tmp/distccd_c355f744.o"
distccd[19203] (dcc_set_output) command after: arm-slackware-linux-gnueabihf-gcc -O3 -c -o /tmp/distccd_c355f744.o /tmp/distccd_c36bf744.i
distccd[19203] (dcc_check_compiler_masq) /devel/build-servers//x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc is not a symlink
distccd[19203] (dcc_check_compiler_whitelist) CRITICAL! no /usr/lib/distcc
distccd[19203] (dcc_cleanup_tempfiles_inner) deleted 5 temporary files
distccd[19203] (dcc_job_summary) client: 192.168.150.200:60898 OTHER exit:0 sig:0 core:0 ret:0 time:199ms
..snip..
Rpi3-srv is at 192.168.150.200 and my laptop is at 192.168.150.201. Iptables is disabled on both for now.

Here is the environment on the Pi:
Code:
root@rpi3-srv:/hd/slackware-tree/slackwarearm-current/source/xap/xgames#  echo $PATH
/hd/DISTCC::/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin
root@rpi3-srv:/hd/slackware-tree/slackwarearm-current/source/xap/xgames# ls -l /hd/DISTCC
total 8
lrwxrwxrwx 1 root root   15 Nov  1 12:14 arm-slackware-linux-c++ -> /usr/bin/distcc*
lrwxrwxrwx 1 root root   15 Nov  1 12:14 arm-slackware-linux-g++ -> /usr/bin/distcc*
lrwxrwxrwx 1 root root   15 Nov  1 12:14 arm-slackware-linux-gcc -> /usr/bin/distcc*
lrwxrwxrwx 1 root root   15 Nov  1 12:14 c++ -> /usr/bin/distcc*
lrwxrwxrwx 1 root root   15 Nov  1 12:13 cc -> /usr/bin/distcc*
-rwxr-xr-x 1 root root 4500 Jan 25 15:57 dbuild*
lrwxrwxrwx 1 root root   15 Nov  1 12:13 g++ -> /usr/bin/distcc*
lrwxrwxrwx 1 root root   15 Nov  1 12:13 gcc -> /usr/bin/distcc*

Last edited by mralk3; 01-28-2019 at 06:46 AM.
 
Old 01-28-2019, 06:54 AM   #13
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
If I create /usr/lib/distcc it looks like distccd is expecting the symlinks to be there.
Code:
distccd[19225] (dcc_r_file) received 210328 bytes to file /tmp/distccd_6fd7fa37.i
distccd[19225] (dcc_r_file_timed) 210328 bytes received in 0.018191s, rate 11291kB/s
distccd[19225] (dcc_set_input) changed input from "xaw_stubs.c" to "/tmp/distccd_6fd7fa37.i"
distccd[19225] (dcc_set_input) command after: arm-slackware-linux-gnueabihf-gcc -O3 -c -o xaw_stubs.o /tmp/distccd_6fd7fa37.i
distccd[19225] (dcc_set_output) changed output from "xaw_stubs.o" to "/tmp/distccd_6f21fa37.o"
distccd[19225] (dcc_set_output) command after: arm-slackware-linux-gnueabihf-gcc -O3 -c -o /tmp/distccd_6f21fa37.o /tmp/distccd_6fd7fa37.i
distccd[19225] (dcc_check_compiler_masq) /devel/build-servers//x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc is not a symlink
distccd[19225] (dcc_check_compiler_whitelist) CRITICAL! arm-slackware-linux-gnueabihf-gcc not in /usr/lib/distcc whitelist.
distccd[19225] (dcc_cleanup_tempfiles_inner) deleted 5 temporary files
distccd[19225] (dcc_job_summary) client: 192.168.150.200:60932 OTHER exit:0 sig:0 core:0 ret:0 time:2247ms
 
Old 01-28-2019, 07:44 AM   #14
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Original Poster
Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
The solution is to run the following on my x86_64 host:

Code:
#!/bin/sh

mkdir -p /usr/lib/distcc
( cd /usr/lib/distcc
  ln -sf ../../bin/distcc c++
  ln -sf ../../bin/distcc c89
  ln -sf ../../bin/distcc c99
  ln -sf ../../bin/distcc cc
  ln -sf ../../bin/distcc clang
  ln -sf ../../bin/distcc clang++
  ln -sf ../../bin/distcc g++
  ln -sf ../../bin/distcc gcc
  ln -sf ../../bin/distcc gcc-$GCCVER
  ln -sf ../../bin/distcc x86_64-slackware-linux-g++
  ln -sf ../../bin/distcc x86_64-slackware-linux-gcc
  ln -sf ../../bin/distcc x86_64-slackware-linux-gcc-8.2.0
)

ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc /usr/lib/distcc/
ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-g++ /usr/lib/distcc/
ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-c++ /usr/lib/distcc/

Last edited by mralk3; 01-28-2019 at 07:47 AM.
 
Old 01-29-2019, 05:01 AM   #15
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 822

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by mralk3 View Post
The solution is to run the following on my x86_64 host:

Code:
#!/bin/sh

mkdir -p /usr/lib/distcc
( cd /usr/lib/distcc
  ln -sf ../../bin/distcc c++
  ln -sf ../../bin/distcc c89
  ln -sf ../../bin/distcc c99
  ln -sf ../../bin/distcc cc
  ln -sf ../../bin/distcc clang
  ln -sf ../../bin/distcc clang++
  ln -sf ../../bin/distcc g++
  ln -sf ../../bin/distcc gcc
  ln -sf ../../bin/distcc gcc-$GCCVER
  ln -sf ../../bin/distcc x86_64-slackware-linux-g++
  ln -sf ../../bin/distcc x86_64-slackware-linux-gcc
  ln -sf ../../bin/distcc x86_64-slackware-linux-gcc-8.2.0
)

ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-gcc /usr/lib/distcc/
ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-g++ /usr/lib/distcc/
ln -rfs /devel/build-servers/x86_64/arm/bin/arm-slackware-linux-gnueabihf-c++ /usr/lib/distcc/
The SlackBuild script creates the first set of symlinks within the /usr/lib64 (or /usr/lib for 32bit), and there's no /usr/lib/distcc :

Code:
prisere [slackware64-current] # tar tvvf slackware64/d/distcc-3.3.2-x86_64-1.txz|fgrep usr/lib/
prisere [slackware64-current] #
Which to me either implies a local problem with your setup, or that there's something wrong with the package itself. There's some sed in the SlackBuild to change /usr/lib to /usr/lib64 if necessary, so perhaps it's not working properly.
I don't have a -current machine to check if it works on a fresh installation - I may have a look some time later on.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LinuxMint(Host) - OpeVPN - iptables - client to client restricted access issue ukro Linux - Networking 2 12-08-2016 01:11 PM
[SOLVED] Cross-Compiling on ARM from x86_64: Undef ref to rplmalloc/realloc johnp Linux - Software 3 07-13-2013 05:04 PM
Ubuntu Oneiric Multiarch support for ARM on x86_64? jhwilliams Programming 4 12-25-2011 07:04 PM
Embedded arm compiling troubles mikymisho Linux - Embedded & Single-board computer 2 05-28-2011 05:08 PM
Distcc refusing host mclinkor Linux - Networking 2 07-12-2006 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration