与Movesense库1.9.0.rc3链接错误

时间:2019-05-21 09:33:11

标签: c++ movesense

在我的项目中,甚至在hello world示例项目中,将Movesense库从1.8.1更新到1.9.0后,都出现了链接错误。还有其他人有这个问题并且可以提供解决方案吗?

我正在运行SDK

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

gcc-arm-none-eabi-7-2017-q4的相同问题

这是调用忍者后链接失败的输出:

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.

使用Movesense 1.8.1,一切正常:

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

谢谢!

1 个答案:

答案 0 :(得分:0)

从1.9.0版开始,来自CHANGES.md(&README.md)

  • 必需:仅使用Windows构建环境(由于上述GNU OSX错误)
  • 必不可少的:将GNU工具链用于ARM v。7.2.1 2017q4

这种情况很不幸,将在即将发布的2.0版本中使用基于docker的新构建环境进行纠正。

完全免责声明:我为Movesense团队工作