Errors compiling using 2.0 beta



  • Hi,

    I'm getting errors compiling when using the 2.0 beta, anyone has an idea about the cause? I'm not signing anything in my code or enabled it. Please see the errors below:
    Arduino: 1.6.7 (Windows 10), Board: "Arduino/Genuino Uno" libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::init()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/drivers/ATSHA204/sha256.cpp:35: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::ror32(unsigned long, unsigned char)' sketch\MySketch.ino.cpp.o:C:\Program Files (x86)Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here
    libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::hashBlock()'
    sketch\EthernetGateway-Kaku.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::addUncounted(unsigned char)'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::write(unsigned char)' sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::pad()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::result()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::initHmac(unsigned char const*, int)' sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here
    libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of Sha256Class::resultHmac()'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of innerHash'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here libraries\MySensors\utility\sha256.cpp.o: In function Sha256Class::init()': C:\Program Files (x86)\Arduino\libraries\MySensors\utility/sha256.cpp:35: multiple definition of keyBuffer'
    sketch\MySketch.ino.cpp.o:C:\Program Files (x86)\Arduino\libraries\MySensors/core/MyHwATMega328.cpp:28: first defined here sketch\MySketch.ino.cpp.o: In function sendHeartbeat()': C:\Program Files (x86)\Arduino\libraries\MySensors/core/MySensorsCore.cpp:276: undefined reference to transportGetHeartbeat()'collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compiling.
    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.


  • Mod

    My guess is that you installed MySensors 2.0 without removing 1.x

    Try deleting the libraries folder and installing MySensors fresh from the development version.



  • Thanks! That solved most of the errors. The only one left now is;

    Arduino: 1.6.7 (Windows 10), Board: "Arduino/Genuino Uno" sketch\MySketch.ino.cpp.o: In function sendHeartbeat()': C:\Program Files (x86)\Arduino\libraries\MySensors/core/MySensorsCore.cpp:276: undefined reference to transportGetHeartbeat()'
    collect2.exe: error: ld returned 1 exit status
    exit status 1
    Error compiling.

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.



  • Did some more testing, but also with an example sketch like HumiditySensor I get the same error In function `_processInternalMessages()':
    MySensorsCore.cpp:276: undefined reference totransportGetHeartbeat()'

    Anyone an idea?

    Thanks.


  • Admin

    @alfredb I'm on Arduino 1.6.9 and AVR boards updated (1.6.11), most recent dev lib (2.0.0) and no issues compiling the example you mentioned. I suggest you update your installation including boards and give it a shot.



  • Thanks tekka! I have updated to IDE 1.6.9 (was on 1.6.7) and also found out I was using the wrong location for libraries (the libraries I copied to the program files folder in C:\Program Files(86)\Arduino, seems they belong in the documents folder of the user profile). After this indeed the example Sketch HumiditySensor now compiled without errors.

    On my particular sketch (I want to use send locally attached sensors through the ethernet gateway) I stil got the error. Now I started to compare the two and the error disappears when I include the MY_RADIO library (#define MY_RADIO_NRF24) in my sketch.

    Very happy that it's solved now. Thanks for your help!


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts