rust-libp2p
rust-libp2p copied to clipboard
Missing cmake
Summary
For some packages like prost-build v0.10.3 requires cmake, and build failed.
error: failed to run custom build command for `prost-build v0.10.3`
Caused by:
process didn't exit successfully: `./rust-libp2p/target/debug/build/prost-build-6fe0b99530fe295b/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=./.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.3/third-party/protobuf/cmake
CMAKE_TOOLCHAIN_FILE_x86_64-apple-darwin = None
CMAKE_TOOLCHAIN_FILE_x86_64_apple_darwin = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_x86_64-apple-darwin = None
CMAKE_GENERATOR_x86_64_apple_darwin = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_x86_64-apple-darwin = None
CMAKE_PREFIX_PATH_x86_64_apple_darwin = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-apple-darwin = None
CMAKE_x86_64_apple_darwin = None
HOST_CMAKE = None
CMAKE = None
running: "cmake" "./.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.10.3/third-party/protobuf/cmake" "-DCMAKE_INSTALL_PREFIX=../rust-libp2p/target/debug/build/prost-build-1521adc0b256a667/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"
--- stderr
thread 'main' panicked at '
failed to execute command: No such file or directory (os error 2)
is `cmake` not installed?
build script failed, must exit now', .cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Expected behaviour
Actual behaviour
Debug Output
<output>
Possible Solution
Version
- libp2p version (version number, commit, or branch): commit f04f6bb4fcf83a056b399dada4d57f844b29cd9a
Would you like to work on fixing this bug?
Yes / No / Maybe.
@fishseabowl you are correct, though I am not sure how to act on your report.
- Are you suggesting to move away from
prost
? - Do you want this to be called out more prominently?
- Would you like to see changes on the upstream crate? See https://github.com/tokio-rs/prost/pull/620 and https://github.com/tokio-rs/prost/issues/646
- ...
@mxinden I have a stupid question: is there a way to use libp2p
without protoc/protobuf? As far as I can see, there is no such optional feature, but maybe I'm missing something.
@stanislav-tkach that is correct, there is no way to use rust-libp2p without protoc/protobuf as of today.
PeerId
are at the core of libp2p. PeerId
s are encoded via Protobuf. Thus we will never be able to do without Protobuf.
We might be able to use another Protobuf compiler other than protoc, e.g. https://github.com/stepancheg/rust-protobuf.
@mxinden Thanks for the explanations!
I have been running into challenges with protoc installs as well, given that the protobufs rust-libp2p usually uses are quite simple, we should figure out if one of the alternative compilers is feature complete to support what is needed.
I have been running into challenges with protoc installs as well, given that the protobufs rust-libp2p usually uses are quite simple, we should figure out if one of the alternative compilers is feature complete to support what is needed.
That would be great actually! Less build-time dependencies are always welcome.
@stanislav-tkach that is correct, there is no way to use rust-libp2p without protoc/protobuf as of today.
PeerId
are at the core of libp2p.PeerId
s are encoded via Protobuf. Thus we will never be able to do without Protobuf.
Which is a shame unfortunately. Protobuf's schema language / type system really leaves you longing occasionally (no generics & no proper lists f.e.).
Fixed in https://github.com/libp2p/rust-libp2p/issues/3024.