kvdbd icon indicating copy to clipboard operation
kvdbd copied to clipboard

Fix caching docker build

Open jgarzik opened this issue 6 years ago • 2 comments

For some as-yet-not-investigated reason, the double-build technique that enables docker caching, currently commented-out in the Dockerfile, causes the docker build to fail thusly:

   Compiling actix-files v0.1.4
   Compiling kvdbd v0.3.1 (/usr/src/kvdbd)
error: couldn't read src/kvdb-pb.rs: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `kvdbd`.
warning: build failed, waiting for other jobs to finish...
error: couldn't read src/tester.rs: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `kvdbd`.
warning: build failed, waiting for other jobs to finish...
error: build failed
The command '/bin/sh -c cargo build --release' returned a non-zero code: 101

jgarzik avatar Oct 07 '19 15:10 jgarzik

I tried looking into this - for this part specifically, I believe you need to also mock src/testers.rs and src/kvdb-pb.rs with a main function since you have 3 bins in your Cargo.toml/

However after this I was running into an issue where protoc --version could not be executed (from the build.rs file) and was not able to make any progress on that.

jakeschurch avatar Nov 06 '19 18:11 jakeschurch

@jakeschurch Thanks for advancing the issue. I think you indeed found the bug (multi-bin related).

The protoc issue is unrelated; apparently it wants updating to 3.10.x or so.

jgarzik avatar Nov 21 '19 03:11 jgarzik