xrpl-dev-portal
xrpl-dev-portal copied to clipboard
Ubuntu Impish build requires libprotoc-dev package
https://xrpl.org/build-run-rippled-ubuntu.html
The libprotoc-dev
package was required to get cmake ..
to complete.
Strange. The cmake build is supposed to pull in the necessary packages without you needing to do so, and we've had at least one other dev who encountered the same thing, but another who didn't. Still looking into this.
@donovanhide You must have either installed libprotobuf-dev
or maybe the rippled-dev
package that installed it for you? CMake's findpackage module for Protobuf only looks for protobuf libraries whether or not the compiler is available.
Either way, I've added a check that all required Protobuf components are available, otherwise proceed with local build of Protobuf and also included libprotobc-dev
and protobuf-compiler
for the install of rippled-dev
.
Locally building was the behavior before the required Protobuf version (>3.8)was available in the Ubuntu repository. 21.04 now provides 3.12.
I installed libprotoc-dev
manually using apt-get install
to prevent the following error being generated by cmake ..
:
...
CMake Error at Builds/CMake/CMakeFuncs.cmake:158 (file):
Error evaluating generator expression:
$<TARGET_PROPERTY:protobuf::libprotoc,IMPORTED_LOCATION_DEBUG>
Target "protobuf::libprotoc" not found.
Call Stack (most recent call first):
/usr/share/cmake-3.18/Modules/ExternalProject.cmake:2102 (_ep_write_log_script)
/usr/share/cmake-3.18/Modules/ExternalProject.cmake:2962:EVAL:2 (ExternalProject_Add_Step)
/usr/share/cmake-3.18/Modules/ExternalProject.cmake:2962 (cmake_language)
/usr/share/cmake-3.18/Modules/ExternalProject.cmake:3209 (_ep_add_configure_command)
Builds/CMake/deps/gRPC.cmake:200 (ExternalProject_Add)
CMakeLists.txt:66 (include)```