Ubuntu G4 PPC Arduino Command Line - nearly ......

Hi
I'm running Ubuntu for PPC on an old G4 i-book, bit slow but very light machine. Sun Java is unavailable for this architecture, Open-JDK works good for some apps like Eclipse IDE but does not manage to get Arduino going, soooo,
trying to get Arduino command line working, then i can use text pad and terminal.
I have looked at instructions from http://www.eriksmartt.com/blog/archives/397 which was helpful but what i actually did was too.

created a working directory in my home folder.
copied blink.pde there
copied Makefile there from arduino/hardware/cores/arduino
edited Makefile with correct settings for serial port, arduino install location, and locations for avr-gcc etc which are /usr/bin/
open terminal in working directory and run 'make'
makes fine, creates hex, outputs following ->

Here is the "preprocessing".

It creates a .cpp file based with the same name as the .pde file.

On top of the new .cpp file comes the WProgram.h header.

At the end there is a generic main() function attached.

Then the .cpp file will be compiled. Errors during compile will

refer to this new, automatically generated, file.

Not the original .pde file you actually edit...

test -d applet || mkdir applet
echo '#include "WProgram.h"' > applet/test.cpp
cat test.pde >> applet/test.cpp
cat /home/jowan/MyBin/arduino/hardware/cores/arduino/main.cxx >> applet/test.cpp

text data bss dec hex filename
0 1104 0 1104 450 applet/test.hex

all good so far but ..
run 'make upload' and get the following error !! ..

make upload

/home/jowan/MyBin/arduino/hardware/tools/avrdude -V -F -C /usr/bin/avrdude.conf -p atmega168 -P /dev/ttyUSB0 -c stk500v1 -b 19200 -U flash:w:applet/test.hex
/home/jowan/MyBin/arduino/hardware/tools/avrdude: 1: Syntax error: "(" unexpected
make: *** [upload] Error 2

the usb settings are correct, confirmed from dev folder
also i am linking against the avrdude and avrdude.conf that are in my arduino install directory
can anyone help please

cheerio

Jowan

What's in the test.hex file? What's in avrdude?

the .hex is not identical to those output'd by my other linux and mac machines, but is same size, as follows ->

:100000000C945A000C9477000C9477000C947700B1
:100010000C9477000C9477000C9477000C94770084
:100020000C9477000C9477000C9477000C94770074
:100030000C9477000C9477000C9477000C94770064
:100040000C94A1000C9477000C9477000C9477002A
:100050000C9477000C9477000C9477000C94770044
:100060000C9477000C947700000024272A000025C8
:10007000282B000023262904040404040404040299
:100080000202020202030303030303010204081035
:100090002040800102040810200102040810200002
:1000A0000000070002010000030406000000000039
:1000B0000000000011241FBECFEFD4E0DEBFCDBF93
:1000C00011E0A0E0B1E0EEE4F4E002C005900D9292
:1000D000A230B107D9F711E0A2E0B1E001C01D9252
:1000E000A630B107E1F70E9496000C9426020C940A
:1000F000000061E0809100010E94B90168EE73E0A8
:1001000080E090E00E94DE0060E0809100010E94AB
:10011000B90168EE73E080E090E00E94DE0008958F
:1001200061E0809100010E944F010895CFEFD4E07B
:10013000DEBFCDBF0E940D010E9490000E94790099
:10014000FDCF1F920F920FB60F9211248F939F93A2
:10015000AF93BF938091020190910301A09104019C
:10016000B09105010196A11DB11D809302019093EC
:100170000301A0930401B0930501BF91AF919F913A
:100180008F910F900FBE0F901F90189560910201F4
:1001900070910301809104019091050127E0660FA1
:1001A000771F881F991F2A95D1F72DE730E040E08F
:1001B00050E00E940402CA01B9010895AF92BF92B3
:1001C000CF92DF92EF92FF920F931F935B016C012E
:1001D0000E94C6007B018C010E94C6006E197F0937
:1001E000800B910B6A157B058C059D05A8F31F916B
:1001F0000F91FF90EF90DF90CF90BF90AF90089558
:10020000019751F0880F991F880F991F02972FB7F8
:10021000F8940197F1F72FBF089578941092020196
:1002200010920301109204011092050184B58260BE
:1002300084BD84B5816084BD85B5826085BD85B58A
:10024000816085BDEEE6F0E0808181608083E1E839
:10025000F0E0808182608083808181608083E0E83B
:10026000F0E0808181608083E1EBF0E08081846058
:100270008083E0EBF0E0808181608083EAE7F0E05A
:1002800080818460808380818260808380818160BE
:1002900080838081806880831092C1000895282F18
:1002A0003327C90185579F4FFC01949129583F4F2F
:1002B000F9018491882381F0E82FFF27E859FF4F47
:1002C000E491FF27662329F4808190958923808318
:1002D00008958081892B80830895482F5527CA016E
:1002E00081569F4FFC012491CA0185579F4FFC0105
:1002F000949149585F4FFA013491332319F480E007
:1003000090E00895222331F1233021F48091800080
:100310008F7705C0243031F4809180008F7D8093E9
:10032000800018C0213019F484B58F7704C02230C2
:1003300021F484B58F7D84BD0DC0263021F48091D9
:10034000B0008F7705C0273029F48091B0008F7DF1
:100350008093B000E32FFF27EE58FF4FE491FF2773
:10036000808120E030E0892311F021E030E0C901F4
:100370000895482F5527CA0181569F4FFC012491AB
:10038000CA0185579F4FFC01949149585F4FFA016C
:1003900034913323C1F1222331F1233021F48091B0
:1003A00080008F7705C0243031F4809180008F7DEC
:1003B0008093800018C0213019F484B58F7704C071
:1003C000223021F484B58F7D84BD0DC0263021F408
:1003D0008091B0008F7705C0273029F48091B0005C
:1003E0008F7D8093B000E32FFF27E359FF4FE49107
:1003F000FF27662329F480819095892380830895BF
:100400008081892B80830895A1E21A2EAA1BBB1B31
:10041000FD010DC0AA1FBB1FEE1FFF1FA217B307D0
:10042000E407F50720F0A21BB30BE40BF50B661FE6
:10043000771F881F991F1A9469F7609570958095AA
:0E04400090959B01AC01BD01CF010895FFCF47
:02044E000D009F
:00000001FF

so i feel the command line is working fine for compiling, havent tried including libraries yet, but one step at a time.
maybe this suggests its avr-dude.
the avr-dude.conf hasn't been touched, neither has the avr-dude, both of these are those as downloaded with the package arduino 11.
maybe i should try linking against the avr-dude in my /usr/bin/ ?
it seems strange to get a 'syntax error' .
i will go to the avr-dude homepage and try and run some standalone tests.
thanks