Error: failed to run custom build command for `exonum-proto v1.0.0`

I am using exonum-crypto and trying to build an image for use on docker. I've included both the full error and the docker script. It seems that for some reason the binary build of exonum-protoc cannot be found.

FROM rust:1.68 as builder
WORKDIR /usr/src/syntaxmakersserver
COPY . .
RUN CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true RUST_BACKTRACE=1 cargo install --debug --path .
#0 120.2 Caused by:
#0 120.2   process didn't exit successfully: `/usr/src/syntaxmakersserver/target/debug/build/exonum-proto-cd844768880b8371/build-script-build` (exit status: 101)
#0 120.2   --- stdout
#0 120.2   cargo:protos=/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/exonum-proto-1.0.0/src/proto
#0 120.2 
#0 120.2   --- stderr
#0 120.2   thread 'main' panicked at 'protoc binary not found: cannot find binary path', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/protoc-2.28.0/src/lib.rs:209:17
#0 120.2   stack backtrace:
#0 120.2      0: rust_begin_unwind
#0 120.2                at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/std/src/panicking.rs:575:5
#0 120.2      1: core::panicking::panic_fmt
#0 120.2                at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/panicking.rs:64:14
#0 120.2      2: protoc::Protoc::from_env_path
#0 120.2                at /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/protoc-2.28.0/src/lib.rs:209:17
#0 120.2      3: protoc_rust::Codegen::run
#0 120.2                at /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/protoc-rust-2.28.0/src/lib.rs:173:21
#0 120.2      4: exonum_build::protobuf_generate
#0 120.2                at /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/exonum-build-1.0.1/src/lib.rs:410:5
#0 120.2      5: exonum_build::ProtobufGenerator::generate
#0 120.2                at /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/exonum-build-1.0.1/src/lib.rs:377:9
#0 120.2      6: build_script_build::main
#0 120.2                at ./build.rs:23:5
#0 120.2      7: core::ops::function::FnOnce::call_once
#0 120.2                at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/ops/function.rs:250:5
#0 120.2   note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
#0 120.2 warning: build failed, waiting for other jobs to finish...
#0 127.3 error: failed to compile `syntaxmakers-server v0.1.0 (/usr/src/syntaxmakersserver)`, intermediate artifacts can be found at `/usr/src/syntaxmakersserver/target`

Please format your code blocks as mentioned here.

From your error message, it seems that you need to install protoc.

Ok I installed protoc on my docker image, but now getting this for libsodium.

#0 243.0   make[4]: Leaving directory '/usr/src/syntaxmakersserver/target/debug/build/exonum_libsodium-sys-0f0c3a9b3a75c0c1/out/source/libsodium-1.0.17/test/default'
#0 243.0   make[3]: Leaving directory '/usr/src/syntaxmakersserver/target/debug/build/exonum_libsodium-sys-0f0c3a9b3a75c0c1/out/source/libsodium-1.0.17/test/default'
#0 243.0   make[2]: Leaving directory '/usr/src/syntaxmakersserver/target/debug/build/exonum_libsodium-sys-0f0c3a9b3a75c0c1/out/source/libsodium-1.0.17/test/default'
#0 243.0   make[1]: Leaving directory '/usr/src/syntaxmakersserver/target/debug/build/exonum_libsodium-sys-0f0c3a9b3a75c0c1/out/source/libsodium-1.0.17/test'
#0 243.0 
#0 243.0   libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   libtool: warning: '-version-info/-version-number' is ignored for convenience libraries
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   ar: `u' modifier ignored since `D' is the default (see `U')
#0 243.0   ../../build-aux/test-driver: line 107: 55096 Killed                  "$@" > $log_file 2>&1
#0 243.0   make[4]: *** [Makefile:1893: test-suite.log] Error 1
#0 243.0   make[3]: *** [Makefile:2001: check-TESTS] Error 2
#0 243.0   make[2]: *** [Makefile:2593: check-am] Error 2
#0 243.0   make[1]: *** [Makefile:401: check-recursive] Error 1
#0 243.0   make: *** [Makefile:514: check-recursive] Error 1
#0 243.0 
#0 243.0   ', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/exonum_libsodium-sys-0.0.23/build.rs:264:13
#0 243.0   stack backtrace:
#0 243.0      0: rust_begin_unwind
#0 243.0                at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/std/src/panicking.rs:575:5
#0 243.0      1: core::panicking::panic_fmt
#0 243.0                at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/panicking.rs:64:14
#0 243.0      2: build_script_build::main
#0 243.0                at ./build.rs:264:13
#0 243.0      3: core::ops::function::FnOnce::call_once
#0 243.0                at /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/ops/function.rs:250:5

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.