Author Topic: Ndless SDK 4.5 Compiling Error  (Read 3487 times)

0 Members and 1 Guest are viewing this topic.

Offline Mumflr

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Ndless SDK 4.5 Compiling Error
« on: September 19, 2018, 04:00:32 pm »
After finally getting the SDK to run and compile the "newlib" sample with no errors, I tried some of the other samples. When trying to compile the "colors" sample I get this error:

Code: [Select]
mkdir -p .
nspire-ld colors.o -o ./colors.elf -Wl,--gc-sections
arm-none-eabi-ld: /Users/Me/Ndless/ndless-sdk/bin/../lib/libsyscalls.a(stdlib.o): in function `_malloc_r':
stdlib.cpp:(.text._malloc_r+0x0): multiple definition of `_malloc_r'; /usr/local/Cellar/gcc-arm-none-eabi/20171218/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-mallocr.o):mallocr.c:(.text._malloc_r+0x0): first defined here
arm-none-eabi-ld: /Users/Me/Ndless/ndless-sdk/bin/../lib/libsyscalls.a(stdlib.o): in function `_free_r':
stdlib.cpp:(.text._free_r+0x0): multiple definition of `_free_r'; /usr/local/Cellar/gcc-arm-none-eabi/20171218/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-freer.o):mallocr.c:(.text._free_r+0x0): first defined here
arm-none-eabi-ld: /usr/local/Cellar/gcc-arm-none-eabi/20171218/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): in function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'
collect2: error: ld returned 1 exit status
make: *** [colors.elf] Error 1

when I try to compile my own simple HelloWorld program I also get an error saying, "sbrkr.c:(.text._sbrk_r+0x18): undefined reference to `_sbrk'"

I have looked at other people who have the same issue, but maybe because of other versions of Ndless, or different OS (by the way, I'm on mac), their advice doesn't seem to help.

Thank you for any assistance!