View previous topic :: View next topic |
Author |
Message |
njcwotx Guru
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Wed Oct 24, 2012 10:01 pm Post subject: distcc on raspberry pi, not compiling on right host [Solved] |
|
|
I setup distcc going by the distcc docs on the gentoo site. I am trying to crosscompile using distcc. probably have a ways to go, but right now I cant get the raspberry pi to use distcc, it keeps compling locally.
I put /usr/lib/distcc/bin in the front part of the path on the pi.
but compiling still calls these, and the server never shows any activity in distccmon-gui, nor does server ever seem to call /usr/bin/distcc.
Code: |
root 1925 0.0 0.8 2856 996 pts/0 S+ 15:33 0:00 armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -D_GNU_SOURCE -c clif.c
root 1926 0.0 0.7 2532 948 pts/0 S 15:33 0:00 /usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.5.4/armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -D_GNU_SOURCE -E clif.c
root 1927 0.0 1.3 13396 1728 pts/0 D 15:33 0:00 /usr/libexec/gcc/armv6j-hardfloat-linux-gnueabi/4.5.4/cc1 -E -quiet -D_GNU_SOURCE clif.c -D_FORTIFY_SOURCE=2 -march=armv6j -mfpu=vfp -mfloat-abi=hard -O2
root 26352 0.0 3.8 7300 4796 pts/0 S+ 15:19 0:00 /usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.5.4/../../../../armv6j-hardfloat-linux-gnueabi/bin/as -march=armv6j -mfloat-abi=hard -mfpu=vfp -meabi=5 -o /var/tmp/portage/app-admin/syslog-ng-3.2.5/temp/ccit71jU.o
|
Heres some of the particulars...
the contents of /usr/lib/distcc/bin, per docs have been setup as such:
Code: | drwxr-xr-x 2 root root 4.0K Oct 18 14:49 .
drwxr-xr-x 3 root root 4.0K Oct 18 09:00 ..
lrwxrwxrwx 1 root root 15 Oct 18 09:00 armv6j-hardfloat-linux-gnueabi-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Oct 18 09:00 armv6j-hardfloat-linux-gnueabi-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 Oct 18 09:00 armv6j-hardfloat-linux-gnueabi-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 85 Oct 18 14:49 armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Oct 18 12:35 c++ -> armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Oct 18 12:35 cc -> armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Oct 18 12:35 g++ -> armv6j-hardfloat-linux-gnueabi-wrapper
lrwxrwxrwx 1 root root 38 Oct 18 12:35 gcc -> armv6j-hardfloat-linux-gnueabi-wrapper |
the wrapper file is as such:
Code: | #!/bin/bash
exec /usr/lib/distcc/bin/armv6j-hardfloat-linux-gnueabi-g${0:$[-2]} "$@" |
/etc/distcc/hosts - has the correct ip address of the server to compile on.
contents of /etc/conf.d/distccd - a bit of confusion on allow vs listen. I assume allow is the allowed clients and listen pertains to ip server will 'listen' on? I left that commented out for now. the 192.168.9.0/24 is correct subnet for all hosts.
Code: | # /etc/conf.d/distccd: config file for /etc/init.d/distccd
DISTCCD_OPTS=""
# this is the distccd executable
DISTCCD_EXEC="/usr/bin/distccd"
# this is where distccd will store its pid file
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
# set this option to run distccd with extra parameters
# Default port is 3632. For most people the default is okay.
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
# Logging
# You can change some logging options here:
# --log-file FILE
# --log-level LEVEL [critical,error,warning, notice, info, debug]
#
# Leaving --log-file blank will log to syslog
# example: --log-file /dev/null --log-level warning
# example: --log-level critical
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
# SECURITY NOTICE:
# It is HIGHLY recomended that you use the --listen option
# for increased security. You can specify an IP to permit connections
# from or a CIDR mask
# --listen accepts only a single IP
# --allow is now mandatory as of distcc-2.18.
# example: --allow 192.168.0.0/24
# example: --allow 192.168.0.5 --allow 192.168.0.150
# example: --listen 192.168.0.2
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.9.0/24"
#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2"
# set this for niceness
# Default is 15
DISTCCD_OPTS="${DISTCCD_OPTS} -N 15" |
emerge --info on the pi
Code: | DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"
Portage 2.1.11.9 (default/linux/arm/10.0/armv6j, gcc-4.5.4, glibc-2.15-r2, 3.2.27+ armv6l)
=================================================================
System uname: Linux-3.2.27+-armv6l-ARMv6-compatible_processor_rev_7_-v6l-with-gentoo-2.1
Timestamp of tree: Thu, 18 Oct 2012 00:45:01 +0000
distcc 3.1 armv6j-hardfloat-linux-gnueabi [enabled]
app-shells/bash: 4.2_p37
dev-lang/python: 2.7.3-r2, 3.2.3
dev-util/pkgconfig: 0.27.1
sys-apps/baselayout: 2.1-r1
sys-apps/openrc: 0.9.8.4
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.68
sys-devel/automake: 1.11.6
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.5.4
sys-devel/gcc-config: 1.7.3
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc: 2.15-r2
Repositories: gentoo
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv6j-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CHOST="armv6j-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=softfp"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=softfp"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl arm berkdb bzip2 cli cracklib crypt cups cxx fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl openmp pam pcre pppd readline session ssl tcpd unicode zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
|
/etc/make.conf on the pi
Code: |
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="armv6j-hardfloat-linux-gnueabi"
FEATURES="distcc"
|
_________________ Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting.
Last edited by njcwotx on Thu Oct 25, 2012 12:36 am; edited 1 time in total |
|
Back to top |
|
|
njcwotx Guru
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Wed Oct 24, 2012 10:09 pm Post subject: |
|
|
one extra tidbit to add.
earlier I recieved a message while emerging and compiling with a "failing to distribute error", this message stopped showing up by fixing the allowed line in /etc/conf.d/disccd to work for the correct subnet. So somewhere in the mix distcc is being called.... _________________ Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting. |
|
Back to top |
|
|
njcwotx Guru
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Wed Oct 24, 2012 11:21 pm Post subject: |
|
|
==UPDATE==
ran tcpdump on the server host and well....I get packets from the client on the distcc port!
So, perhaps my issue is with distcc monitor. it shows on server nothing when I compile and distccmon-text shows nothing either. _________________ Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting. |
|
Back to top |
|
|
njcwotx Guru
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Wed Oct 24, 2012 11:50 pm Post subject: |
|
|
Here is my server's conf file.
which ip goes on listen line? the server or the client? I assume its the server to indicate which nic to "listen on", the accept subnet is correct. While I see packets hitting the server from the client, I am not seeing much cpu usage, nor anything in "distccmon-text 1" when I emerge. Its now looking like the server just isnt doin its thing. the distccd service is running. I am running a armv6j toolchain, perhaps I need to scrutinize make files ....
Code: | # /etc/conf.d/distccd: config file for /etc/init.d/distccd
DISTCCD_OPTS="-j3"
# this is the distccd executable
DISTCCD_EXEC="/usr/bin/distccd"
# this is where distccd will store its pid file
DISTCCD_PIDFILE="/var/run/distccd/distccd.pid"
# set this option to run distccd with extra parameters
# Default port is 3632. For most people the default is okay.
DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"
# Logging
# You can change some logging options here:
# --log-file FILE
# --log-level LEVEL [critical,error,warning, notice, info, debug]
#
# Leaving --log-file blank will log to syslog
# example: --log-file /dev/null --log-level warning
# example: --log-level critical
DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"
# SECURITY NOTICE:
# It is HIGHLY recomended that you use the --listen option
# for increased security. You can specify an IP to permit connections
# from or a CIDR mask
# --listen accepts only a single IP
# --allow is now mandatory as of distcc-2.18.
# example: --allow 192.168.0.0/24
# example: --allow 192.168.0.5 --allow 192.168.0.150
# example: --listen 192.168.0.2
DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.9.0/24"
#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.9.146"
# set this for niceness
# Default is 15
DISTCCD_OPTS="${DISTCCD_OPTS} -N 15" |
_________________ Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting. |
|
Back to top |
|
|
njcwotx Guru
Joined: 25 Feb 2005 Posts: 587 Location: Texas
|
Posted: Thu Oct 25, 2012 12:36 am Post subject: |
|
|
I think I got this cranked up finally.
I set logging to debug in the server's /etc/conf.d/distccd files, set the server's listen port to the server's ip. restarted distccd on server. and the logs showed that the compiles were being done and they were successful. I guess the compiles run so fast my cpu doesn't even register in top. Next stop, compile Xorg
Code: |
Oct 24 19:10:30 localhost distccd[1069]: [b]armv6j-hardfloat-linux-gnueabi-gcc random.c on localhost completed ok[/b]
Oct 24 19:10:30 localhost distccd[1069]: job complete
Oct 24 19:10:30 localhost distccd[1069]: (dcc_cleanup_tempfiles_inner) deleted 5 temporary files
Oct 24 19:10:30 localhost distccd[1069]: [b](dcc_job_summary) client: 192.168.9.61:49194 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:59ms armv6j-hardfloat-linux-gnueabi-gcc random.c[/b]
Oct 24 19:10:30 localhost distccd[1072]: (dcc_check_client) connection from 192.168.9.61:49195
Oct 24 19:10:30 localhost distccd[1072]: (dcc_check_address) match client 0x3d09a8c0, value 0x9a8c0, mask 0xffffff
.
remvoed execessive smatterings....
.
Oct 24 19:10:30 localhost distccd[1072]: (dcc_r_argv) got arguments: armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -c mod-tcp.c -o mod-tcp.o
Oct 24 19:10:30 localhost distccd[1072]: (dcc_scan_args) scanning arguments: armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -c mod-tcp.c -o mod-tcp.o
Oct 24 19:10:30 localhost distccd[1072]: (dcc_scan_args) found input file "mod-tcp.c"
Oct 24 19:10:30 localhost distccd[1072]: (dcc_scan_args) found object/output file "mod-tcp.o"
Oct 24 19:10:30 localhost distccd[1072]: compile from mod-tcp.c to mod-tcp.o
Oct 24 19:10:30 localhost distccd[1072]: (dcc_run_job) output file mod-tcp.o
Oct 24 19:10:30 localhost distccd[1072]: (dcc_input_tmpnam) input file mod-tcp.c
Oct 24 19:10:30 localhost distccd[1072]: (dcc_r_token_int) got DOTI0002794a
Oct 24 19:10:30 localhost distccd[1072]: (dcc_r_file) received 162122 bytes to file /tmp/distccd_28408376.i
Oct 24 19:10:30 localhost distccd[1072]: (dcc_r_file_timed) 162122 bytes received in 0.013559s, rate 11677kB/s
Oct 24 19:10:30 localhost distccd[1072]: (dcc_set_input) changed input from "mod-tcp.c" to "/tmp/distccd_28408376.i"
Oct 24 19:10:30 localhost distccd[1072]: (dcc_set_input) command after: armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -c /tmp/distccd_28408376.i -o mod-tcp.o
Oct 24 19:10:30 localhost distccd[1072]: (dcc_set_output) changed output from "mod-tcp.o" to "/tmp/distccd_28358376.o"
Oct 24 19:10:30 localhost distccd[1072]: (dcc_set_output) command after: armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -c /tmp/distccd_28408376.i -o /tmp/distccd_28358376.o
Oct 24 19:10:30 localhost distccd[1072]: (dcc_check_compiler_masq) /usr/bin/armv6j-hardfloat-linux-gnueabi-gcc is not a symlink
Oct 24 19:10:30 localhost distccd[1072]: (dcc_spawn_child) forking to execute: armv6j-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -c /tmp/distccd_28408376.i -o /tmp/distccd_28358376.o
Oct 24 19:10:30 localhost distccd[1072]: (dcc_spawn_child) child started as pid1152
Oct 24 19:10:30 localhost distccd[1152]: (dcc_new_pgrp) entered process group
Oct 24 19:10:30 localhost distccd[1152]: (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
.
removed excessive smatterings....
.
Oct 24 19:10:30 localhost distccd[1072]: [b]armv6j-hardfloat-linux-gnueabi-gcc mod-tcp.c on localhost completed ok[/b]Oct 24 19:10:30 localhost distccd[1072]: job complete
Oct 24 19:10:30 localhost distccd[1072]: (dcc_cleanup_tempfiles_inner) deleted 5 temporary files
Oct 24 19:10:30 localhost distccd[1072]: [b](dcc_job_summary) client: 192.168.9.61:49195 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:239ms armv6j-hardfloat-linux-gnueabi-gcc mod-tcp.c[/b] |
as for distccmod-text one must read documentation very carefully
Code: | DISTCC_DIR="/var/tmp/portage/.distcc/" distccmon-text 1
|
this produced the desired output!
So I guess its working! _________________ Drinking from the fountain of knowldege.
Sometimes sipping.
Sometimes gulping.
Always thirsting. |
|
Back to top |
|
|
diablo465 Apprentice
Joined: 10 Sep 2013 Posts: 194
|
Posted: Wed Nov 05, 2014 2:08 am Post subject: |
|
|
thanks for the thread, I am also trying to make it working |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|