Reputation: 25
I'm facing the same issue as here:Generated with LTO version 6.0 instead of the expected 8.1
I tried to build the new 2.0 sensor firmware using the information from the getting started using docker. After starting:
ninja pkgs
the compiling fails with the note, that the library "libmovesense-coreD.a" was built with LTO version 6 but expected was version 8.1.
I also installed cmake 3.18.1 and the arm toolchain 2017_q4 manually on Ubuntu 19.10., but it stops at step 8/12, caused by a LTO-wrapper failure.
(... some lines below ...)
I simply copied the cmake command from the Movesense homepage and added the directory of the sample_app. Here's the code I started from movesense/myBuild/ in the docker-container:
cmake -G Ninja -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ -DCMAKE_TOOLCHAIN_FILE=../MovesenseCoreLib/toolchain/gcc-nrf52.cmake ../samples/plain_app/
To provide some information, this is the result of the cmake:
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-arm-none-eabi/bin/arm-none-eabi-gcc
CMake Warning at /movesense/MovesenseCoreLib/MovesenseFromStaticLib.cmake:19 (message):
Defaulting build type to 'Debug'
Call Stack (most recent call first):
CMakeLists.txt:13 (include)
-- PATH_TOOL_PYTHON will use python from shell PATH
nrfutil version >=4 detected. adding --no-backup option
-- Configuring done
-- Generating done
-- Build files have been written to: /movesense/myBuild
I did not care about the "ABI info - failed" warning, because the last row said, that the build files have been written. Maybe this was a little foolish.
And here, the complete output of the "ninja pkgs" command (I deleted the upper one):
[1/12] Generating generated/app-resources/resources.c.h, generated/app-resources/resources.h, generated/app-resources/resources.cpp, app-resources.wbo
WBRES run with parameters:
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/whiteboard/builtinTypes
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api/comm
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api/component
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api/meas
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api/mem
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api/misc
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api/system
--includeDir
/movesense/myBuild/../MovesenseCoreLib//resources/movesense-api/ui
--cheaderFile
/movesense/myBuild/generated/app-resources/resources.c.h
--headerFile
/movesense/myBuild/generated/app-resources/resources.h
--sourceFile
/movesense/myBuild/generated/app-resources/resources.cpp
--libFile
/movesense/myBuild/app-resources.wbo
--cppDepends
../wb-resources/resources.h
/movesense/samples/plain_app/app_root.yaml
[2/12] Generating app-metadata/metadata.cpp
WBRES run with parameters:
--metadataSourceFile
/movesense/myBuild/app-metadata/metadata.cpp
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/comm_1wire.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/comm_ble.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/comm_ble_gattsvc.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/component_ds24l65.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/component_eeprom.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/component_led.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/component_lsm6ds3.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/component_max3000x.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/component_nrf52.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/dev_system.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/device_system_debug.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/device_system_shutdown.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/device_systemevent.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/meas_acc.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/meas_ecg.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/meas_gyro.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/meas_hr.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/meas_imu.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/meas_magn.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/meas_temp.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/mem_datalogger.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/mem_logbook.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/misc_calibration.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/misc_gear.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/misc_manufacturing.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/movesense_info.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/movesense_time.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/movesense_types.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/system_debug.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/system_energy.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/system_memory.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/system_mode.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/system_settings.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/system_states.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/ui_ind.wbo
/movesense/myBuild/../MovesenseCoreLib//resources/GCCARM/Debug/wb-resources.wbo
/movesense/myBuild/app-resources.wbo
Metadata:
Strings: 622 (6929B)
Execution contexts: 2 (24B)
Security tags: 6 (12B)
Properties: 276 (1656B)
Property list entries: 451 (902B)
Sequential enum list entries: 107 (214B)
Non-sequential enum list entries: 29 (232B)
Data types: 374 (2244B)
Data type list entries: 76 (152B)
Parameters: 101 (606B)
Parameter list entries: 185 (370B)
Responses: 135 (540B)
Response list entries: 420 (840B)
Operations: 182 (2184B)
Operation lists: 137 (1644B)
Resource tree nodes: 200 (2800B)
Resource tree node list entries: 76 (152B)
[3/12] Generating SBEM serialization code
Skipped argument since not a valid yaml glob: /movesense/myBuild/../MovesenseCoreLib//generated/GCCARM/Debug
processing following yaml-files:
Processing total 21 .yaml-files
Found 44 resources and 63 datatype definitions.
Scanning 42 WB-resources
Creating SBEM-Groups
Generating C++ code. 20 groups, 46 items
skipping unsupported resource: /Net
[8/12] Linking CXX executable Movesense
FAILED: Movesense
: && /opt/gcc-arm-none-eabi/bin/arm-none-eabi-gcc -W -Wall -Werror -Wfatal-errors -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wunreachable-code -Wsign-compare -Wno-aggregate-return -Wno-unused-parameter -Wno-unused-function -Wno-cast-align -Wno-strict-aliasing -Wno-maybe-uninitialized -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fno-common -ffreestanding -fno-builtin -mapcs -gdwarf-3 -std=gnu++11 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-unwind-tables -fno-use-cxa-atexit -fno-threadsafe-statics -Wno-lto-type-mismatch -Wno-old-style-declaration -Wno-discarded-qualifiers -Wp,-w -Wno-write-strings -U__INT32_TYPE__ -D__INT32_TYPE__=int -U__UINT32_TYPE__ -D__UINT32_TYPE__="unsigned int" -flto -fno-fat-lto-objects -Os -g -DWB_UNITTEST_BUILD -Wl,--wrap -Wl,_malloc_r -Wl,--wrap -Wl,_calloc_r -Wl,--wrap -Wl,_free_r -Wl,--wrap -Wl,_realloc_r --specs=nano.specs --specs=nosys.specs -Wl,-Map -Wl,target.map -Wl,--gc-sections -Wl,-static -L/movesense/MovesenseCoreLib/app-build/compiler/../platform/nRF5x/linker/gcc -fuse-linker-plugin -flto -T/movesense/MovesenseCoreLib/app-build/compiler/../platform/nRF5x/linker/gcc/appflash.ld CMakeFiles/Movesense.dir/App.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 /movesense/MovesenseCoreLib/lib/GCCARM/libmovesense-coreD.a -lm -lstdc++ && :
lto1: fatal error: bytecode stream in file '/movesense/MovesenseCoreLib/lib/GCCARM/libmovesense-coreD.a' generated with LTO version 6.0 instead of the expected 8.1
compilation terminated.
lto-wrapper: fatal error: /opt/gcc-arm-none-eabi/bin/arm-none-eabi-gcc returned 1 exit status
compilation terminated.
/opt/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
I only tried to install and build cmake and the arm-toolchain on my pc manually, cause the docker-build failed.
Thanks for the help!
P.s. In the "tools-setup" part of the 2.0 firmware preview is a wrong link to your Bitbucket repository (second light-grey box).
Upvotes: 1
Views: 261
Reputation: 1299
Looks like you have MovesenseCoreLib that is built with GCC 6.0 (probably 1.9.4 i.e. current master) instead of the 2.0 pre-release. My guess is that you have not checked out the 2.0 branch.
Try running
git checkout release/2.0-preview
on the movesense-device-lib folder.
Upvotes: 0