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

Failed to build on OpenBSD 6.8 #2892

Closed
siegfried opened this issue Jan 7, 2021 · 4 comments
Closed

Failed to build on OpenBSD 6.8 #2892

siegfried opened this issue Jan 7, 2021 · 4 comments
Labels
A-build Area: Build system bug Something isn't working Priority - Low

Comments

@siegfried
Copy link

$ cargo install --locked --path jormungandr would fail on OpenBSD 6.8 with a error like this. What is the PROTOC environment variable? Can I help to fix it?

error: failed to run custom build command for `prost-build v0.6.1`

Caused by:
  process didn't exit successfully: `/mnt/warehouse/repos/jormungandr/target/release/build/prost-build-856d11bb663bac05/build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at 'Failed to find the protoc binary. The PROTOC environment variable is not set, there is no bundled protoc for this platform, and protoc is not in the PATH', /home/git/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/prost-build-0.6.1/build.rs:97:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `jormungandr v0.9.3 (/mnt/warehouse/repos/jormungandr/jormungandr)`, intermediate artifacts can be found at `/mnt/warehouse/repos/jormungandr/target`
$ rustc --version
rustc 1.46.0
@siegfried
Copy link
Author

So I installed protoc and rebuild it. Now it is another error.

warning: use of deprecated item 'poldercast::Id': ID is no longer used
  --> jormungandr-lib/src/interfaces/config/node.rs:91:27
   |
91 |     pub public_id: Option<poldercast::Id>,
   |                           ^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: use of deprecated item 'poldercast::Id': ID is no longer used
   --> jormungandr-lib/src/interfaces/config/node.rs:173:20
    |
173 |     pub id: Option<poldercast::Id>,
    |                    ^^^^^^^^^^^^^^

warning: use of deprecated item 'poldercast::Id': ID is no longer used
  --> jormungandr-lib/src/interfaces/config/node.rs:91:27
   |
91 |     pub public_id: Option<poldercast::Id>,
   |                           ^^^^^^^^^^^^^^

error: failed to run custom build command for `chain-network v0.1.0 (/mnt/warehouse/repos/jormungandr/chain-deps/chain-network)`

Caused by:
  process didn't exit successfully: `/mnt/warehouse/repos/jormungandr/target/release/build/chain-network-3f1a1eaa9e433d2c/build-script-build` (exit code: 1)
  --- stderr
  error running rustfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }
warning: build failed, waiting for other jobs to finish...
warning: 3 warnings emitted

error: failed to compile `jormungandr v0.9.3 (/mnt/warehouse/repos/jormungandr/jormungandr)`, intermediate artifacts can be found at `/mnt/warehouse/repos/jormungandr/target`

Caused by:
  build failed

@mzabaluev
Copy link
Contributor

There was a number of issues with running protoc that were resolved in the latest release of prost: https://github.com/danburkert/prost/issues/202#issuecomment-752184563
That should improve the diagnostics for the failure to run the executable when it's present.

We should roll a prost update into the general tokio 1.0 stack update #2621 which is also waiting on tonic and some other dependencies to come around.

@mzabaluev mzabaluev added bug Something isn't working A-build Area: Build system Priority - Low labels Jan 7, 2021
@siegfried
Copy link
Author

Thanks. I think prost-build error was gone after I installed protobuf-c on OpenBSD. Now the error is on chain-network v0.1.0. @mzabaluev

@mzabaluev
Copy link
Contributor

error running rustfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }

You need to install the rustfmt component of the Rust toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Area: Build system bug Something isn't working Priority - Low
Projects
None yet
Development

No branches or pull requests

2 participants