Closed marsavar closed 9 months ago
Ugh, I believe this is boring-sys spuriously wanting git to be installed (https://github.com/signalapp/libsignal/commit/90bbc3b15698119662ff5c01b603dcf6fdfeb6df). I think there's a feature flag we can use now to turn that off, but v0.36 doesn't have it. Can you add git to your Docker image and see if it helps?
Thanks @jrose-signal, that seems to have done the trick. boring-sys
now compiles fine, but I'm running into an issue where libsignal-protocol
fails to compile.
Looking at some previous commits, it looks like prost
was also recently bumped from v0.9 to v0.12, but as of v11, protoc
is no longer bundled in the library, so protobuf-compiler
also needs to be installed in the Dockerfile.
I'm using the amazoncorretto:21
image, but unfortunately its package manager has a fairly old version of protobuf-compiler
which doesn't support the experimental flag, so the build script fails with the following error:
#26 285.0 error: failed to run custom build command for `libsignal-protocol v0.1.0 (/usr/src/app/libsignal/libsignal-0.36.1/rust/protocol)`
#26 285.0
#26 285.0 Caused by:
#26 285.0 process didn't exit successfully: `/usr/src/app/libsignal/libsignal-0.36.1/target/release/build/libsignal-protocol-718afc7d65a4d7bd/build-script-build` (exit status: 101)
#26 285.0 --- stderr
#26 285.0 thread 'main' panicked at rust/protocol/build.rs:18:10:
#26 285.0 Protobufs in src are valid: Custom { kind: Other, error: "protoc failed: Unknown flag: --experimental_allow_proto3_optional\n" }
This seems solvable though, I believe I just need to get a more recent version of protobuf-compiler
from another repository or download a pre-compiled release (I'd like to avoid compiling from source if possible).
Thanks again for your help so far!
We probably should have called these updated build requirements out in the release notes. Let us know if you run into further issues after the protoc update!
I edited the Dockerfile to download a pre-built protoc
binary, and libsignal-protocol
compiled just fine. All is well that ends well!
I'm happy to submit a PR to update the readme file in this repo if that's ok with you :-)
I want to look into boring-sys a little more to see if I'm right about the purpose of that feature flag. I'll keep this issue open for that. Glad it's working now, though!
Okay, so the feature flag would avoid the git dependency, but because it's a feature flag, it's not necessarily appropriate to apply it if someone wants to test out any of the other features that require patches. A more polite build script would check if there are any patches to apply, and not try to use git otherwise, but in the mean time I think editing the readme would be fine. (Which I can take care of, since it's easier to get into a subsequent release that way.)
Readme updated in v0.38.0. Thanks for pointing this out!
Hi,
I'm building
libsignal
in a Docker container using thejava/build_jni.sh
script. This has worked before, up until v0.32.1. However, when trying to build v0.36.1, it fails with the error below, which appears to be related toboring-sys
:It loos like the build script can't find a required file. Any help would be greatly appreciated!