Open-Source-Digital-Twin / furuta-pendulum-controller

MIT License
2 stars 1 forks source link

spdlog linking problem #24

Closed LLagu closed 11 months ago

LLagu commented 11 months ago

When restoring the configuration files, abseil and spdlog changes I ran into a linking problem with spdlog:

What I tried so far was to delete the build folder, delete CMake cache and reload, rebuilt the container but I still get the following:

[main] Building folder: inverted-pendulum-controller [build] Starting build [proc] Executing command: /usr/local/bin/cmake --build /workspaces/inverted-pendulum-controller/build --config Debug --target all -- [build] [1/2 50% :: 4.253] Building CXX object src/CMakeFiles/Controller.dir/main.cpp.o [build] [2/2 100% :: 4.415] Linking CXX executable src/Controller [build] FAILED: src/Controller [build] : && /usr/local/bin/clang++ -g src/CMakeFiles/Controller.dir/main.cpp.o -o src/Controller src/config/libConfigLib.a src/controller/libControllerLib.a src/hal/libHalLib.a && : [build] /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x23 [build] src/CMakeFiles/Controller.dir/main.cpp.o: in function `spdlog::logger::sink_it_(spdlog::details::log_msg const&)': [build] main.cpp:(.text._ZN6spdlog6logger8sink_it_ERKNS_7details7log_msgE[_ZN6spdlog6logger8sink_it_ERKNS_7details7log_msgE]+0x2b8): undefined reference to `fmt::v10::vformat[abi:cxx11](fmt::v10::basic_string_view<char>, fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char> >)' [build] /usr/bin/ld: src/CMakeFiles/Controller.dir/main.cpp.o: in function `std::make_unsigned<long>::type fmt::v10::detail::to_unsigned<long>(long)': [build] main.cpp:(.text._ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_[_ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_]+0x30): undefined reference to `fmt::v10::detail::assert_fail(char const*, int, char const*)' [build] /usr/bin/ld: src/CMakeFiles/Controller.dir/main.cpp.o: in function `fmt::v10::detail::format_decimal_result<char*> fmt::v10::detail::format_decimal<char, unsigned int>(char*, unsigned int, int)': [build] main.cpp:(.text._ZN3fmt3v106detail14format_decimalIcjEENS1_21format_decimal_resultIPT_EES5_T0_i[_ZN3fmt3v106detail14format_decimalIcjEENS1_21format_decimal_resultIPT_EES5_T0_i]+0x46): undefined reference to `fmt::v10::detail::assert_fail(char const*, int, char const*)' [build] /usr/bin/ld: src/CMakeFiles/Controller.dir/main.cpp.o: in function `std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> > > fmt::v10::vformat_to<std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> > >, 0>(std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> > >, fmt::v10::basic_string_view<char>, fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char> >)': [build] main.cpp:(.text._ZN3fmt3v1010vformat_toISt20back_insert_iteratorINS0_19basic_memory_bufferIcLm250ESaIcEEEELi0EEET_S7_NS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE[_ZN3fmt3v1010vformat_toISt20back_insert_iteratorINS0_19basic_memory_bufferIcLm250ESaIcEEEELi0EEET_S7_NS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE]+0x80): undefined reference to `void fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char>&, fmt::v10::basic_string_view<char>, fmt::v10::detail::vformat_args<char>::type, fmt::v10::detail::locale_ref)' [build] /usr/bin/ld: src/CMakeFiles/Controller.dir/main.cpp.o: in function `fmt::v10::detail::format_decimal_result<char*> fmt::v10::detail::format_decimal<char, unsigned long>(char*, unsigned long, int)': [build] main.cpp:(.text._ZN3fmt3v106detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i[_ZN3fmt3v106detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i]+0x48): undefined reference to `fmt::v10::detail::assert_fail(char const*, int, char const*)' [build] clang: error: linker command failed with exit code 1 (use -v to see invocation) [build] ninja: build stopped: subcommand failed. [proc] The command: /usr/local/bin/cmake --build /workspaces/inverted-pendulum-controller/build --config Debug --target all -- exited with code: 1 [driver] Build completed: 00:00:04.439 [build] Build finished with exit code 1

@caiopiccirillo could you please take a look at it when you have the time?