what you need to do - consider if you need this -specs flag.
L.
Post by Sam VarshavchikPost by Sam VarshavchikPost by Yassine ILMI3 - I prefer to configure distcc using environment variable directly in a
file and source it when needed. You should check if the session used to run
rpmbuild also have distcc environment variables set.
I did check directly what environment the distcc process inherited. It did
not have DISTCC_HOSTS set.
After receiving some emailed tips, I'm still not really any closer to
figuring out what's going on.
$ distcc --show-hosts
monster.email-scan.com:3632/6,lzo
localhost/4
This looks fine, and, as I said, manually running make directly ends up
correctly farming out six out of ten concurrent builds to the server.
But, during an rpmbuild, all compiles still run only on localhost. I've set
DISTCC_LOG and DISTCC_VERBOSE, and the resulting log file doesn't have
anything obvious in it, except for the fact that it logs localhost compiles
only. There's some cruft at the start of the log file, due to test compiles
distcc[2954] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2954] (dcc_recursion_safeguard) safeguard level=0
distcc[2954] (main) compiler name is "distcc"
distcc[2954] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o
/home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2954] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2954] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2954] (dcc_lock_host) got cpu lock on localhost slot 2 as fd5
distcc[2954] exec on localhost: /usr/bin/g++ -O2 -g -pipe -Wall
-Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o
/home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_note_state) note state 5, file "(NULL)", host "localhost"
distcc[2954] (dcc_spawn_child) forking to execute: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/button.o
/home/mrsam/.ccache/tmp/button.stdout.octopus.email-scan.com.2894.UtB9Xa.ii
distcc[2954] (dcc_spawn_child) child started as pid2957
_DISTCC_SAFEGUARD=1
distcc[2975] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2975] (dcc_recursion_safeguard) safeguard level=0
distcc[2975] (main) compiler name is "distcc"
distcc[2975] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o
/home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2975] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2975] (dcc_lock_host) got cpu lock on localhost slot 3 as fd5
distcc[2975] exec on localhost: /usr/bin/g++ -O2 -g -pipe -Wall
-Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o
/home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_note_state) note state 5, file "(NULL)", host "localhost"
distcc[2975] (dcc_spawn_child) forking to execute: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/border.o
/home/mrsam/.ccache/tmp/border.stdout.octopus.email-scan.com.2920.cYmPvb.ii
distcc[2975] (dcc_spawn_child) child started as pid2978
_DISTCC_SAFEGUARD=1
distcc[2982] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2982] (dcc_recursion_safeguard) safeguard level=0
distcc[2982] (main) compiler name is "distcc"
distcc[2982] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/attachedpopup.o
/home/mrsam/.ccache/tmp/attachedpo.stdout.octopus.email-scan.com.2895.K9IKza.ii
distcc[2982] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2982] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2991] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2991] (dcc_recursion_safeguard) safeguard level=0
distcc[2991] (main) compiler name is "distcc"
distcc[2991] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/cachedfont.o
/home/mrsam/.ccache/tmp/cachedfont.stdout.octopus.email-scan.com.2922.3Dmj8a.ii
distcc[2991] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2991] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2991] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2992] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2992] (dcc_recursion_safeguard) safeguard level=0
distcc[2992] (main) compiler name is "distcc"
distcc[2992] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -c -o background.o
/home/mrsam/.ccache/tmp/background.stdout.octopus.email-scan.com.2972.CeRBcF.ii
distcc[2992] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2992] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2992] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2993] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[2993] (dcc_recursion_safeguard) safeguard level=0
distcc[2993] (main) compiler name is "distcc"
distcc[2993] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -c -o canvas.o
/home/mrsam/.ccache/tmp/canvas.stdout.octopus.email-scan.com.2956.x28TAG.ii
distcc[2993] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2993] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2993] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[3072] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[3072] (dcc_recursion_safeguard) safeguard level=0
distcc[3072] (main) compiler name is "distcc"
distcc[3072] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/colormap.o
/home/mrsam/.ccache/tmp/colormap.stdout.octopus.email-scan.com.3047.YkKHRi.ii
distcc[3072] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[3072] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[3072] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[2982] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
distcc[2982] (dcc_lock_pause) nothing available, sleeping 1s...
distcc[3073] (dcc_trace_version) distcc 3.2rc1 x86_64-redhat-linux-gnu;
built Mar 12 2015 19:45:38
distcc[3073] (dcc_recursion_safeguard) safeguard level=0
distcc[3073] (main) compiler name is "distcc"
distcc[3073] (dcc_scan_args) scanning arguments: /usr/bin/g++ -O2 -g -pipe
-Wall -Werror=format-security -D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic
-std=c++1y -fno-omit-frame-pointer -fPIC -c -o .libs/connection.o
/home/mrsam/.ccache/tmp/connection.stdout.octopus.email-scan.com.3069.tuKDvr.ii
distcc[3073] (dcc_scan_args) -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 must be local
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_0 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_1 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_2 is busy
distcc[3073] (dcc_lock_host) /home/mrsam/.distcc/lock/cpu_localhost_3 is busy
And …that's it. Looks like distcc is only aware of the four localhost slots,
for some reasons.
I tried to check if there's anything funky in the rpmbuild environment.
Maybe rpmbuild sets up some funky mock chroot, so I shoved a distcc
+ umask 022
+ cd /home/mrsam/src/libcxxw-work/rpm/BUILD
+ cd libcxxw-0.1
+ distcc --show-hosts
monster.email-scan.com:3632/6,lzo
localhost/4
+ /usr/bin/make -j 10
make[1]: Entering directory
'/home/mrsam/src/libcxxw-work/rpm/BUILD/libcxxw-0.1'
…
Followed by the build. That still looks perfectly fine for me. And the
$ telnet monster.email-scan.com 3632
Trying 192.168.0.2…
Connected to monster.email-scan.com.
Escape character is '^]'.
Yet, the client still stubbornly sticks to four localhost slots. It has to
be something in the rpmbuild environment, because everything works fine when
I build directly from source. Just can't figure out what it is.
__
distcc mailing list http://distcc.samba.org/
https://lists.samba.org/mailman/listinfo/distcc