rustic-rs / rustic_server

A REST server built in rust for use with rustic/restic
https://rustic.cli.rs/ecosystem/rustic-server/
GNU Affero General Public License v3.0
18 stars 3 forks source link

[ppc64le] error: failed to run custom build command for `aws-lc-sys v0.22.0` #53

Open vt-alt opened 2 weeks ago

vt-alt commented 2 weeks ago

There is build failure on ppc64le:

[00:00:09] + cargo build -j43 --offline --release --all-features
...
[00:00:12]    Compiling aws-lc-rs v1.10.0
[00:00:12]      Running `rustc --crate-name build_script_build --edition=2021 /usr/src/RPM/BUILD/rustic_server-0.1.1/vendor/aws-lc-rs/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="aws-lc-sys"' --cfg 'feature="prebuilt-nasm"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("alloc", "asan", "aws-lc-sys", "bindgen", "default", "fips", "non-fips", "prebuilt-nasm", "ring-io", "ring-sig-verify", "test_logging", "unstable"))' -C metadata=4acc5ee5356aa95a -C extra-filename=-4acc5ee5356aa95a --out-dir /usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/build/aws-lc-rs-4acc5ee5356aa95a -L dependency=/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/deps --cap-lints allow -Copt-level=3 -Cdebuginfo=1`
...
[00:00:45]    Compiling aws-lc-sys v0.22.0
[00:00:45]      Running `rustc --crate-name build_script_main --edition=2021 /usr/src/RPM/BUILD/rustic_server-0.1.1/vendor/aws-lc-sys/builder/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="prebuilt-nasm"' --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("asan", "bindgen", "prebuilt-nasm", "ssl"))' -C metadata=209cf3300bcb56c2 -C extra-filename=-209cf3300bcb56c2 --out-dir /usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/build/aws-lc-sys-209cf3300bcb56c2 -L dependency=/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/deps --extern bindgen=/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/deps/libbindgen-cf03d97db1657e29.rlib --extern cc=/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/deps/libcc-d4dd258765058056.rlib --extern cmake=/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/deps/libcmake-2f64f4c31feb1fbe.rlib --extern dunce=/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/deps/libdunce-165f84a2eb80394b.rlib --extern fs_extra=/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/deps/libfs_extra-cc36a67f5321aee2.rlib --cap-lints allow -Copt-level=3 -Cdebuginfo=1`
...

[00:00:49]      Running `/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/build/aws-lc-sys-209cf3300bcb56c2/build-script-main`
[00:00:49] error: failed to run custom build command for `aws-lc-sys v0.22.0`
[00:00:49] 
[00:00:49] Caused by:
[00:00:49]   process didn't exit successfully: `/usr/src/RPM/BUILD/rustic_server-0.1.1/target/release/build/aws-lc-sys-209cf3300bcb56c2/build-script-main` (exit status: 101)
[00:00:49]   --- stdout
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_PREGENERATING_BINDINGS
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
[00:00:49]   cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
[00:00:49]   cargo:rerun-if-env-changed=CMAKE
[00:00:49] 
[00:00:49]   --- stderr
[00:00:49]   Missing dependency: cmake
[00:00:49]   thread 'main' panicked at /usr/src/RPM/BUILD/rustic_server-0.1.1/vendor/aws-lc-sys/builder/main.rs:320:40:
[00:00:49]   called `Result::unwrap()` on an `Err` value: "Required build dependency is missing. Halting build."
simonsan commented 2 weeks ago

Hey there, it says, you need to install CMake. Did you try if this helps?

vt-alt commented 2 weeks ago

Thanks. With cmake installed it still fails needing clang-devel, and after installing it it succeeds. (While we have gcc and cmake/clang-devel is not required on other architectures) What it tries to build? Maybe we can install just the required package instead of building? Or just disable this feature on ppc64le (as this is not extremely important architecture for us)?

vt-alt commented 2 weeks ago

I'm closing since this is solved and I am building with cmale/clang-delve. Thanks again.

simonsan commented 2 weeks ago

https://crates.io/crates/aws-lc-rs which gets pulled in by axum-server with the feature rustls.

It's building aws-lc-sys, which you could maybe circumvent, if you set AWS_LC_SYS_PREBUILT_NASM=1.

I'll keep this open, as we need to determine, if we want to pull in that dependency and feature. If people have rustic_server mostly behind a reverse proxy like nginx, I think we don't need that.

simonsan commented 1 week ago

This issue is known: