3

I get a linking error after updating Movesense library from 1.8.1 to 1.9.0 in my project and even in the hello world sample project. Has anyone else has this problem and can offer a solution?

I am running the SDK on

  • Ubuntu 18.04.2 LTS
  • arm-none-eabi-gcc 7.3.1

Same problem with gcc-arm-none-eabi-7-2017-q4

Here is the output of the linking failure after calling ninja:

FAILED: Movesense 
: && /usr/bin/arm-none-eabi-gcc  -W -Wall -[...] ../platform/nRF5x/linker/gcc/appflash.ld CMakeFiles/Movesense.dir/App.cpp.obj CMakeFiles/Movesense.dir/HelloWorldService.cpp.obj CMakeFiles/Movesense.dir/generated/sbem-code/sbem_definitions.cpp.obj CMakeFiles/Movesense.dir/generated/app-resources/resources.cpp.obj CMakeFiles/Movesense.dir/app-metadata/metadata.cpp.obj  -o Movesense  /home/lukas/Projects/movesense/movesense-device-lib/MovesenseCoreLib/lib/GCCARM/libmovesense-coreD.a -lm -lstdc++ && :
lto1: internal compiler error: bytecode stream: expected tag round_div_expr instead of reference_type
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: /usr/bin/arm-none-eabi-gcc returned 1 exit status
compilation terminated.
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

With Movesense 1.8.1 everything works fine:

git checkout 38be3c2
[...]
cmake -G Ninja -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ -DCMAKE_TOOLCHAIN_FILE=../MovesenseCoreLib/toolchain/gcc-nrf52.cmake ../samples/hello_world_app
[...]
ninja
[...]
[8/8] Linking CXX executable Movesense

Thanks in advance!

lllllukas
  • 31
  • 4
  • I've also experienced the same problem. I did the same as you, compile with Movesense 1.8.1 – Jorge Jiménez Jul 04 '19 at 13:23
  • 1
    What platform are you compiling on? From the path, it looks like it's not on Windows. There is a bug in the tool chain on MacOS ref https://bitbucket.org/suunto/movesense-device-lib/src/2f3f7d007701314c7d9d5e99e9041e09dcf801b1/CHANGES.md – Morten Jul 19 '19 at 08:35

1 Answers1

0

From CHANGES.md (& README.md) since 1.9.0

  • REQUIRED: Use Windows build environment only (due to above GNU OSX bug)
  • REQUIRED: Use GNU Toolchain for ARM v. 7.2.1 2017q4

This situation is unfortunate and will be rectified in the coming 2.0 release with a new docker based build environment.

Full Disclaimer: I work for the Movesense team

PetriL
  • 1,211
  • 1
  • 7
  • 11