hamedtorky / arbotix

Automatically exported from code.google.com/p/arbotix
0 stars 0 forks source link

Compilation error when verifying PyPose.pde #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I downloaded and installed pypose according to the installation instructions 
on the pypose site
2. I connected the computer to the ArbotiX board which has 5 servos (a 
turtlebot arm) attached via a USB to Serial TTL cable.
3. I tried to upload pypose.pde

What is the expected output? What do you see instead?
I should have been able to upload the program to the board.  Instead I get the 
following error:

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/marc/sketchbook/hardware/arbotix/cores/arbotix/wiring_private.h:30,
                 from /home/marc/sketchbook/hardware/arbotix/cores/arbotix/WInterrupts.c:33:
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected 
identifier or ‘(’ before ‘double’
/usr/lib/gcc/avr/4.5.3/../../../avr/include/math.h:426:15: error: expected 
‘)’ before ‘>=’ token

The offending section of code in math.h is:

/**
    The round() function rounds \a __x to the nearest integer, but rounds
    halfway cases away from zero (instead of to the nearest even integer).
    Overflow is impossible.

    \return The rounded value. If \a __x is an integral or infinite, \a
    __x itself is returned. If \a __x is \c NaN, then \c NaN is returned.
 */
extern double round (double __x) __ATTR_CONST__;  /** Line 426 */
#define roundf  round       /**< The alias for round(). */

What version of the product are you using? On what operating system?
I am using the latest version of pypose (the one included with 
arbotix-0014.zip) running on Ubuntu 11.10

Please provide any additional information below.
I have not made any changes to math.h other than the /** Line 426  **/ comment.

Original issue reported on code.google.com by marc.e.h...@gmail.com on 11 Nov 2011 at 7:59

GoogleCodeExporter commented 9 years ago
an easy patch for this already exists. the issue is that wiring.h and math.h 
are defining the same function. To fix it comment out line 79 in arbotix's 
wiring.h file and that will remove the conflict.

Original comment by tobioatom on 5 Feb 2012 at 12:33

GoogleCodeExporter commented 9 years ago
Fixed in trunk, will be released shortly

Original comment by MFergs7@gmail.com on 12 Feb 2012 at 7:26

GoogleCodeExporter commented 9 years ago

Original comment by MFergs7@gmail.com on 12 Feb 2012 at 7:26