You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building librespot as part of a buildroot configuration for a Raspberry Pi Zero W and using the current dev commit 1ac238e fails due to the "custom build command for aws-lc-sys v0.21.2".
Error output
The following warnings were emitted during compilation:
warning: CMAKE environment variable set: cmake
warning: Generating bindings - external bindgen. Platform: arm-unknown-linux-gnueabihf
error: failed to run custom build command for `aws-lc-sys v0.21.2`
Caused by:
process didn't exit successfully: `/dacspot/buildroot-2024.02.5/output/build/librespot-dev/target/release/build/aws-lc-sys-a46c324d9798eef6/build-script-main` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=AWS_LC_SYS_NO_PREFIX
cargo:rerun-if-env-changed=AWS_LC_SYS_INTERNAL_BINDGEN
cargo:rerun-if-env-changed=AWS_LC_SYS_EXTERNAL_BINDGEN
cargo:rerun-if-env-changed=AWS_LC_SYS_NO_ASM
cargo:rerun-if-env-changed=AWS_LC_SYS_CFLAGS
cargo:rerun-if-env-changed=AWS_LC_SYS_PREBUILT_NASM
cargo:rerun-if-env-changed=AWS_LC_SYS_C_STD
cargo:rerun-if-env-changed=AWS_LC_SYS_CMAKE_BUILDER
cargo:rerun-if-env-changed=AWS_LC_SYS_STATIC
cargo:rerun-if-env-changed=CMAKE
cargo:rerun-if-env-changed=CMAKE
cargo:warning=CMAKE environment variable set: cmake
cargo:warning=Generating bindings - external bindgen. Platform: arm-unknown-linux-gnueabihf
cargo:rerun-if-env-changed=AWS_LC_SYS_INCLUDES
--- stderr
bindgen-cli was used. Detected version was: 0.60.1
If this is not the latest version, consider upgrading : `cargo install --force --locked bindgen-cli`
See our User Guide for more information about bindgen:https://aws.github.io/aws-lc-rs/index.html
Failure invoking external bindgen!
bindgen-PARAMS: --prefix-link-name aws_lc_0_21_2_ --allowlist-file .*(/|\\)openssl((/|\\)[^/\\]+)+\.h --allowlist-file .*(/|\\)rust_wrapper\.h --rustified-enum point_conversion_form_t --default-macro-constant-type signed --with-derive-default --with-derive-partialeq --with-derive-eq --raw-line
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR ISC
--generate functions,types,vars,methods,constructors,destructors /dacspot/buildroot-2024.02.5/output/build/librespot-dev/VENDOR/aws-lc-sys/include/rust_wrapper.h --rust-target 1.59 --output /dacspot/buildroot-2024.02.5/output/build/librespot-dev/target/arm-unknown-linux-gnueabihf/release/build/aws-lc-sys-da45e5a6cee12077/out/bindings.rs --formatter rustfmt -- -I /dacspot/buildroot-2024.02.5/output/build/librespot-dev/VENDOR/aws-lc-sys/include -I /dacspot/buildroot-2024.02.5/output/build/librespot-dev/VENDOR/aws-lc-sys/aws-lc/include
bindgen-STDOUT:
bindgen-STDERR: error: Found argument '--prefix-link-name' which wasn't expected, or isn't valid in this context
If you tried to supply `--prefix-link-name` as a value rather than a flag, use `-- --prefix-link-name`
USAGE:
bindgen [FLAGS] [OPTIONS] <header> -- <clang-args>...
For more information try --help
thread 'main' panicked at /dacspot/buildroot-2024.02.5/output/build/librespot-dev/VENDOR/aws-lc-sys/builder/main.rs:559:5:
aws-lc-sys build failed. Please enable the 'bindgen' feature on aws-lc-rs or aws-lc-sys.For more information, see the aws-lc-rs User Guide: https://aws.github.io/aws-lc-rs/index.html
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Using a commit before3e85d77 ("Update hyper-rustls to 0.27.2") or installing bindgen on the host system with cargo install --force --locked bindgen-cli, as suggested by the error message, succeeds.
The message links to https://aws.github.io/aws-lc-rs/platform_support.html and asks to enable the bindgen feature on the crate, though I don't know my way around Rust well enough to figure out how to do that for a dependency of another package.
Possibly related but I'm not sure because the errors are different: #1326, #1346
I also found #1318 but I'm not sure how to integrate that in the buildroot configuration cleanly. Is there a way around this that avoids these additional dependencies on the host?
Aha! The bindgen-cli is already packaged for buildroot, so (I thought) I just need to add it as a dependency in my package/librespot/librespot.mk:
LIBRESPOT_DEPENDENCIES = host-rust-bindgen
Unfortunately, the packaged version 0.65.1 is still too old and I needed to patch rust-bindgen.{mk,hash} manually. But with RUST_BINDGEN_VERSION = 0.70.1 and an appropriate hash I can now compile librespot all within the buildroot framework.
Since my particular problem is now solved, I'll close this issue. I'll leave it up to you if you want to reopen for other cross-compilation use(r)s. ☺️
Description
I am building librespot as part of a buildroot configuration for a Raspberry Pi Zero W and using the current
dev
commit 1ac238e fails due to the "custom build command foraws-lc-sys v0.21.2
".Error output
Using a commit before 3e85d77 ("Update hyper-rustls to 0.27.2") or installing bindgen on the host system with
cargo install --force --locked bindgen-cli
, as suggested by the error message, succeeds.The message links to https://aws.github.io/aws-lc-rs/platform_support.html and asks to enable the
bindgen
feature on the crate, though I don't know my way around Rust well enough to figure out how to do that for a dependency of another package.Possibly related but I'm not sure because the errors are different: #1326, #1346
I also found #1318 but I'm not sure how to integrate that in the buildroot configuration cleanly. Is there a way around this that avoids these additional dependencies on the host?
Version
Current
dev
branch, since commit 3e85d77.How to reproduce
I'm sure there is a simpler reproducer but this is the exact environment I'm currently building in (without needing to build all of buildroot first):
systemd
/ commit2f1a221
of dacspotdocker run --rm -it -v "$PWD:/dacspot" -w /dacspot debian:12
Host (what you are
runningbuildinglibrespot
on):cargo 1.74.1 (ecb9851af 2023-10-18)
, as far as I can tellThe text was updated successfully, but these errors were encountered: