I'm trying to build the firmware for my 3D-printer. The firmware is the file SprinterFor5to1Extruder.zip and can be found here: http://makergear.googlegroups.com/attach/b118cc03144d17a8/SprinterFor5to1Extruder.zip?part=4
This firmware is known to require "Arduino 0023" in order to compile, which is what I'm using. First I got this to compile fine on a Windows XP machine (using Arduino 0023), no problems. However I need this to work on my GNU/Linux system.
I open the Sprinter.pde file and hit "verify". Then I quickly get the following errors:
In file included from /usr/lib64/gcc/avr/4.5.3/../../../../avr/include/util/delay.h:44:0, from /usr/lib64/gcc/avr/4.5.3/../../../../avr/include/avr/delay.h:37, from /opt/arduino/hardware/arduino/cores/arduino/wiring_private.h:30, from /opt/arduino/hardware/arduino/cores/arduino/WInterrupts.c:34: /usr/lib64/gcc/avr/4.5.3/../../../../avr/include/math.h:426:15: error: expected identifier or '(' before 'double' /usr/lib64/gcc/avr/4.5.3/../../../../avr/include/math.h:426:15: error: expected ')' before '>=' token
I'm using binutils-2.21.1, gcc-core-4.5.3, gcc-g++-4.5.3, avr-libc-1.8.0. My GNU/Linux system is 64-bit Slackware 13.37. I have no known issues with the system itself.
The error doesn't seem to be related to the firmware, but rather to some issue with the Arduino build environment. I'm assuming math.h is pretty common to include and since the compiler fails on that file and not the source code in the actual firmware, I'm guessing this is somehow build environment related?
After some searching I added
#undef round to math.h just before round was defined. That gave me a new set of errors:
/opt/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:92:15: error: attempt to use poisoned "SIG_USART0_RECV" /opt/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:145:15: error: attempt to use poisoned "SIG_USART1_RECV" /opt/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:155:15: error: attempt to use poisoned "SIG_USART2_RECV" /opt/arduino/hardware/arduino/cores/arduino/HardwareSerial.cpp:165:15: error: attempt to use poisoned "SIG_USART3_RECV"
This led me to the thread http://arduino.cc/forum/index.php/topic,92364.0.html about a similar problem. However the suggested solutions to ensure that all the USARTs are defined in iomxx0_1.h or to simply add #define AVR_LIBC_DEPRECATED_ENABLE 1 to Arduino.h do not work. The latter option is not even possible for me, as I don't have the file "Arduino.h".
Any help would be appreciated.
Board: Arduino Mega 2560.