c++ - 与 Movesense 库 1.9.0.rc3 的链接错误

标签 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 同样的问题

这里是调用 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.

使用 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.9.0 起来自 CHANGES.md(和 README.md)

  • 要求:仅使用 Windows 构建环境(由于上述 GNU OSX 错误)
  • 必需使用 GNU Toolchain for ARM v. 7.2.1 2017q4

这种情况很不幸,将在即将发布的 2.0 版本中通过基于 docker 的新构建环境得到纠正。

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

关于c++ - 与 Movesense 库 1.9.0.rc3 的链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56235338/

相关文章:

java - Movesense 展示应用程序,我无法更改采样率

android - 动感 : Is it possible to connect to 3 or more sensors?

Movesense 低级 API

c# - BMS通过C/C++/C#读写

c++ - 最低优先级队列模板

c++ - 本系列的逻辑/算法

c++ - 将 remove_if 变成 remove_not_if

c++ - 如何创建一堆不同类型的变量?

movesense - 在 moveense 自定义固件中实现到 EEPROM 的日志记录

android-studio - 在Android Studio中构建Movesense示例时出错。无法解决::mdslib:1.28打开文件