Arduino-0022 & 23 with Ubuntu 12.04

The RAMBo board is finally here, and here's a place to talk about it!
Post Reply
User avatar
thingevery
Prints-a-lot
Posts: 33
Joined: Mon Dec 24, 2012 5:22 pm

Arduino-0022 & 23 with Ubuntu 12.04

Post by thingevery »

If you're using Ubuntu 12.04 and trying to compile Marlin firmware using Arduino-0022 or 23, you may get an error like this:

Code: Select all

In file included from /usr/lib/gcc/avr/4.5.3/../../../avr/include/util/delay.h:44:0,
                 from /usr/lib/gcc/avr/4.5.3/../../../avr/include/avr/delay.h:37,
                 from /home/defect/Downloads/arduino-0023/hardware/arduino/cores/arduino/wiring_private.h:30,
                 from /home/defect/Downloads/arduino-0023/hardware/arduino/cores/arduino/WInterrupts.c:34:
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:427:15: error: expected identifier or '(' before 'double'
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:427:15: error: expected ')‚' before '>=' token
To fix this, you'll need to make a small change to a file on your system. Here's how:
  • 1. Open a new Terminal window.
    2. Open the file in gedit.

    Code: Select all

    sudo gedit /usr/lib/avr/include/math.h
    3. Enter your password.
    4. Scroll down to line 427 or so, and add the line:

    Code: Select all

    #undef round
    so it looks like:

    Code: Select all

    #undef round
    extern double round (double __x) __ATTR_CONST__;
    #define roundf round...
    5. Save and close the file. Arduino should now compile without error.
I found this solution here: http://www.freesoftwaretalk.org/en/10-o ... rce/nanode.

This held me up for 2 days. Hopefully you found it quicker.
Post Reply

Return to “RAMBo”