Closed bxtbold closed 1 month ago
안녕하세요. 레인보우로보틱스 강한솔입니다.
여기에 있는 CMake 설치 과정을 수행해보시기 바랍니다
혹시 아래 과정을 수행하셨을지요.. 다시 에러를 읽어보니 CMakeUserPresets.json이 없는 것 같습니다. conan install 하면 저 파일이 생성이 되어야 합니다.
conan install . -s build_type=Release -b missing -of build
Hello, I encountered the following error while building the SDK.
I have installed CMake version 3.30.2 as per the solution in issue #2, but I am still getting the following error. Is there another solution available?
bash Copy code $ cmake --version cmake version 3.30.2 $ cmake --preset conan-release -D BUILD_EXAMPLES=ON CMake Error: Could not read presets from /home/user/rby1-sdk: No "version" field Environment: Ubuntu 22.04, AMD64
Hello, this is Hansol Kang from Rainbow Robotics.
Please try following the CMake installation process here.
By any chance, have you already performed the steps below? After reviewing the error, it seems that the CMakeUserPresets.json
file is missing. This file should be generated when running the following conan install command:
conan install . -s build_type=Release -b missing -of build
다음 명령까지 잘 실행이 되어서 이제는 이런 오류가 납니다. cmake --build --preset conan-release
protobuf 버전이 맞지 않은 것 같은데 확인부탁드립나.
cmake --build --preset conan-release
[ 0%] Built target qdldlobject
[ 4%] Built target DynamixelSDK
[ 14%] Built target OSQPLIB
[ 16%] Built target osqpstatic
[ 17%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/body_component_based_command.pb.cc.o
[ 17%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/basic_command.pb.cc.o
[ 18%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/component_based_command.pb.cc.o
[ 17%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/command_header.pb.cc.o
[ 18%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/arm_command.pb.cc.o
[ 19%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/control_manager.pb.cc.o
[ 19%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/body_command.pb.cc.o
[ 19%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gamepad.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gamepad_service.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/control_manager_service.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gripper_command.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/geometry.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/head_command.pb.cc.o
[ 21%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gripper_command_service.pb.cc.o
[ 21%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/header.pb.cc.o
[ 22%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/log.pb.cc.o
[ 22%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/log_service.pb.cc.o
[ 22%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/mobility_command.pb.cc.o
[ 24%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/parameter.pb.cc.o
[ 24%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/ping.pb.cc.o
[ 24%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/parameter_service.pb.cc.o
[ 25%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/ping_service.pb.cc.o
[ 25%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/power.pb.cc.o
[ 27%] Built target OsqpEigen
[ 27%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/power_service.pb.cc.o
In file included from /home/user/rby1-sdk/build/_protobuf/rb/api/component_based_command.pb.cc:4:
/home/user/rby1-sdk/build/_protobuf/rb/api/component_based_command.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
17 | #error This file was generated by an older version of protoc which is
| ^~~~~
In file included from /home/user/rby1-sdk/build/_protobuf/rb/api/body_command.pb.cc:4:
/home/user/rby1-sdk/build/_protobuf/rb/api/body_command.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
17 | #error This file was generated by an older version of protoc which is
| ^~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/component_based_command.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
18 | #error incompatible with your Protocol Buffer headers. Please
| ^~~~~
...
...
In file included from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/parse_context.h:50,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map_type_handler.h:37,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map.h:61,
from /usr/include/google/protobuf/generated_message_table_driven.h:34,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.h:26,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:4:
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate: ‘static uint8_t* google::protobuf::internal::WireFormatLite::InternalWriteMessage(int, const google::protobuf::MessageLite&, int, uint8_t*, google::protobuf::io::EpsCopyOutputStream*)’
631 | static uint8_t* InternalWriteMessage(int field_number,
| ^~~~~~~~~~~~~~~~~~~~
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate expects 5 arguments, 4 provided
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In member function ‘void rb::api::RealTimeControlCommand_Feedback::SharedCtor()’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10599:38: error: ‘InitSCC’ is not a member of ‘google::protobuf::internal’
10599 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10599:47: error: ‘scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’ was not declared in this scope; did you mean ‘InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’?
10599 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In static member function ‘static const rb::api::RealTimeControlCommand_Feedback& rb::api::RealTimeControlCommand_Feedback::default_instance()’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10624:38: error: ‘InitSCC’ is not a member of ‘google::protobuf::internal’
10624 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10624:49: error: ‘::scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’ has not been declared; did you mean ‘InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’?
10624 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In member function ‘virtual google::protobuf::uint8* rb::api::RealTimeControlCommand_Feedback::_InternalSerialize(google::protobuf::uint8*, google::protobuf::io::EpsCopyOutputStream*) const’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10689:27: error: no matching function for call to ‘google::protobuf::internal::WireFormatLite::InternalWriteMessage(int, const rb::api::CommandHeader_Feedback&, google::protobuf::uint8*&, google::protobuf::io::EpsCopyOutputStream*&)’
10688 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10689 | InternalWriteMessage(
| ~~~~~~~~~~~~~~~~~~~~^
10690 | 1, _Internal::command_header_feedback(this), target, stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/parse_context.h:50,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map_type_handler.h:37,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map.h:61,
from /usr/include/google/protobuf/generated_message_table_driven.h:34,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.h:26,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:4:
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate: ‘static uint8_t* google::protobuf::internal::WireFormatLite::InternalWriteMessage(int, const google::protobuf::MessageLite&, int, uint8_t*, google::protobuf::io::EpsCopyOutputStream*)’
631 | static uint8_t* InternalWriteMessage(int field_number,
| ^~~~~~~~~~~~~~~~~~~~
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate expects 5 arguments, 4 provided
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In static member function ‘static const rb::api::RealTimeControlCommand& rb::api::RealTimeControlCommand::default_instance()’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10824:38: error: ‘InitSCC’ is not a member of ‘google::protobuf::internal’
10824 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10824:49: error: ‘::scc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto’ has not been declared; did you mean ‘InitDefaultsscc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto’?
10824 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| InitDefaultsscc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto
gmake[2]: *** [CMakeFiles/proto-objects.dir/build.make:602: CMakeFiles/proto-objects.dir/_protobuf/rb/api/basic_command.pb.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:370: CMakeFiles/proto-objects.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
혹시 기존에 설치되었던 혹은 설치했던 protoc이 존재하나요? 지우고 진행해주셔야합니다. conan에서 protoc 패키지를 관리하므로 별도로 설치해줄 필요가 없습니다.
#apt로 설치한 경우
sudo apt-get remove --purge protobuf-compiler
#snap으로 설치한 경우
sudo snap remove protoc
#아래 명령어를 수행했을 때 버전이 아무것도 뜨지 않아야함.
protoc --version
기존의 build 폴더 삭제 아래 명령어 다시 수행
conan install . -s build_type=Release -b missing -of build
cmake --preset conan-release -D BUILD_EXAMPLES=ON
cmake --build --preset conan-release
I ran the following commands successfully, but now I'm encountering an error when running:
cmake --build --preset conan-release
It seems like there is a mismatch with the protobuf version. Can you please check?
Commands I ran:
conan install . -s build_type=Release -b missing -of build
cmake --preset conan-release -D BUILD_EXAMPLES=ON
cmake --build --preset conan-release
0%] Built target qdldlobject
[ 4%] Built target DynamixelSDK
[ 14%] Built target OSQPLIB
[ 16%] Built target osqpstatic
[ 17%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/body_component_based_command.pb.cc.o
[ 17%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/basic_command.pb.cc.o
[ 18%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/component_based_command.pb.cc.o
[ 17%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/command_header.pb.cc.o
[ 18%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/arm_command.pb.cc.o
[ 19%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/control_manager.pb.cc.o
[ 19%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/body_command.pb.cc.o
[ 19%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gamepad.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gamepad_service.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/control_manager_service.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gripper_command.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/geometry.pb.cc.o
[ 20%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/head_command.pb.cc.o
[ 21%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/gripper_command_service.pb.cc.o
[ 21%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/header.pb.cc.o
[ 22%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/log.pb.cc.o
[ 22%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/log_service.pb.cc.o
[ 22%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/mobility_command.pb.cc.o
[ 24%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/parameter.pb.cc.o
[ 24%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/ping.pb.cc.o
[ 24%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/parameter_service.pb.cc.o
[ 25%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/ping_service.pb.cc.o
[ 25%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/power.pb.cc.o
[ 27%] Built target OsqpEigen
[ 27%] Building CXX object CMakeFiles/proto-objects.dir/_protobuf/rb/api/power_service.pb.cc.o
In file included from /home/user/rby1-sdk/build/_protobuf/rb/api/component_based_command.pb.cc:4:
/home/user/rby1-sdk/build/_protobuf/rb/api/component_based_command.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
17 | #error This file was generated by an older version of protoc which is
| ^~~~~
In file included from /home/user/rby1-sdk/build/_protobuf/rb/api/body_command.pb.cc:4:
/home/user/rby1-sdk/build/_protobuf/rb/api/body_command.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
17 | #error This file was generated by an older version of protoc which is
| ^~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/component_based_command.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
18 | #error incompatible with your Protocol Buffer headers. Please
| ^~~~~
...
...
In file included from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/parse_context.h:50,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map_type_handler.h:37,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map.h:61,
from /usr/include/google/protobuf/generated_message_table_driven.h:34,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.h:26,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:4:
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate: ‘static uint8_t* google::protobuf::internal::WireFormatLite::InternalWriteMessage(int, const google::protobuf::MessageLite&, int, uint8_t*, google::protobuf::io::EpsCopyOutputStream*)’
631 | static uint8_t* InternalWriteMessage(int field_number,
| ^~~~~~~~~~~~~~~~~~~~
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate expects 5 arguments, 4 provided
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In member function ‘void rb::api::RealTimeControlCommand_Feedback::SharedCtor()’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10599:38: error: ‘InitSCC’ is not a member of ‘google::protobuf::internal’
10599 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10599:47: error: ‘scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’ was not declared in this scope; did you mean ‘InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’?
10599 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In static member function ‘static const rb::api::RealTimeControlCommand_Feedback& rb::api::RealTimeControlCommand_Feedback::default_instance()’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10624:38: error: ‘InitSCC’ is not a member of ‘google::protobuf::internal’
10624 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10624:49: error: ‘::scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’ has not been declared; did you mean ‘InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto’?
10624 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| InitDefaultsscc_info_RealTimeControlCommand_Feedback_rb_2fapi_2fbasic_5fcommand_2eproto
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In member function ‘virtual google::protobuf::uint8* rb::api::RealTimeControlCommand_Feedback::_InternalSerialize(google::protobuf::uint8*, google::protobuf::io::EpsCopyOutputStream*) const’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10689:27: error: no matching function for call to ‘google::protobuf::internal::WireFormatLite::InternalWriteMessage(int, const rb::api::CommandHeader_Feedback&, google::protobuf::uint8*&, google::protobuf::io::EpsCopyOutputStream*&)’
10688 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10689 | InternalWriteMessage(
| ~~~~~~~~~~~~~~~~~~~~^
10690 | 1, _Internal::command_header_feedback(this), target, stream);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/parse_context.h:50,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map_type_handler.h:37,
from /home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/map.h:61,
from /usr/include/google/protobuf/generated_message_table_driven.h:34,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.h:26,
from /home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:4:
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate: ‘static uint8_t* google::protobuf::internal::WireFormatLite::InternalWriteMessage(int, const google::protobuf::MessageLite&, int, uint8_t*, google::protobuf::io::EpsCopyOutputStream*)’
631 | static uint8_t* InternalWriteMessage(int field_number,
| ^~~~~~~~~~~~~~~~~~~~
/home/user/.conan2/p/proto5794f10f7a310/p/include/google/protobuf/wire_format_lite.h:631:19: note: candidate expects 5 arguments, 4 provided
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc: In static member function ‘static const rb::api::RealTimeControlCommand& rb::api::RealTimeControlCommand::default_instance()’:
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10824:38: error: ‘InitSCC’ is not a member of ‘google::protobuf::internal’
10824 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~
/home/user/rby1-sdk/build/_protobuf/rb/api/basic_command.pb.cc:10824:49: error: ‘::scc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto’ has not been declared; did you mean ‘InitDefaultsscc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto’?
10824 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto.base);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| InitDefaultsscc_info_RealTimeControlCommand_rb_2fapi_2fbasic_5fcommand_2eproto
gmake[2]: *** [CMakeFiles/proto-objects.dir/build.make:602: CMakeFiles/proto-objects.dir/_protobuf/rb/api/basic_command.pb.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:370: CMakeFiles/proto-objects.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
Is it possible that there is an existing installation of protoc
on your system? You need to remove it because conan
manages the protoc
package, so there's no need for a separate installation.
Run the following commands depending on how protoc
was installed:
# If installed via apt
sudo apt-get remove --purge protobuf-compiler
# If installed via snap
sudo snap remove protoc
# After running this, `protoc --version` should not return any version.
protoc --version
Then, delete the existing build
folder and re-run the following commands:
conan install . -s build_type=Release -b missing -of build
cmake --preset conan-release -D BUILD_EXAMPLES=ON
cmake --build --preset conan-release
I ended up creating a docker container with a clean environment, and it is working. Thank you :)
안녕하세요, sdk 빌드하는 중에 이와 같은 오류가 났습니다.
cmake 버전은 이슈 #2 에 나와있는 해결방법 처럼 3.30.2로 설치되었는데 다음과 같은 오류가 납니다. 다른 해결 방법이 혹시 있을까요?
환경: Ubuntu 22.04, AMD64