fusion-based-perception icon indicating copy to clipboard operation
fusion-based-perception copied to clipboard

easy_config 问题

Open Quitino opened this issue 2 years ago • 1 comments

- gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~18.04) 
- cmake version 3.15.3

catkin_make 时报错:

[ 28%] Generating _ezcfg_gen_code/_ezcfg_gen_file.cpp
/bin/sh: 1: path2project/build/fusion-based-perception/easy_config/_ezcfg_gen_code/_ezcfg_gen_file.cpp: not found
fusion-based-perception/easy_config/CMakeFiles/interpreter_extern.dir/build.make:61: recipe for target 'fusion-based-perception/easy_config/_ezcfg_gen_code/_ezcfg_gen_file.cpp' failed
make[2]: *** [fusion-based-perception/easy_config/_ezcfg_gen_code/_ezcfg_gen_file.cpp] Error 127
CMakeFiles/Makefile2:1184: recipe for target 'fusion-based-perception/easy_config/CMakeFiles/interpreter_extern.dir/all' failed
make[1]: *** [fusion-based-perception/easy_config/CMakeFiles/interpreter_extern.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 76%] Built target kit_perception_fusion
Makefile:140: recipe for target 'all' failed

我尝试了阅读cmake部分:

    add_custom_command(
      OUTPUT ${GEN_FILE}
      COMMAND compiler ${EZCFG_STRUCT_HEADER_FILE_RELATIVE} ${GEN_FILE}
      # COMMENT "Running compiler"
      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
      DEPENDS compiler
    )

未发现什么异常,当我手动建立 _ezcfg_gen_file.cpp空文件到指定位置后编译,链接报错:


CMakeFiles/sensor_fusion_node.dir/fusion_node.cpp.o: In function `std::enable_if<!std::is_arithmetic<proto_input::Header>::value, void>::type ezcfg::Interpreter::parse<proto_input::Header>(proto_input::Header&)':
path2project/src/fusion-based-perception/easy_config/include/interpreter.hpp:77: undefined reference to `std::enable_if<!std::is_arithmetic<proto_input::Header>::value, void>::type ezcfg::Interpreter::parserDispatcher<proto_input::Header>(proto_input::Header&)'
CMakeFiles/sensor_fusion_node.dir/fusion_node.cpp.o: In function `std::enable_if<!std::is_arithmetic<proto_input::Pose>::value, void>::type ezcfg::Interpreter::parse<proto_input::Pose>(proto_input::Pose&)':
path2project/src/fusion-based-perception/easy_config/include/interpreter.hpp:77: undefined reference to `std::enable_if<!std::is_arithmetic<proto_input::Pose>::value, void>::type ezcfg::Interpreter::parserDispatcher<proto_input::Pose>(proto_input::Pose&)'
CMakeFiles/sensor_fusion_node.dir/fusion_node.cpp.o: In function `std::enable_if<!std::is_arithmetic<proto_input::CameraObject>::value, void>::type ezcfg::Interpreter::parse<proto_input::CameraObject>(proto_input::CameraObject&)':
path2project/src/fusion-based-perception/easy_config/include/interpreter.hpp:77: undefined reference to `std::enable_if<!std::is_arithmetic<proto_input::CameraObject>::value, void>::type ezcfg::Interpreter::parserDispatcher<proto_input::CameraObject>(proto_input::CameraObject&)'
CMakeFiles/sensor_fusion_node.dir/fusion_node.cpp.o: In function `std::enable_if<!std::is_arithmetic<proto_input::LidarObject>::value, void>::type ezcfg::Interpreter::parse<proto_input::LidarObject>(proto_input::LidarObject&)':
path2project/src/fusion-based-perception/easy_config/include/interpreter.hpp:77: undefined reference to `std::enable_if<!std::is_arithmetic<proto_input::LidarObject>::value, void>::type ezcfg::Interpreter::parserDispatcher<proto_input::LidarObject>(proto_input::LidarObject&)'
collect2: error: ld returned 1 exit status
fusion-based-perception/CMakeFiles/sensor_fusion_node.dir/build.make:209: recipe for target 'path2project/devel/lib/kit_perception/sensor_fusion_node' failed
make[2]: *** [path2project/devel/lib/kit_perception/sensor_fusion_node] Error 1
CMakeFiles/Makefile2:1137: recipe for target 'fusion-based-perception/CMakeFiles/sensor_fusion_node.dir/all' failed
make[1]: *** [fusion-based-perception/CMakeFiles/sensor_fusion_node.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

想咨询一下这个问题是出在哪里啊我的编译环境:

- gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~18.04) 
- cmake version 3.15.3

是cmake 版本问题吗? 希望解答,谢谢了。

Quitino avatar May 11 '22 03:05 Quitino