I run the following commands to cross compile the hailort library:
cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build --config release --target libhailort
toolchain.cmake:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER <path_to_crosscompiler>/arm-poky-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER <path_to_crosscompiler>/arm-poky-linux-gnueabi-g++)
set(CMAKE_SYSROOT <path_to_sysroot>/4.1.15-2.0.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
SET(GCC_COVERAGE_COMPILE_FLAGS "-march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9")
add_definitions(${GCC_COVERAGE_COMPILE_FLAGS})
I get the following error:
In file included from hailort/hailort/common/utils.hpp:20:0,
from hailort/hailort/common/utils.cpp:10:
hailort/hailort/common/logger_macros.hpp:46:25: error: specialization of 'template<class T, class Char, class Enable> struct fmt::v10::format ter' in different namespace [-fpermissive]
template <> struct fmt::formatter<hailo_status> : fmt::ostream_formatter {};
^
In file included from hailort/hailort/external/spdlog-src/include/spdlog/fmt/fmt.h:24:0,
from hailort/hailort/external/spdlog-src/include/spdlog/common.h:50,
from hailort/hailort/external/spdlog-src/include/spdlog/spdlog.h:12,
from hailort/hailort/common/logger_macros.hpp:31,
from hailort/hailort/common/utils.hpp:20,
from hailort/hailort/common/utils.cpp:10:
hailort/hailort/external/spdlog-src/include/spdlog/fmt/bundled/core.h:1087:8: error: from definition of 'template<class T, class Char, clas s Enable> struct fmt::v10::formatter' [-fpermissive]
struct formatter {
^
What could cause the error?