final link failed: Numerical result out of range

I've recently reinstalled my copy of Ubuntu, and found that Arduino no longer works.

Whenever I try to compile and upload a program, I am presented with an error something like this:

/usr/lib/gcc/avr/4.3.2/../../../avr/bin/ld: final link failed: Numerical result out of range

Couldn't determine program size: avr-size: '/share2/electronics/code/arduino/Blink/applet/Blink.hex': No such file

avrdude: can't open input file /share2/electronics/code/arduino/Blink/applet/Blink.hex: No such file or directory
avrdude: write to file '/share2/electronics/code/arduino/Blink/applet/Blink.hex' failed

This is using the example 'blink' program, and saving the sketch to an alternate location, so that it is recompiled. Uploading the example directly from the default examples location works (presumably because it is precompiled).

Here's the example 'blink' code being used:

/*
 * Blink
 *
 * The basic Arduino example.  Turns on an LED on for one second,
 * then off for one second, and so on...  We use pin 13 because,
 * depending on your Arduino board, it has either a built-in LED
 * or a built-in resistor so that you need only an LED.
 *
 * CENSORED URL FOR FORUM FILTER
 */

int ledPin = 13;                // LED connected to digital pin 13

void setup()                    // run once, when the sketch starts
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop()                     // run over and over again
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
}

Board: Arduino Duemilanove (USB)
OS: Ubuntu Jaunty 9.04 (x64)
avr-gcc version: 4.3.2
Arduino version: 0016

Nobody knows how to solve this problem?

Are you using a network file system?

Otherwise, it sounds like a problem in avr-gcc, the compiler used by Arduino. To help track it down, you’ll want to compile a simple program from the command line.

Try something like this:

#include <avr/io.h>

int main()
{
        DDRB |= 0x01;
        PORTB |= 0x01;
}

And compile it with the command line (used by Arduino):

avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -o main.o main.c

Do you get the same error?

Hmm, I'm not using a network filesystem. I was saving it to an NTFS filesystem. I've found saving it to a reiserfs filesystem seems to fix the problem, strange...

Thanks for your advice.

Your example code seems to compile without any problems on both filesystems, which makes this whole thing even weirder.