Skip to content

Arduino/ESP8266 2.1.0 now includes __cxa_guard_* functions #266

Closed

Description

@ncaunt

As of version 2.1.0, ESP8266 core for Arduino includes the _cxa_guard* functions which conflict with those in FastLED.

I haven't yet had a chance to find a neat solution but for the time being removing the line #define NEED_CXX_BITS from platforms\esp\8266\led_sysdefs_esp8266.h fixes the issue.

Sample messages to help those searching for the error:

C:\Users\foobar\AppData\Local\Temp\buildd782c7fbc1e7873555d9cadaa1f56454.tmp/arduino.ar(abi.cpp.o): In function `__cxa_guard_acquire':

C:\Users\foobar\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266/abi.cpp:67: multiple definition of `__cxa_guard_acquire'

C:\Users\foobar\AppData\Local\Temp\buildd782c7fbc1e7873555d9cadaa1f56454.tmp\libraries\FastLED\FastLED.cpp.o:C:\Program Files (x86)\Arduino\libraries\FastLED/FastLED.cpp:252: first defined here

C:\Users\foobar\AppData\Local\Temp\buildd782c7fbc1e7873555d9cadaa1f56454.tmp/arduino.ar(abi.cpp.o): In function `__cxa_guard_release':

C:\Users\foobar\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266/abi.cpp:78: multiple definition of `__cxa_guard_release'

C:\Users\foobar\AppData\Local\Temp\buildd782c7fbc1e7873555d9cadaa1f56454.tmp\libraries\FastLED\FastLED.cpp.o:C:\Program Files (x86)\Arduino\libraries\FastLED/FastLED.cpp:257: first defined here

C:\Users\foobar\AppData\Local\Temp\buildd782c7fbc1e7873555d9cadaa1f56454.tmp/arduino.ar(abi.cpp.o): In function `__cxa_guard_abort':

C:\Users\foobar\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266/abi.cpp:84: multiple definition of `__cxa_guard_abort'

C:\Users\foobar\AppData\Local\Temp\buildd782c7fbc1e7873555d9cadaa1f56454.tmp\libraries\FastLED\FastLED.cpp.o:C:\Program Files (x86)\Arduino\libraries\FastLED/FastLED.cpp:261: first defined here

collect2.exe: error: ld returned 1 exit status

Using library FastLED at version 3.1.1 in folder: C:\Program Files (x86)\Arduino\libraries\FastLED 
exit status 1
Error compiling.

Activity

  1. TheAustrian commented on Mar 1, 2016

    @TheAustrian

    I had the same issue - thank you for the quick fix!

  2. timfield commented on Mar 5, 2016

    @timfield

    Same issue here too... this temporary workaround worked. Thanks!

  3. antonmeyer commented on Mar 6, 2016

    @antonmeyer

    cxxabi.h
    sets
    #ifndef _CXXABI_H
    #define _CXXABI_H 1

    but checking for it does not help in FastLed.cpp
    guess it has todo with the include order

    may be NEED_CXX_BITS is not needed anymore for arduino IDE?
    I have no glue if that works better, but checking
    #ifndef Arduino_h
    works at least.

  4. focalintent commented on Mar 8, 2016

    @focalintent
    Contributor

    cxxabi.h is included in the older versions of the esp8266 library code, and _CXXABI_H is defined, so that wouldn't help for this.

    NEED_CXX_BITS is necessary for some platforms, and not for others, and I haven't found a reliable way to make the determination of whether it is or isn't, which is why it's defined by hand for various platforms.

    I'll have to work out another way to fix this that will work with esp8266 environments that do and don't provide these definitions.

  5. antonmeyer commented on Mar 12, 2016

    @antonmeyer

    works. I did not know about this tricks.

  6. tomjuggler commented on Aug 2, 2016

    @tomjuggler

    Thank you ncaunt I am saved by your trick. Circuit boards arriving this afternoon and I need to program my esp's like now!

  7. tomjuggler commented on Aug 2, 2016

    @tomjuggler

    Oh I see updated FastLED it is fixed this issue is closed anyway duh. Thanks guys for fixing it I had a minor panic attack there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions