Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cmake #2645

Closed
fishseabowl opened this issue May 11, 2022 · 7 comments
Closed

Missing cmake #2645

fishseabowl opened this issue May 11, 2022 · 7 comments

Comments

@fishseabowl
Copy link

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.aaakk.us.kg-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.aaakk.us.kg-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.aaakk.us.kg-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 f04f6bb

Would you like to work on fixing this bug?

Yes / No / Maybe.

@mxinden
Copy link
Member

mxinden commented May 16, 2022

@fishseabowl you are correct, though I am not sure how to act on your report.

@stanislav-tkach
Copy link

@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.

@mxinden
Copy link
Member

mxinden commented Sep 11, 2022

@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. PeerIds 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.

@stanislav-tkach
Copy link

@mxinden Thanks for the explanations!

@dignifiedquire
Copy link
Member

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.

@thomaseizinger
Copy link
Contributor

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. PeerIds 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.).

@thomaseizinger
Copy link
Contributor

Fixed in #3024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants