error: unsupported output in build script of `aya-ebpf v0.1.0 (https://github.com/aya-rs/aya#b8a22fa0)
jornfranke opened this issue · 8 comments
I am using Rust 1.79.0
When building my previously working application (https://github.com/ZuInnoTe/rust-ebpf-localnet-kernel-filter-study) with latest version of Rust and latest version of aya, I get the following error:
cargo build --target bpfel-unknown-none -Z build-std=core --release
Updating crates.io index
Compiling num_enum v0.7.2
Compiling aya-ebpf-cty v0.2.1 (https://github.com/aya-rs/aya#b8a22fa0)
Compiling aya-ebpf-bindings v0.1.0 (https://github.com/aya-rs/aya#b8a22fa0)
Compiling memoffset v0.8.0
Compiling aya-ebpf v0.1.0 (https://github.com/aya-rs/aya#b8a22fa0)
Compiling aya-ebpf-macros v0.1.0 (https://github.com/aya-rs/aya#b8a22fa0)
error: unsupported output in build script of `aya-ebpf v0.1.0 (https://github.com/aya-rs/aya#b8a22fa0)`: `cargo::rustc-check-cfg=cfg(bpf_target_arch, values("x86_64","arm","aarch64","riscv64"))`
Found a `cargo::key=value` build directive which is reserved for future use.
Either change the directive to `cargo:key=value` syntax (note the single `:`) or upgrade your version of Rust.
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script for more information about build script outputs.
warning: build failed, waiting for other jobs to finish...
error: unsupported output in build script of `aya-ebpf-cty v0.2.1 (https://github.com/aya-rs/aya#b8a22fa0)`: `cargo::rustc-check-cfg=cfg(bpf_target_arch, values("x86_64","arm","aarch64","riscv64"))`
Found a `cargo::key=value` build directive which is reserved for future use.
Either change the directive to `cargo:key=value` syntax (note the single `:`) or upgrade your version of Rust.
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script for more information about build script outputs.
error: unsupported output in build script of `aya-ebpf-bindings v0.1.0 (https://github.com/aya-rs/aya#b8a22fa0)`: `cargo::rustc-check-cfg=cfg(bpf_target_arch, values("x86_64","arm","aarch64","riscv64"))`
Found a `cargo::key=value` build directive which is reserved for future use.
Either change the directive to `cargo:key=value` syntax (note the single `:`) or upgrade your version of Rust.
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script for more information about build script outputs.
There seems to be an issue when building the dependency and not the application itself. Any idea what can cause this?
Seems it was added here: https://github.com/aya-rs/aya/blob/main/ebpf/aya-ebpf/build.rs#L13
@tamird
Seems like an easy fix; change ::
to :
. Care to send a PR?
But also the original commit references this doc which suggests two colons is the canonical form with rust 1.78 or higher...?
Also: how are you using rust 1.79? Aya ebpf requires nightly if I remember correctly. Have you ever built your application successfully before? What changed since you last did?
I meant I have installed rust 1.79, but I configure via rust-toolchain.toml the nightly: https://github.com/ZuInnoTe/rust-ebpf-localnet-kernel-filter-study/blob/main/net-tc-filter/net-tc-filter-ebpf/rust-toolchain.toml
Will check if it picks up the nightly, but I wonder why not. Nothing changed, it was built before successfully.
What is the version of your nightly?
Ahh you brought me on the right track, I forgot a
rustup update nightly
Thanks!