Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting multiple definition errors when I try and compile code for mbed platform #571

Closed
gilandose opened this issue Mar 10, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@gilandose
Copy link

Operating system:
Linux
PlatformIO Version 2.8.5

Description of problem

When I compile against a crypto library for the mbed platform it fails with the multiple definitions errors as seen below. The code compiles correctly in the online mbed compiler. Am happy to try out some things to fix it with some guidance. Crypto library can be found here

Actual Results

/home/rgilmore/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/softfp/libstdc++_s.a(vterminate.o): In function __gnu_cxx::__verbose_terminate_handler()': vterminate.cc:(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x0): multiple definition of__gnu_cxx::__verbose_terminate_handler()'
.pioenvs/nucleo_f401re/libFrameworkMbed.a(retarget.o):retarget.cpp:(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x0): first defined here
/home/rgilmore/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/softfp/libstdc++_s.a(atexit_arm.o): In function __aeabi_atexit': atexit_arm.cc:(.text.__aeabi_atexit+0x0): multiple definition of__aeabi_atexit'
/home/rgilmore/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/softfp/libc_s.a(lib_a-aeabi_atexit.o):aeabi_atexit.c:(.text.__aeabi_atexit+0x0): first defined here
/home/rgilmore/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/softfp/libstdc++_s.a(del_op.o): In function operator delete(void*)': del_op.cc:(.text._ZdlPv+0x0): multiple definition ofoperator delete(void*)'
/home/rgilmore/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/softfp/libstdc++_s.a(del_op.o):del_op.cc:(.text._ZdlPv+0x0): first defined

Expected Results

Should build successfully does not build

If problems with PlatformIO Build System:

The content of platformio.ini:

platform = ststm32
framework = mbed
board = nucleo_f401re
upload_port = /media/rgilmore/NODE_F401RE/

Source file to reproduce issue:

#include "mbed.h"
#include "Crypto.h"
//------------------------------------
// Hyperterminal configuration
// 115200 bauds, 8-bit data, no parity
//------------------------------------

Serial pc(USBTX, USBRX);

DigitalOut myled(LED1);

int main() {
  int i = 1;
  int j=0;
  pc.baud(115200);
  uint8_t key[16] = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c};
  uint8_t plaintext[16] = {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a};
  uint8_t ciphertext[16];
  while(1) {
      wait(0.1);
      AES myAES(AES_128,key);
      myAES.encrypt(ciphertext,plaintext,16);
      j=i%16;
      i++;
      pc.printf("%d\n", ciphertext[j]);
      myled = !myled;
  }
}

Additional info

@ivankravets
Copy link
Member

Thanks. Please re-test in the latest http://docs.platformio.org/en/latest/installation.html#development-version

@gilandose
Copy link
Author

Thanks, for that builds fine now no errors.

ivankravets added a commit to ivankravets/homebrew that referenced this issue Mar 22, 2016
-   Launched [PlatformIO Community Forums](http://community.platformio.org) ([issue \Homebrew#530])
-   Added support for ARM mbed-enabled board Seed Arch Max (STM32F407VET6) ([issue \Homebrew#572])
-   Improved DNS lookup for PlatformIO API
-   Updated Arduino Wiring-based framework to the latest version for Atmel AVR/SAM development platforms
-   Updated “Teensy Loader CLI” and fixed uploading of large .hex files ([issue \Homebrew#568])
-   Updated the support for Sanguino Boards ([issue \Homebrew#586])
-   Better handling of used boards when re-initialize/update project
-   Improved support for non-Unicode user profiles for Windows OS
-   Disabled progress bar for download operations when prompts are disabled
-   Fixed multiple definition errors for ST STM32 development platform and ARM mbed framework ([issue \Homebrew#571])
-   Fixed invalid board parameters (reset method and baudrate) for a few ESP8266 based boards
-   Fixed “KeyError: ‘content-length’” in PlatformIO Download Manager ([issue \Homebrew#591])

  [issue \Homebrew#530]: platformio/platformio-core#530
  [issue \Homebrew#572]: platformio/platformio-core#572
  [issue \Homebrew#568]: platformio/platformio-core#568
  [issue \Homebrew#586]: platformio/platformio-core#586
  [issue \Homebrew#571]: platformio/platformio-core#571
  [issue \Homebrew#591]: platformio/platformio-core#591
xu-cheng pushed a commit to Homebrew/homebrew-core that referenced this issue Mar 23, 2016
-   Launched [PlatformIO Community Forums](http://community.platformio.org) ([issue \#530])
-   Added support for ARM mbed-enabled board Seed Arch Max (STM32F407VET6) ([issue \#572])
-   Improved DNS lookup for PlatformIO API
-   Updated Arduino Wiring-based framework to the latest version for Atmel AVR/SAM development platforms
-   Updated “Teensy Loader CLI” and fixed uploading of large .hex files ([issue \#568])
-   Updated the support for Sanguino Boards ([issue \#586])
-   Better handling of used boards when re-initialize/update project
-   Improved support for non-Unicode user profiles for Windows OS
-   Disabled progress bar for download operations when prompts are disabled
-   Fixed multiple definition errors for ST STM32 development platform and ARM mbed framework ([issue \#571])
-   Fixed invalid board parameters (reset method and baudrate) for a few ESP8266 based boards
-   Fixed “KeyError: ‘content-length’” in PlatformIO Download Manager ([issue \#591])

  [issue \#530]: platformio/platformio-core#530
  [issue \#572]: platformio/platformio-core#572
  [issue \#568]: platformio/platformio-core#568
  [issue \#586]: platformio/platformio-core#586
  [issue \#571]: platformio/platformio-core#571
  [issue \#591]: platformio/platformio-core#591

Closes Homebrew/legacy-homebrew#50326.

Signed-off-by: Dominyk Tiller <[email protected]>
benjaminfrank pushed a commit to benjaminfrank/homebrew that referenced this issue Apr 9, 2016
-   Launched [PlatformIO Community Forums](http://community.platformio.org) ([issue \Homebrew#530])
-   Added support for ARM mbed-enabled board Seed Arch Max (STM32F407VET6) ([issue \Homebrew#572])
-   Improved DNS lookup for PlatformIO API
-   Updated Arduino Wiring-based framework to the latest version for Atmel AVR/SAM development platforms
-   Updated “Teensy Loader CLI” and fixed uploading of large .hex files ([issue \Homebrew#568])
-   Updated the support for Sanguino Boards ([issue \Homebrew#586])
-   Better handling of used boards when re-initialize/update project
-   Improved support for non-Unicode user profiles for Windows OS
-   Disabled progress bar for download operations when prompts are disabled
-   Fixed multiple definition errors for ST STM32 development platform and ARM mbed framework ([issue \Homebrew#571])
-   Fixed invalid board parameters (reset method and baudrate) for a few ESP8266 based boards
-   Fixed “KeyError: ‘content-length’” in PlatformIO Download Manager ([issue \Homebrew#591])

  [issue \Homebrew#530]: platformio/platformio-core#530
  [issue \Homebrew#572]: platformio/platformio-core#572
  [issue \Homebrew#568]: platformio/platformio-core#568
  [issue \Homebrew#586]: platformio/platformio-core#586
  [issue \Homebrew#571]: platformio/platformio-core#571
  [issue \Homebrew#591]: platformio/platformio-core#591

Closes Homebrew#50326.

Signed-off-by: Dominyk Tiller <[email protected]>
jvillard pushed a commit to jvillard/homebrew that referenced this issue Jul 25, 2016
-   Launched [PlatformIO Community Forums](http://community.platformio.org) ([issue \Homebrew#530])
-   Added support for ARM mbed-enabled board Seed Arch Max (STM32F407VET6) ([issue \Homebrew#572])
-   Improved DNS lookup for PlatformIO API
-   Updated Arduino Wiring-based framework to the latest version for Atmel AVR/SAM development platforms
-   Updated “Teensy Loader CLI” and fixed uploading of large .hex files ([issue \Homebrew#568])
-   Updated the support for Sanguino Boards ([issue \Homebrew#586])
-   Better handling of used boards when re-initialize/update project
-   Improved support for non-Unicode user profiles for Windows OS
-   Disabled progress bar for download operations when prompts are disabled
-   Fixed multiple definition errors for ST STM32 development platform and ARM mbed framework ([issue \Homebrew#571])
-   Fixed invalid board parameters (reset method and baudrate) for a few ESP8266 based boards
-   Fixed “KeyError: ‘content-length’” in PlatformIO Download Manager ([issue \Homebrew#591])

  [issue \Homebrew#530]: platformio/platformio-core#530
  [issue \Homebrew#572]: platformio/platformio-core#572
  [issue \Homebrew#568]: platformio/platformio-core#568
  [issue \Homebrew#586]: platformio/platformio-core#586
  [issue \Homebrew#571]: platformio/platformio-core#571
  [issue \Homebrew#591]: platformio/platformio-core#591

Closes Homebrew#50326.

Signed-off-by: Dominyk Tiller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants