OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: pgas on October 17, 2005, 03:20:16 am
-
One way to combine some of the benefits of native compilation with some of the benefits of cross compilation is to use distcc. It is very is easy to set up and its usage is transparent.
You need:
a lan
a linux pc, I suppose its IP is 192.168.1.10
a zaurus, I suppose its IP is 192.168.1.20
On the linux pc:
- download the cross sdk (http://212.10.30.205/rc11/Zaurus-7x0-860/cross-sdk-armv5tel-cacko-linux-3.4.4-2.2.5-softfloat.tar.bz2)
- cd /; tar -jxvf cross-sdk-armv5tel-cacko-linux-3.4.4-2.2.5-softfloat.tar.bz2
- make a directory for the links to the cross gcc, mkdir /home/pgas/distcc
- make some links so that distcc use the cross compilers
ln -s /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/armv5tel-linux-gcc /home/pgas/distcc/gcc
ln -s /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/armv5tel-linux-g++ /home/pgas/distcc/g++
ln -s /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/armv5tel-linux-c++ /home/pgas/distcc/c++
these steps are required only the first time
- run /opt/cross/arm/3.4.4-xscale-softvfp/runsdk.sh
- make sure the cross compilers are first in the path ie export PATH=/home/pgas/distcc:$PATH
- run distccd (I believe that distcc is included in the cross sdk, else install it) like that distccd --daemon -a 192.168.1.20
On the zaurus
- download the native sdk (http://212.10.30.205/rc11/Zaurus-7x0-860/zgcc-3.4.4.img)
- install the sdk
mkdir -p /opt/native/arm/3.4.4-xscale-softvfp
mount -o loop zgcc-3.4.4.img /opt/native/arm/3.4.4-xscale-softvfp
- create links so that distcc is used instead of the actual gcc
mkdir /home/root/distcc
ln -s /opt/native/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/distcc /home/root/distcc/gcc
ln -s /opt/native/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/distcc /home/root/distcc/g++
ln -s /opt/native/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/distcc /home/root/distcc/c++
These steps are required only the first time.
- make sure that the links are first in the path
export PATH=/home/root/distcc:$PATH
- indicate where the server is
export DISTCC_HOSTS=192.168.1.10
That's it, you can use the native sdk as usual, the only difference is that now the compilations will take place on your linux pc and not onboard.
Compilation will be faster and the limited ram of the zaurus is not a problem anymore.
I write this from memory, so I might have make some mistakes. Please correct me.
-
Thanks for the write-up. I'll give it a shot on my C1k.
jason
-
ln -s /opt/native/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/distcc /home/root/distcc/gcc
should be
ln -s /opt/native/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/distcc /home/root/distcc/gcc
Other than that looks great! Going to compile some stuff right now
Nick
-
One way to combine some of the benefits of native compilation with some of the benefits of cross compilation is to use distcc. It is very is easy to set up and its usage is transparent.[div align=\"right\"][a href=\"index.php?act=findpost&pid=99670\"][{POST_SNAPBACK}][/a][/div]
Ahh, glad I found this post, I almost asked you how to do this I just got my Zaurus, and would like to do development like this. I'm considering whether to buy a 10/100 ethernet card, or a 11 megabit wifi card. How much of a difference will this make in compile times? Any ideas? Thanks.
-
Ahh, glad I found this post, I almost asked you how to do this smile.gif I just got my Zaurus, and would like to do development like this. I'm considering whether to buy a 10/100 ethernet card, or a 11 megabit wifi card. How much of a difference will this make in compile times? Any ideas? Thanks.
I use wfi, I don't know if it makes a diff for compile times.
-
Thanks for the nice write-up. I finally came around to try the cross sdk timestamped 18th of October using jikes as a test example. There were some minor changed paths/names and I am getting some warnings in the make phase -- but I guess nothing serious.
However, I am getting also plenty of critical errors which seem to indicate problem in the (parsing and/or usage of) the math functions of C++ such as:
/opt/native/arm/3.4.4-xscale-softvfp/lib/gcc/armv5tel-cacko-linux/3.4.4/../../../../include/c++/3.4.4/cmath: In
function `float std::acos(float)':
/opt/native/arm/3.4.4-xscale-softvfp/lib/gcc/armv5tel-cacko-linux/3.4.4/../../../../include/c++/3.4.4/cmath:103: error: `
__builtin_acosf' undeclared (first use this function)
Full trace is in the attachment.
As this problem is over my head, can somebody suggest a solution?
-
After a litttle googling, it may be related to the gcc version see
here (http://www.ogre3d.org/phpBB2/viewtopic.php?p=66496&highlight=&sid=27e85e9f1f87a4068ba6a17e05d80cfc)
the second post from the bottom
-
So I finally got around to trying this, and I'm getting the following error when trying to compile qt-x11:
distcc[2432] (dcc_r_bulk_plain) ERROR: ftruncate fd5 failed: Operation not permitted
distcc[2432] (dcc_build_somewhere) Warning: failed to distribute to 192.168.1.1, running locally instead.
Then it crashes after that with
g++: Internal error: Terminated (program cc1plus)
maybe because it ran out of RAM from trying to do it locally.?
Any ideas?
-
So I finally got around to trying this, and I'm getting the following error when trying to compile qt-x11:
distcc[2432] (dcc_r_bulk_plain) ERROR: ftruncate fd5 failed: Operation not permitted
distcc[2432] (dcc_build_somewhere) Warning: failed to distribute to 192.168.1.1, running locally instead.
Then it crashes after that with
g++: Internal error: Terminated (program cc1plus)
maybe because it ran out of RAM from trying to do it locally.?
Any ideas?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104841\"][{POST_SNAPBACK}][/a][/div]
Here is the verbose log from distccd up to the error...
distccd[1484] (main) chdir to /tmp
distccd[1484] (dcc_setup_daemon_path) daemon's PATH is /usr/local/sbin:/usr/sbin:/sbin:/root/distcc:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin
distccd[1484] (dcc_listen_by_addr) listening on 192.168.1.1:3632
distccd[1484] (dcc_defer_accept) TCP_DEFER_ACCEPT turned on
distccd[1484] (dcc_standalone_server) 1 CPU online on this server
distccd[1484] (dcc_standalone_server) allowing up to 3 active jobs
distccd[1484] (dcc_ignore_sighup) ignoring SIGHUP
distccd[1485] (dcc_detach) setsid to session 1485
distccd[1485] (dcc_log_daemon_started) preforking daemon started (2.18.3 i486-slackware-linux-gnu, built Dec 21 2004 16:43:2
distccd[1485] (dcc_preforking_parent) up to 1 children
distccd[1485] (dcc_preforking_parent) up to 2 children
distccd[1485] (dcc_preforking_parent) up to 3 children
distccd[1486] (dcc_check_client) connection from 192.168.1.2:1048
distccd[1486] (dcc_check_address) match client 0x201a8c0, value 0x201a8c0, mask 0xffffffff
distccd[1486] (dcc_r_token_int) got DIST00000001
distccd[1486] (dcc_r_token_int) got ARGC00000006
distccd[1486] (dcc_r_argv) reading 6 arguments from job submission
distccd[1486] (dcc_r_token_int) got ARGV00000003
distccd[1486] (dcc_r_argv) argv[0] = "gcc"
distccd[1486] (dcc_r_token_int) got ARGV00000002
distccd[1486] (dcc_r_argv) argv[1] = "-c"
distccd[1486] (dcc_r_token_int) got ARGV00000013
distccd[1486] (dcc_r_argv) argv[2] = "-fvisibility=hidden"
distccd[1486] (dcc_r_token_int) got ARGV0000000d
distccd[1486] (dcc_r_argv) argv[3] = "fvisibility.c"
distccd[1486] (dcc_r_token_int) got ARGV00000002
distccd[1486] (dcc_r_argv) argv[4] = "-o"
distccd[1486] (dcc_r_token_int) got ARGV0000000d
distccd[1486] (dcc_r_argv) argv[5] = "fvisibility.o"
distccd[1486] (dcc_r_argv) got arguments: gcc -c -fvisibility=hidden fvisibility.c -o fvisibility.o
distccd[1486] (dcc_scan_args) scanning arguments: gcc -c -fvisibility=hidden fvisibility.c -o fvisibility.o
distccd[1486] (dcc_scan_args) found input file "fvisibility.c"
distccd[1486] (dcc_scan_args) found object/output file "fvisibility.o"
distccd[1486] compile from fvisibility.c to fvisibility.o
distccd[1486] (dcc_run_job) output file fvisibility.o
distccd[1486] (dcc_input_tmpnam) input file fvisibility.c
distccd[1486] (dcc_readx) ERROR: unexpected eof on fd5
distccd[1486] (dcc_r_token_int) ERROR: read failed while waiting for token "DOTI"
-
I' m not sure why distcc fail to distribute, (do you run /opt/cross..../runsdk.sh before launching distccd?)
but the g++: Internal error: Terminated (program cc1plus) is most probably due to the lack of ram when compiling locally.
-
I' m not sure why distcc fail to distribute, (do you run /opt/cross..../runsdk.sh before launching distccd?)
but the g++: Internal error: Terminated (program cc1plus) is most probably due to the lack of ram when compiling locally.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=104857\"][{POST_SNAPBACK}][/a][/div]
Yep, I did run /opt/cross..../runsdk.sh... Could it have to do with permissions? I'm running distccd --user nobody, it wouldn't run without it. 'nobody' has permission to /tmp, does distccd need any other permissions? Thanks. Other ideas?
Josh
-
A couple other notes that could be of interest. It says to make links on the Zaurus:
ln -s /opt/native/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/distcc /home/root/distcc/gcc
etc.
but on my zaurus distcc is in /opt/native/arm/3.4.4-xscale-softvfp/bin... so I linked to there. Shouldn't be a problem, right?
Also, it says to make links on the PC:
ln -s /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/armv5tel-linux-gcc /home/pgas/distcc/gcc
etc.
But on my PC, it's at:
/opt/cross/arm/3.4.4-xscale-softvfp/bin/armv5tel-linux-gcc
And I'm running RC12... Anyone get this to work with RC12? Thanks for the help, I'm really trying to get this to work, any help is greatly appreciated.
Josh
-
Sorry for all the messages...
This seems to be more relevant to my problem than the previous trails I was attempting to track down...
Running /opt/cross/arm/3.4.4-xscale-softvfp/bin/armv5tel-cacko-linux-gcc returns:
error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory (Even after running runsdk.sh).
It looks like my cross sdk is not quite configured correctly. libiconv.so.2 is in /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/lib as expected, and set has X11LIB=/opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/lib,
Any ideas why gcc (and the all the other programs in the cross compiler) can't find the libraries? Thanks again.
Josh
-
ibiconv.so.2 is in /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/lib as expected
this one is an arm binary used for linking, you need one for x86 to run the compiler.
attach is a x86 bin, put it in /usr/lib (rename and link to libiconv.so.2 etc..)
I can start distccd as root, it just issue a warning if i remember correctly
-
attach is a x86 bin, put it in /usr/lib (rename and link to libiconv.so.2 etc..)[div align=\"right\"][a href=\"index.php?act=findpost&pid=105091\"][{POST_SNAPBACK}][/a][/div]
Thanks, but that didn't do it either, same error still. I've also tried compiling other apps (including joe) and same thing. I'm going to try with a different PC to see if that changes anything... Could someone who has this working let me know what OS they are running on their PC and what version of pdaX they are running? Thanks.
Josh
-
ould someone who has this working let me know what OS they are running on their PC and what version of pdaX they are running?
Ubuntu breezy, cross-sdk,
have you made a link ln -s /usr/lib/libiconv.so.2.2.0 /usr/lib/libiconv.so.2 ?
are they executable (chmod +x /usr/lib/libiconv*) ?
-
It works on SuSE 9.2 when put in this location:
/opt/cross/arm/3.4.4-xscale-softvfp/lib/libiconv.so.2
Be *sure* to use the same version of the (native/crosscompile) sdks on both the zaurus and the distcc server (otherwise strange errors would commence -- see my experience in this thread). RC12 works for me.
Do not forget to open your firewall's port 3263 (I think) on the server where distccd is listening to. I am running distccd under a normal user account with no problems.
-
Sorry, forgot one important thing (should work actually with any location of the lib):
export LD_LIBRARY_PATH=/opt/cross/arm/3.4.4-xscale-softvfp/lib
-
have you made a link ln -s /usr/lib/libiconv.so.2.2.0 /usr/lib/libiconv.so.2 ? are they executable (chmod +x /usr/lib/libiconv*) ? [div align=\"right\"][a href=\"index.php?act=findpost&pid=105461\"][{POST_SNAPBACK}][/a][/div]
Yes, and yes
I am also using the same version of the sdk's (see sds' suggestion).
The port is open (sds).
I'll try export LD_LIBRARY_PATH=/opt/cross/arm/3.4.4-xscale-softvfp/lib (sds)
Josh
-
export LD_LIBRARY_PATH=/opt/cross/arm/3.4.4-xscale-softvfp/lib [div align=\"right\"][a href=\"index.php?act=findpost&pid=105509\"][{POST_SNAPBACK}][/a][/div]
This didn't do it either...
I'll keep trying things and will keep you posted.
Josh
-
Well, I just installed Slackware 10.2 on a blank disk for my PC, and still no go...
Doesn't seem like it could be the Zaurus, since all I did was install RC12 and a couple other programs... and followed the instructions almost exactly.
My Zaurus still gives the error "failed to distribute."
However, it doesn't seem like distcc is accessing the distccd server. My ips are 192.168.1.1 and 192.168.1.2, and I can ping across.
I run distccd as follows:
distccd --listen 192.168.1.1 -a 192.168.1.2 --verbose --log-file=/tmp/distccd.log --daemon
and there isn't any attempts to log on to the server in the log. I'm not running a firewall (I don't think, iptables -L is blank).
There were attempts to log on to the distccd server on my original hard drive, no idea why none now. Any ideas? I've been pounding my head against this for a long time...
sds: Could you post the links you made, I assume you had to make slight modifications to the instructions as I did because you are using RC12...
Thanks for any ideas.
Josh
P.S. I'm running distcc 2.14 on my Zaurus and distccd 2.18.3 on my PC.
P.P.S Cross compiling seems to be working, at least with a simple hello world example.
-
Sorry for all the posts again...
I just spent a couple hours completely reflashing RC12 on my C1000 and installing Ubuntu 5.10 on my desktop from scratch on both. Still the same error. I'm really dumbfounded. Is everyone who has this working in RC12 using the cross-SDK and native-SDK from here?
https://www.oesf.org/forums/index.php?showtopic=15762 (https://www.oesf.org/forums/index.php?showtopic=15762)
Anyone care to share what versions of distcc and distccd they are running. How about the exact links you made in RC12 (since they are slightly different from the instructions)?
Things that work:
The cross compiler (compiled a simple hello world, and even joe-3.3 on my desktop, copied them to the zaurus and they work).
The network. ping's and ssh's fine.
Distcc/distccd: works to a degree. When I run make on the zaurus, it starts compiling stuff on my desktop. However, I get an error: "Warning: failed to distribute" on the zaurus.
P.S. I'm running this over usbnet, could this be a hardware problem somehow with that?
See distccd's verbose log below:
Please help, thanks.
Josh
distccd[13215] (main) chdir to /tmp
distccd[13215] (dcc_setup_daemon_path) daemon's PATH is /home/jgrauman/distcc:/opt/cross/arm/3.4.4-xscale-softvfp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
distccd[13215] (dcc_listen_by_addr) listening on 0.0.0.0:3632
distccd[13215] (dcc_defer_accept) TCP_DEFER_ACCEPT turned on
distccd[13215] (dcc_standalone_server) 1 CPU online on this server
distccd[13215] (dcc_standalone_server) allowing up to 3 active jobs
distccd[13215] (dcc_ignore_sighup) ignoring SIGHUP
distccd[13216] (dcc_detach) setsid to session 13216
distccd[13216] (dcc_log_daemon_started) preforking daemon started (2.18.3 i686-pc-linux-gnu, built Dec 1 2005 14:25:45)
distccd[13216] (dcc_preforking_parent) up to 1 children
distccd[13216] (dcc_preforking_parent) up to 2 children
distccd[13216] (dcc_preforking_parent) up to 3 children
distccd[13217] (dcc_check_client) connection from 192.168.1.2:1027
distccd[13217] (dcc_check_address) match client 0x201a8c0, value 0x201a8c0, mask 0xffffffff
distccd[13217] (dcc_r_token_int) got DIST00000001
distccd[13217] (dcc_r_token_int) got ARGC00000007
distccd[13217] (dcc_r_argv) reading 7 arguments from job submission
distccd[13217] (dcc_r_token_int) got ARGV00000003
distccd[13217] (dcc_r_argv) argv[0] = "gcc"
distccd[13217] (dcc_r_token_int) got ARGV00000002
distccd[13217] (dcc_r_argv) argv[1] = "-g"
distccd[13217] (dcc_r_token_int) got ARGV00000003
distccd[13217] (dcc_r_argv) argv[2] = "-O2"
distccd[13217] (dcc_r_token_int) got ARGV00000002
distccd[13217] (dcc_r_argv) argv[3] = "-c"
distccd[13217] (dcc_r_token_int) got ARGV00000002
distccd[13217] (dcc_r_argv) argv[4] = "-o"
distccd[13217] (dcc_r_token_int) got ARGV00000003
distccd[13217] (dcc_r_argv) argv[5] = "b.o"
distccd[13217] (dcc_r_token_int) got ARGV00000003
distccd[13217] (dcc_r_argv) argv[6] = "b.c"
distccd[13217] (dcc_r_argv) got arguments: gcc -g -O2 -c -o b.o b.c
distccd[13217] (dcc_scan_args) scanning arguments: gcc -g -O2 -c -o b.o b.c
distccd[13217] (dcc_scan_args) found object/output file "b.o"
distccd[13217] (dcc_scan_args) found input file "b.c"
distccd[13217] compile from b.c to b.o
distccd[13217] (dcc_run_job) output file b.o
distccd[13217] (dcc_input_tmpnam) input file b.c
distccd[13217] (dcc_r_token_int) got DOTI00029a3f
distccd[13217] (dcc_r_file) received 170559 bytes to file /tmp/distccd_42bc7a16.i
distccd[13217] (dcc_r_file_timed) 170559 bytes received in 0.210065s, rate 793kB/s
distccd[13217] (dcc_set_input) changed input from "b.c" to "/tmp/distccd_42bc7a16.i"
distccd[13217] (dcc_set_input) command after: gcc -g -O2 -c -o b.o /tmp/distccd_42bc7a16.i
distccd[13217] (dcc_set_output) changed output from "b.o" to "/tmp/distccd_42857a16.o"
distccd[13217] (dcc_set_output) command after: gcc -g -O2 -c -o /tmp/distccd_42857a16.o /tmp/distccd_42bc7a16.i
distccd[13217] (dcc_check_compiler_masq) /home/jgrauman/distcc/gcc is a safe symlink to /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/gcc
distccd[13217] (dcc_spawn_child) forking to execute: gcc -g -O2 -c -o /tmp/distccd_42857a16.o /tmp/distccd_42bc7a16.i
distccd[13240] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
distccd[13217] (dcc_spawn_child) child started as pid13240
distccd[13217] (dcc_collect_child) cc child 13240 terminated with status 0
distccd[13217] (dcc_collect_child) cc times: user 1.523768s, system 0.043993s, 4582 minflt, 43 majflt
distccd[13217] (dcc_x_token_int) send DONE00000001
distccd[13217] (dcc_x_token_int) send STAT00000000
distccd[13217] (dcc_x_file) send 0 byte file /tmp/distcc_40fe7a16.stderr with token SERR
distccd[13217] (dcc_x_token_int) send SERR00000000
distccd[13217] (dcc_x_file) send 0 byte file /tmp/distcc_410d7a16.stdout with token SOUT
distccd[13217] (dcc_x_token_int) send SOUT00000000
distccd[13217] (dcc_x_file) send 80384 byte file /tmp/distccd_42857a16.o with token DOTO
distccd[13217] (dcc_x_token_int) send DOTO00013a00
distccd[13217] gcc b.c on localhost completed ok
distccd[13217] job complete
distccd[13217] (dcc_cleanup_tempfiles) deleted 4 temporary files
distccd[13216] (dcc_daemon_terminate) Terminated
distccd[13216] (dcc_cleanup_tempfiles) deleted 0 temporary files
distccd[13217] (dcc_cleanup_tempfiles) deleted 0 temporary files
distccd[13218] (dcc_cleanup_tempfiles) deleted 0 temporary files
distccd[13219] (dcc_cleanup_tempfiles) deleted 0 temporary files
distccd[13273] (main) chdir to /tmp
distccd[13273] (dcc_setup_daemon_path) daemon's PATH is /home/jgrauman/distcc:/opt/cross/arm/3.4.4-xscale-softvfp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
distccd[13273] (dcc_listen_by_addr) listening on 0.0.0.0:3632
distccd[13273] (dcc_defer_accept) TCP_DEFER_ACCEPT turned on
distccd[13273] (dcc_standalone_server) 1 CPU online on this server
distccd[13273] (dcc_standalone_server) allowing up to 3 active jobs
distccd[13273] (dcc_ignore_sighup) ignoring SIGHUP
distccd[13274] (dcc_detach) setsid to session 13274
distccd[13274] (dcc_log_daemon_started) preforking daemon started (2.18.3 i686-pc-linux-gnu, built Dec 1 2005 14:25:45)
distccd[13274] (dcc_preforking_parent) up to 1 children
distccd[13274] (dcc_preforking_parent) up to 2 children
distccd[13274] (dcc_preforking_parent) up to 3 children
distccd[13275] (dcc_check_client) connection from 192.168.1.2:1028
distccd[13275] (dcc_check_address) match client 0x201a8c0, value 0x201a8c0, mask 0xffffffff
distccd[13275] (dcc_r_token_int) got DIST00000001
distccd[13275] (dcc_r_token_int) got ARGC00000007
distccd[13275] (dcc_r_argv) reading 7 arguments from job submission
distccd[13275] (dcc_r_token_int) got ARGV00000003
distccd[13275] (dcc_r_argv) argv[0] = "gcc"
distccd[13275] (dcc_r_token_int) got ARGV00000002
distccd[13275] (dcc_r_argv) argv[1] = "-g"
distccd[13275] (dcc_r_token_int) got ARGV00000003
distccd[13275] (dcc_r_argv) argv[2] = "-O2"
distccd[13275] (dcc_r_token_int) got ARGV00000002
distccd[13275] (dcc_r_argv) argv[3] = "-c"
distccd[13275] (dcc_r_token_int) got ARGV00000002
distccd[13275] (dcc_r_argv) argv[4] = "-o"
distccd[13275] (dcc_r_token_int) got ARGV00000003
distccd[13275] (dcc_r_argv) argv[5] = "b.o"
distccd[13275] (dcc_r_token_int) got ARGV00000003
distccd[13275] (dcc_r_argv) argv[6] = "b.c"
distccd[13275] (dcc_r_argv) got arguments: gcc -g -O2 -c -o b.o b.c
distccd[13275] (dcc_scan_args) scanning arguments: gcc -g -O2 -c -o b.o b.c
distccd[13275] (dcc_scan_args) found object/output file "b.o"
distccd[13275] (dcc_scan_args) found input file "b.c"
distccd[13275] compile from b.c to b.o
distccd[13275] (dcc_run_job) output file b.o
distccd[13275] (dcc_input_tmpnam) input file b.c
distccd[13275] (dcc_r_token_int) got DOTI00029a3f
distccd[13275] (dcc_r_file) received 170559 bytes to file /tmp/distccd_b5147aa4.i
distccd[13275] (dcc_r_file_timed) 170559 bytes received in 0.210092s, rate 793kB/s
distccd[13275] (dcc_set_input) changed input from "b.c" to "/tmp/distccd_b5147aa4.i"
distccd[13275] (dcc_set_input) command after: gcc -g -O2 -c -o b.o /tmp/distccd_b5147aa4.i
distccd[13275] (dcc_set_output) changed output from "b.o" to "/tmp/distccd_b50e7aa4.o"
distccd[13275] (dcc_set_output) command after: gcc -g -O2 -c -o /tmp/distccd_b50e7aa4.o /tmp/distccd_b5147aa4.i
distccd[13275] (dcc_check_compiler_masq) /home/jgrauman/distcc/gcc is a safe symlink to /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/gcc
distccd[13275] (dcc_spawn_child) forking to execute: gcc -g -O2 -c -o /tmp/distccd_b50e7aa4.o /tmp/distccd_b5147aa4.i
distccd[13283] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
distccd[13275] (dcc_spawn_child) child started as pid13283
distccd[13275] (dcc_collect_child) cc child 13283 terminated with status 0
distccd[13275] (dcc_collect_child) cc times: user 1.501771s, system 0.047992s, 4623 minflt, 0 majflt
distccd[13275] (dcc_x_token_int) send DONE00000001
distccd[13275] (dcc_x_token_int) send STAT00000000
distccd[13275] (dcc_x_file) send 0 byte file /tmp/distcc_b3c77aa4.stderr with token SERR
distccd[13275] (dcc_x_token_int) send SERR00000000
distccd[13275] (dcc_x_file) send 0 byte file /tmp/distcc_b3827aa4.stdout with token SOUT
distccd[13275] (dcc_x_token_int) send SOUT00000000
distccd[13275] (dcc_x_file) send 80384 byte file /tmp/distccd_b50e7aa4.o with token DOTO
distccd[13275] (dcc_x_token_int) send DOTO00013a00
distccd[13275] gcc b.c on localhost completed ok
distccd[13275] job complete
distccd[13275] (dcc_cleanup_tempfiles) deleted 4 temporary files
distccd[13276] (dcc_check_client) connection from 192.168.1.2:1029
distccd[13276] (dcc_check_address) match client 0x201a8c0, value 0x201a8c0, mask 0xffffffff
distccd[13276] (dcc_r_token_int) got DIST00000001
distccd[13276] (dcc_r_token_int) got ARGC00000007
distccd[13276] (dcc_r_argv) reading 7 arguments from job submission
distccd[13276] (dcc_r_token_int) got ARGV00000003
distccd[13276] (dcc_r_argv) argv[0] = "gcc"
distccd[13276] (dcc_r_token_int) got ARGV00000002
distccd[13276] (dcc_r_argv) argv[1] = "-g"
distccd[13276] (dcc_r_token_int) got ARGV00000003
distccd[13276] (dcc_r_argv) argv[2] = "-O2"
distccd[13276] (dcc_r_token_int) got ARGV00000002
distccd[13276] (dcc_r_argv) argv[3] = "-c"
distccd[13276] (dcc_r_token_int) got ARGV00000002
distccd[13276] (dcc_r_argv) argv[4] = "-o"
distccd[13276] (dcc_r_token_int) got ARGV00000003
distccd[13276] (dcc_r_argv) argv[5] = "b.o"
distccd[13276] (dcc_r_token_int) got ARGV00000003
distccd[13276] (dcc_r_argv) argv[6] = "b.c"
distccd[13276] (dcc_r_argv) got arguments: gcc -g -O2 -c -o b.o b.c
distccd[13276] (dcc_scan_args) scanning arguments: gcc -g -O2 -c -o b.o b.c
distccd[13276] (dcc_scan_args) found object/output file "b.o"
distccd[13276] (dcc_scan_args) found input file "b.c"
distccd[13276] compile from b.c to b.o
distccd[13276] (dcc_run_job) output file b.o
distccd[13276] (dcc_input_tmpnam) input file b.c
distccd[13276] (dcc_r_token_int) got DOTI00029a3f
distccd[13276] (dcc_r_file) received 170559 bytes to file /tmp/distccd_ac0c7c06.i
distccd[13276] (dcc_r_file_timed) 170559 bytes received in 0.212071s, rate 785kB/s
distccd[13276] (dcc_set_input) changed input from "b.c" to "/tmp/distccd_ac0c7c06.i"
distccd[13276] (dcc_set_input) command after: gcc -g -O2 -c -o b.o /tmp/distccd_ac0c7c06.i
distccd[13276] (dcc_set_output) changed output from "b.o" to "/tmp/distccd_ac2b7c06.o"
distccd[13276] (dcc_set_output) command after: gcc -g -O2 -c -o /tmp/distccd_ac2b7c06.o /tmp/distccd_ac0c7c06.i
distccd[13276] (dcc_check_compiler_masq) /home/jgrauman/distcc/gcc is a safe symlink to /opt/cross/arm/3.4.4-xscale-softvfp/bin/armv5tel-linux-gcc
distccd[13276] (dcc_spawn_child) forking to execute: gcc -g -O2 -c -o /tmp/distccd_ac2b7c06.o /tmp/distccd_ac0c7c06.i
distccd[13377] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
distccd[13276] (dcc_spawn_child) child started as pid13377
distccd[13276] (dcc_collect_child) cc child 13377 terminated with status 0
distccd[13276] (dcc_collect_child) cc times: user 1.522768s, system 0.036994s, 4624 minflt, 0 majflt
distccd[13276] (dcc_x_token_int) send DONE00000001
distccd[13276] (dcc_x_token_int) send STAT00000000
distccd[13276] (dcc_x_file) send 0 byte file /tmp/distcc_aaf77c06.stderr with token SERR
distccd[13276] (dcc_x_token_int) send SERR00000000
distccd[13276] (dcc_x_file) send 0 byte file /tmp/distcc_aaba7c06.stdout with token SOUT
distccd[13276] (dcc_x_token_int) send SOUT00000000
distccd[13276] (dcc_x_file) send 80384 byte file /tmp/distccd_ac2b7c06.o with token DOTO
distccd[13276] (dcc_x_token_int) send DOTO00013a00
distccd[13276] gcc b.c on localhost completed ok
distccd[13276] job complete
distccd[13276] (dcc_cleanup_tempfiles) deleted 4 temporary files
-
Is everyone who has this working in RC12 using the cross-SDK and native-SDK from here?
https://www.oesf.org/forums/index.php?showtopic=15762 (https://www.oesf.org/forums/index.php?showtopic=15762)
Yes.
However, the pdaXrom team changes name resolution on the site from time to time, so to be absolutely sure, always go to the pdaXrom.org website and use the navigation there (http://www.pdaxrom.org/index.php?showid=42&menuid=11).
Anyone care to share what versions of distcc and distccd they are running.
distcc comes from the native SDK, so no variation here.
I have upgraded to SuSE 10.0 in the meantime on my new x86_64 machine. The default distributed compiling environment there is icecream (http://wiki.kde.org/tiki-index.php?page=icecream). I was not able to compile an icecream client for the Zaurus (somebody can help me here? It will be MUCH appreciated). So I went to compile the latest distcc 2.18.3 (I'll post a download link to the source and 64-bit binary rpms later).
All this did not make any difference -- I am still able to distcc in exactly the same setup as before.
How about the exact links you made in RC12 (since they are slightly different from the instructions)?
OK, although I am not sure this is your problem...
On the zaurus
lrwxrwxrwx 1 root root 47 Nov 29 21:43 c++ -> /opt/native/arm/3.4.4-xscale-softvfp/bin/distcc
lrwxrwxrwx 1 root root 47 Nov 29 21:43 g++ -> /opt/native/arm/3.4.4-xscale-softvfp/bin/distcc
lrwxrwxrwx 1 root root 47 Nov 29 21:43 gcc -> /opt/native/arm/3.4.4-xscale-softvfp/bin/distcc
On the workstation
lrwxrwxrwx 1 svetlin users 64 2005-11-30 01:02 c++ -> /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/c++
lrwxrwxrwx 1 svetlin users 64 2005-11-30 01:02 g++ -> /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/g++
lrwxrwxrwx 1 svetlin users 64 2005-11-30 01:03 gcc -> /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/gcc
Things that work:
The cross compiler (compiled a simple hello world, and even joe-3.3 on my desktop, copied them to the zaurus and they work).
OK. Did you compile something small natively on the Zaurus (just in case -- there is a suitable example, along with packaging it on the website)?
The network. ping's and ssh's fine.
That does not say much... Did you try to start the distccd daemon and make a telnet to the port it is listening to? You are using distcc through plain TCP (not ssh), right? What does the TCP log on the server say?
Distcc/distccd: works to a degree. When I run make on the zaurus, it starts compiling stuff on my desktop. However, I get an error: "Warning: failed to distribute" on the zaurus.
Strange... If it does start compiling on the desktop, why should it stop?
P.S. I'm running this over usbnet, could this be a hardware problem somehow with that?
I have no idea, all this usb stuff is very alien to me.
See distccd's verbose log below:
What is the b.c file it wants to remotely compile (seems like checking the availability of a compiler on the server -- can not check in my logs now)? Indeed it seems to have received twice the same job from 192.168.1.2 and successfully compiled it... so no problem up to this point.
Please post the relevant Zaurus log. The preprocessing takes place on the Z, only the compilation is on the server.
-
OK, although I am not sure this is your problem...
On the zaurus
lrwxrwxrwx 1 root root 47 Nov 29 21:43 c++ -> /opt/native/arm/3.4.4-xscale-softvfp/bin/distcc
lrwxrwxrwx 1 root root 47 Nov 29 21:43 g++ -> /opt/native/arm/3.4.4-xscale-softvfp/bin/distcc
lrwxrwxrwx 1 root root 47 Nov 29 21:43 gcc -> /opt/native/arm/3.4.4-xscale-softvfp/bin/distcc
On the workstation
lrwxrwxrwx 1 svetlin users 64 2005-11-30 01:02 c++ -> /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/c++
lrwxrwxrwx 1 svetlin users 64 2005-11-30 01:02 g++ -> /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/g++
lrwxrwxrwx 1 svetlin users 64 2005-11-30 01:03 gcc -> /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/gcc
This is what I have too... I didn't think so either, but just checking everything. thanks.
OK. Did you compile something small natively on the Zaurus (just in case -- there is a suitable example, along with packaging it on the website)?
Yep, compiling a hello world works fine locally, haven't tried more than that.
That does not say much... Did you try to start the distccd daemon and make a telnet to the port it is listening to? You are using distcc through plain TCP (not ssh), right? What does the TCP log on the server say?
As I said, the Zaurus is able to connect to distccd as is visible in the log on the PC. I've tried connecting via plain TCP and ssh and both give the same error...
Distcc/distccd: works to a degree. When I run make on the zaurus, it starts compiling stuff on my desktop. However, I get an error: "Warning: failed to distribute" on the zaurus.
Strange... If it does start compiling on the desktop, why should it stop?
I don't think it stops. The PC compiles what the Zaurus tells it to, but the Zaurus, as soon as it sends a job to the PC gives the error I list below.
See distccd's verbose log below:
What is the b.c file it wants to remotely compile (seems like checking the availability of a compiler on the server -- can not check in my logs now)? Indeed it seems to have received twice the same job from 192.168.1.2 and successfully compiled it... so no problem up to this point.
That's what is so odd. This log that appears to have worked fine (from the PC side) is the log of what happened when the Zaurus complained saying:
ERROR: ftruncate fd5 failed: Operation not permitted
Warning: failed to distribute to 192.168.1.1, running locally instead
This is basically the same error on the Zaurus that I've gotten all along.
By the way, this was from trying to compile joe-3.3 (the text editor). The b.c file is the first file Make tries to compile from joe. I figured it would be a good program to give a shot at.
Edit: Also, I noticed that sometimes the log on the PC gives an error. Here is the relevant section from trying to compile joe:
distccd[8952] (dcc_check_client) connection from 192.168.1.2:1036
distccd[8952] (dcc_check_address) match client 0x201a8c0, value 0x201a8c0, mask 0xffffffff
distccd[8952] (dcc_r_token_int) got DIST00000001
distccd[8952] (dcc_r_token_int) got ARGC00000007
distccd[8952] (dcc_r_argv) reading 7 arguments from job submission
distccd[8952] (dcc_r_token_int) got ARGV00000003
distccd[8952] (dcc_r_argv) argv[0] = "gcc"
distccd[8952] (dcc_r_token_int) got ARGV00000002
distccd[8952] (dcc_r_argv) argv[1] = "-g"
distccd[8952] (dcc_r_token_int) got ARGV00000003
distccd[8952] (dcc_r_argv) argv[2] = "-O2"
distccd[8952] (dcc_r_token_int) got ARGV00000002
distccd[8952] (dcc_r_argv) argv[3] = "-c"
distccd[8952] (dcc_r_token_int) got ARGV00000002
distccd[8952] (dcc_r_argv) argv[4] = "-o"
distccd[8952] (dcc_r_token_int) got ARGV00000003
distccd[8952] (dcc_r_argv) argv[5] = "b.o"
distccd[8952] (dcc_r_token_int) got ARGV00000003
distccd[8952] (dcc_r_argv) argv[6] = "b.c"
distccd[8952] (dcc_r_argv) got arguments: gcc -g -O2 -c -o b.o b.c
distccd[8952] (dcc_scan_args) scanning arguments: gcc -g -O2 -c -o b.o b.c
distccd[8952] (dcc_scan_args) found object/output file "b.o"
distccd[8952] (dcc_scan_args) found input file "b.c"
distccd[8952] compile from b.c to b.o
distccd[8952] (dcc_run_job) output file b.o
distccd[8952] (dcc_input_tmpnam) input file b.c
distccd[8952] (dcc_r_token_int) got DOTI00029a3f
distccd[8952] (dcc_r_file) received 170559 bytes to file /tmp/distccd_95f1d7b6.i
distccd[8952] (dcc_r_file_timed) 170559 bytes received in 0.211071s, rate 789kB/s
distccd[8952] (dcc_set_input) changed input from "b.c" to "/tmp/distccd_95f1d7b6.i"
distccd[8952] (dcc_set_input) command after: gcc -g -O2 -c -o b.o /tmp/distccd_95f1d7b6.i
distccd[8952] (dcc_set_output) changed output from "b.o" to "/tmp/distccd_95d7d7b6.o"
distccd[8952] (dcc_set_output) command after: gcc -g -O2 -c -o /tmp/distccd_95d7d7b6.o /tmp/distccd_95f1d7b6.i
distccd[8952] (dcc_check_compiler_masq) /home/jgrauman/distcc/gcc is a safe symlink to /opt/cross/arm/3.4.4-xscale-softvfp/armv5tel-cacko-linux/bin/gcc
distccd[8952] (dcc_spawn_child) forking to execute: gcc -g -O2 -c -o /tmp/distccd_95d7d7b6.o /tmp/distccd_95f1d7b6.i
distccd[9034] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1
distccd[8952] (dcc_spawn_child) child started as pid9034
distccd[8952] (dcc_collect_child) cc child 9034 terminated with status 0
distccd[8952] (dcc_collect_child) cc times: user 1.504771s, system 0.049992s, 4624 minflt, 0 majflt
distccd[8952] (dcc_x_token_int) send DONE00000001
distccd[8952] (dcc_x_token_int) send STAT00000000
distccd[8952] (dcc_x_file) send 0 byte file /tmp/distcc_93afd7b6.stderr with token SERR
distccd[8952] (dcc_x_token_int) send SERR00000000
distccd[8952] (dcc_x_file) send 0 byte file /tmp/distcc_9261d7b6.stdout with token SOUT
distccd[8952] (dcc_x_token_int) send SOUT00000000
distccd[8952] (dcc_x_file) send 80384 byte file /tmp/distccd_95d7d7b6.o with token DOTO
distccd[8952] (dcc_x_token_int) send DOTO00013a00
distccd[8952] (dcc_pump_sendfile) Notice: sendfile: partial transmission of 66548 bytes; retrying 13836 @66548
distccd[8952] (dcc_pump_sendfile) ERROR: sendfile failed: Connection reset by peer
distccd[8952] gcc b.c on localhost completed ok
distccd[8952] job complete
distccd[8952] (dcc_cleanup_tempfiles) deleted 4 temporary files
Notice the error near the end.
-
WOW!!! I think I just figured the problem out. It came back to the warning I've been wondering at all along: ftruncate: Operation not permitted.
It turns out this error was because I was trying to compile on the Zaurus' SD card. After googling ftruncate I realized it was a disc operation (takes a fd as a parameter), so I figured I'd move the joe source to / (it was in /mnt/card). That did it, everything worked beautifully. Apparently you can't ftruncate on a SD card. I assume using CF is ok? Thanks to all who have helped me, I really appreciate it.
Josh
P.S. Can someone confirm my findings, just move something you've compiled fine to an SD card and give it a shot. Thanks again, that was a doosy...
P.P.S. Or, now that I think about it, maybe it has to do with what filesystem is being used... I think my SD is FAT. Can someone confirm...?
-
Looks like the error is due to the filesystem (FAT) at this point. Here is a relevant post by Alan Cox:
http://www.uwsg.iu.edu/hypermail/linux/ker...101.0/1364.html (http://www.uwsg.iu.edu/hypermail/linux/kernel/0101.0/1364.html)
-
Ok, another error. This one should be easier (hopefully). Compiling on Ubuntu worked great. Going back to my Slackware 10.1 system, compiling worked, but linking (joe-3.3, the final command linking all the .o files) gave this error. Any ideas?
/opt/native/arm/3.4.4-xscale-softvfp/lib/gcc/armv5tel-cacko-linux/3.4.4/../../../../armv5tel-cacko-linux/bin/ld: b.o: Relocacations in generic ELF (EM: 3)
b.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
distcc[12253] ERROR: compile (NULL) on localhost failed
make[1]: *** [joe] Error 1
make: *** [all] Error 2
-
Ok, another error. This one should be easier (hopefully). Compiling on Ubuntu worked great. Going back to my Slackware 10.1 system, compiling worked, but linking (joe-3.3, the final command linking all the .o files) gave this error. Any ideas?
/opt/native/arm/3.4.4-xscale-softvfp/lib/gcc/armv5tel-cacko-linux/3.4.4/../../../../armv5tel-cacko-linux/bin/ld: b.o: Relocacations in generic ELF (EM: 3)
b.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
distcc[12253] ERROR: compile (NULL) on localhost failed
make[1]: *** [joe] Error 1
make: *** [all] Error 2
[div align=\"right\"][a href=\"index.php?act=findpost&pid=105752\"][{POST_SNAPBACK}][/a][/div]
This one was much easier. The link on the PC to gcc was in /root/distcc which 'nobody' didn't have permission to, so it was calling /usr/bin/gcc which of course made an i386 .o file...
Thanks so much to all who helped and bore with all my messages. I'm off to compile some programs now Maybe all these posts of mine will help some other poor person trying to get compiling to work. Shouldn't have been so hard, just didn't think about the fact that my SD card was FAT.
-
I've put binary and src x86_64 rpms for SuSE 10.0 of distcc 2.18.3 on this real YaST installation source:
Protocol: HTTP
Server Name: coder.freeshell.org
Directory: suse/10.0
The distcc monitor is compiled with the option --with-gtk, but I have not tested it. Anything else should work.
-
Since I'm also after a current joe, is the shortest route to ask if you've packaged (or would consider packaging) your result, or going back through here and learning to get cross compiling working?
-
I have problem with distcc to talk with distccd on my debian machine over wifi. Anybody know how to check if port 3263 is open?
-
It shouldnt be closed on your Z... I would say check your debian box...
Late
-
It shouldnt be closed on your Z... I would say check your debian box...
Late
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145215\"][{POST_SNAPBACK}][/a][/div]
@debain: netstat -an
tcp6 0 0 :::3632 :::* LISTEN
which is the default port according to the distccd man page. Somebody mentioned port 3263 in an earlier post. I want to make sure my Zaurus is using the same port.
-
Debain box - lan
Zaurus - wifi ping each other without problem.
I followed the instruction through, but I've got the following error on my z
distcc[9697] (dcc_writex) ERROR: failed to write:Connection reset by peer
distcc[9697] (dcc_build_somewhere) Warning: failed to distribute to 192.168.x.x, running locally instead
Anybody know how to check up my set up?
Edit: SOLVED!
I forgot that I set distccd to start at boot-up with a bad allowed ip. Then I didn't stop/restart distccd. No wonder distccd --daemon command didn't work. Now happy compiling.
-
for anyone else having problems initialising the sdk, you may be helped here;
https://www.oesf.org/forums/index.php?showt...runsdk\.sh (https://www.oesf.org/forums/index.php?showtopic=23928&hl=runsdk\.sh)
-
just tried this out finally , and it is great... i should have been using it for a while back....
thanks to the author, ill post my details later.