OpenAstroTracker-Firmware icon indicating copy to clipboard operation
OpenAstroTracker-Firmware copied to clipboard

Compiling Error redefinition of 'float fabsf'

Open sniperlucian opened this issue 3 years ago • 1 comments

trying to compile with Arduino IDE 1.8.19 on Linux (Manjaro).

Get following compile error:


OpenAstroTech/OpenAstroTracker-Firmware/src/Utility.cpp:212:7: error: redefinition of 'float fabsf(float)'
  212 | float fabsf(float x)
      |       ^~~~~
In file included from OpenAstroTech/OpenAstroTracker-Firmware/src/Utility.cpp:1:
/usr/avr/include/math.h:163:21: note: 'float fabsf(float)' previously defined here
  163 | static inline float fabsf (float __x)
      |                     ^~~~~
exit status 1
Error compiling for board Arduino Mega or Mega 2560.

sniperlucian avatar Aug 13 '22 20:08 sniperlucian

Hmm, can't replicate on my end. Arduino IDE 1.8.19 on Manjaro as well: https://gist.github.com/julianneswinoga/b2ca9b2b51629eee0e0d570969521e47

Could you try platformio? It's really easy on linux:

$ cd OpenAstroTracker-Firmware
$ python3 -m venv .venv # create virtual environment
$ ./.venv/bin/pip install platformio # install pio to virtual environment
$ ./.venv/bin/pio run -e ramps # build firmware

julianneswinoga avatar Aug 13 '22 21:08 julianneswinoga

Closing because no response

julianneswinoga avatar Oct 03 '22 21:10 julianneswinoga

sorry - completely missed the replay.

compilation run through with platformio.

sniperlucian avatar Oct 03 '22 22:10 sniperlucian

Sorry, you're saying that it worked with platformio?

julianneswinoga avatar Oct 03 '22 23:10 julianneswinoga

yes it worked with platformio.

  • made a fresh git clone
  • generated basic config file with web interface (doesn't work with default config - missing parameter)
  • followed your steps
  • compilation run successful trough

guess I need to take a deeper look at platformio - its new to me ;)

sniperlucian avatar Oct 04 '22 04:10 sniperlucian