arduino-0017 - Binary sketch size 0

I have upgraded to arduino-0017 on Ubuntu 7.04. Whenever I 'verify' a sketch I get the message Binary sketch size: 0 bytes (of a 14336 maximum). The files in the 'applet' directory are updated. However when I try to 'upload' I get the same message about the sketch size. The Tx and Rx leds on the arduino board, but the old sketch remains loaded.
I have tried removing the preferences.txt in the '~/.arduino' directory. I get prompted for the sketchbook directory but still get the 0 bytes message. This happens with every sketch (including 'blink'). I was previously using arduino-0012 and had no problems. I have gone back to 0012 and it still works. Does any body have any ideas?
Thanks
Spindoe

Hi,
maybe this has to do with the now 2 years old ubuntu release?
Do you get some more output when you set build.verbose=true
in preferences.txt?
Eberhard

Tried 'build.verbose=true'. Here is the console output

avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/wiring.c -o/tmp/build17234.tmp/wiring.c.o
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/wiring_shift.c -o/tmp/build17234.tmp/wiring_shift.c.o
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/pins_arduino.c -o/tmp/build17234.tmp/pins_arduino.c.o
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/WInterrupts.c -o/tmp/build17234.tmp/WInterrupts.c.o
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/wiring_digital.c -o/tmp/build17234.tmp/wiring_digital.c.o
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/wiring_analog.c -o/tmp/build17234.tmp/wiring_analog.c.o
avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/wiring_pulse.c -o/tmp/build17234.tmp/wiring_pulse.c.o
avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/HardwareSerial.cpp -o/tmp/build17234.tmp/HardwareSerial.cpp.o
avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/Print.cpp -o/tmp/build17234.tmp/Print.cpp.o
avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /home/bill/arduino/arduino-0017/hardware/cores/arduino/WMath.cpp -o/tmp/build17234.tmp/WMath.cpp.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/wiring.c.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/wiring_shift.c.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/pins_arduino.c.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/WInterrupts.c.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/wiring_digital.c.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/wiring_analog.c.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/wiring_pulse.c.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/HardwareSerial.cpp.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/Print.cpp.o
avr-ar rcs /tmp/build17234.tmp/core.a /tmp/build17234.tmp/WMath.cpp.o
avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/home/bill/arduino/arduino-0017/hardware/cores/arduino /tmp/build17234.tmp/blink.cpp -o/tmp/build17234.tmp/blink.cpp.o
avr-gcc -Os -Wl,--gc-sections -mmcu=atmega168 -o /tmp/build17234.tmp/blink.cpp.elf /tmp/build17234.tmp/blink.cpp.o /tmp/build17234.tmp/core.a -L/tmp/build17234.tmp -lm
avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/build17234.tmp/blink.cpp.elf /tmp/build17234.tmp/blink.cpp.eep
avr-objcopy -O ihex -R .eeprom /tmp/build17234.tmp/blink.cpp.elf /tmp/build17234.tmp/blink.cpp.hex
Binary sketch size: 0 bytes (of a 14336 byte maximum)

I don't see why using an old version of Ubuntu would cause the problem - I thought java made it platform independent. Also it 0017 runs OK on my Windows XP machine which is MUCH older than the Ubuntu.
:slight_smile:

Cheers
Spindoe

I don't see why using an old version of Ubuntu would cause the problem - I thought java made it platform independent.

Only the editor and some preprocessing of the sketches are coded in Java. The compiler and the tool that prints out the size of the compiled code are native programs (which are not maintained by the Arduino-Team).

The windows-version of Arduino packages the compiler and other tools along with the IDE. On Linux you install the compiler with the package-manager.
I don't know which version of the avr-gcc compiler and the avr-libc is used on Ubuntu 7.04. But probably 0017 requires newer versions?

On 9.04 the avr-size tool (which calculates the code-size of the sketch) reports a version of

wayoda@rebooter:~$ avr-size --version
GNU size (GNU Binutils) 2.18 (WinAVR 20080610)

Is your version maybe older and somehow not compatible any more ?

Eberhard

Thanks for your suggestion, the avr version is definitely older

~/sketchbook/blink/applet > avr-size --version
GNU size 2.16.1

With version 0017 the hex file is empty (snippet of ls -l below)

13 2009-09-03 14:04 blink.cpp.hex

With version 0011 the hex file is not empty

3119 2009-09-03 18:25 blink.hex

Now as the same compiler was used by both 0011 and 0017 this suggests it was being with different options.
I do not want to upgrade because whenever I have upgraded anything in the past on Linux it tends to break something else and I spend most of my time FIXING Linux rather than USING it. I shall stick to Windows.
Spindoe

You cannot really expect things always to work if you upgrade one part, the Arduino IDE, and not the the tools that this part uses, avr-gcc.

Sometimes it will work, many times it will not work.

There has been know cases of people using a lot of time to fix problems under Windows when upgrading applications, this also happens for MacOS and Linux. But I can definitely assure you that the latest versions of Ubuntu ( I use Fedora ) are more stable and easier to upgrade than the old ones. So if you want to use Linux (why ask otherwise ?) IMHO the smart thing is to upgrade as soon as there are no super important projects for the next couple of days.