Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust nightly nightly-2023-01-11 and above breaks aya #490

Closed
joshuataylor opened this issue Jan 15, 2023 · 3 comments
Closed

rust nightly nightly-2023-01-11 and above breaks aya #490

joshuataylor opened this issue Jan 15, 2023 · 3 comments

Comments

@joshuataylor
Copy link

joshuataylor commented Jan 15, 2023

edit: rust tracking issue: rust-lang/rust#106795

  1. rustup default nightly-2023-01-11
  2. rustup toolchain install nightly-2023-01-11 --component rust-src
  3. In the dummy project (for example with cargo generate), edit the following files:
    xtask/src/build_ebpf.rs - Change to nightly-2023-01-11 in the build_ebpf function
    xxx-epbf/rust-toolchain.toml:
[toolchain]
channel="nightly-2023-01-11"

Now try and build:

cargo xtask build-ebpf
click to view build output
   Compiling proc-macro2 v1.0.49
   Compiling version_check v0.9.4
   Compiling unicode-ident v1.0.6
   Compiling quote v1.0.23
   Compiling libc v0.2.139
   Compiling syn v1.0.107
   Compiling io-lifetimes v1.0.4
   Compiling rustix v0.36.6
   Compiling linux-raw-sys v0.1.4
   Compiling bitflags v1.3.2
   Compiling heck v0.4.0
   Compiling os_str_bytes v6.4.1
   Compiling anyhow v1.0.68
   Compiling once_cell v1.17.0
   Compiling termcolor v1.1.3
   Compiling strsim v0.10.0
   Compiling clap_lex v0.3.1
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling is-terminal v0.4.2
   Compiling clap_derive v4.1.0
   Compiling clap v4.1.1
   Compiling xtask v0.1.0 (/home/josh/dev/poppy/xtask)
    Finished dev [unoptimized + debuginfo] target(s) in 5.16s
     Running `target/debug/xtask build-ebpf`
   Compiling proc-macro2 v1.0.49
   Compiling unicode-ident v1.0.6
   Compiling quote v1.0.23
   Compiling compiler_builtins v0.1.85
   Compiling syn v1.0.107
   Compiling core v0.0.0 (/home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling rustversion v1.0.11
   Compiling aya-bpf-cty v0.2.1 (https://github.com/aya-rs/aya?branch=main#405c6a85)
   Compiling aya-bpf-bindings v0.1.0 (https://github.com/aya-rs/aya?branch=main#405c6a85)
     Running `rustc --crate-name unicode_ident --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-ident-1.0.6/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=dd948ce851eb96fc -C extra-filename=-dd948ce851eb96fc --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.49/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=40c41ad74c3d33b6 -C extra-filename=-40c41ad74c3d33b6 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/proc-macro2-40c41ad74c3d33b6 -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.23/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=cfa07bb0a2f22501 -C extra-filename=-cfa07bb0a2f22501 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/quote-cfa07bb0a2f22501 -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.85/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=c07aa2271fdfadde -C extra-filename=-c07aa2271fdfadde --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/compiler_builtins-c07aa2271fdfadde -Z force-unstable-if-unmarked -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.107/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' -C metadata=3b590568f75c8477 -C extra-filename=-3b590568f75c8477 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/syn-3b590568f75c8477 -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name core --edition=2021 /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C linker-plugin-lto -C codegen-units=1 -C metadata=0e6c5a3b3083e49a -C extra-filename=-0e6c5a3b3083e49a --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/bpfel-unknown-none/debug/deps --target bpfel-unknown-none -Z force-unstable-if-unmarked -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/bpfel-unknown-none/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/rustversion-1.0.11/build/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C metadata=3490d6c222eacf81 -C extra-filename=-3490d6c222eacf81 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/rustversion-3490d6c222eacf81 -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build /home/josh/.cargo/git/checkouts/aya-c55fbc69175ac116/405c6a8/bpf/aya-bpf-cty/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C metadata=c22120cc81e6c31a -C extra-filename=-c22120cc81e6c31a --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/aya-bpf-cty-c22120cc81e6c31a -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `rustc --crate-name build_script_build --edition=2021 /home/josh/.cargo/git/checkouts/aya-c55fbc69175ac116/405c6a8/bpf/aya-bpf-bindings/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C metadata=2f2c40c3084ecf1c -C extra-filename=-2f2c40c3084ecf1c --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/aya-bpf-bindings-2f2c40c3084ecf1c -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/quote-cfa07bb0a2f22501/build-script-build`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/syn-3b590568f75c8477/build-script-build`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/compiler_builtins-c07aa2271fdfadde/build-script-build`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/aya-bpf-cty-c22120cc81e6c31a/build-script-build`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/aya-bpf-bindings-2f2c40c3084ecf1c/build-script-build`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/proc-macro2-40c41ad74c3d33b6/build-script-build`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/rustversion-3490d6c222eacf81/build-script-build`
     Running `rustc --crate-name proc_macro2 --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.49/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=4af297d59f1cf81b -C extra-filename=-4af297d59f1cf81b --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern unicode_ident=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libunicode_ident-dd948ce851eb96fc.rmeta --cap-lints allow --cfg use_proc_macro --cfg wrap_proc_macro --cfg proc_macro_span`
     Running `rustc --crate-name rustversion --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/rustversion-1.0.11/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C embed-bitcode=no -C debug-assertions=off -C metadata=ded991fd87af52d4 -C extra-filename=-ded991fd87af52d4 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern proc_macro --cap-lints allow`
     Running `rustc --crate-name quote --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.23/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=1de904bd82a1bdc5 -C extra-filename=-1de904bd82a1bdc5 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern proc_macro2=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libproc_macro2-4af297d59f1cf81b.rmeta --cap-lints allow`
error: cannot find macro `atomic_int` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:2821:1
     |
2821 | atomic_int! {
     | ^^^^^^^^^^

error: cannot find macro `atomic_int` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:2841:1
     |
2841 | atomic_int! {
     | ^^^^^^^^^^

error: cannot find macro `atomic_int` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:2905:9
     |
2905 |           atomic_int! {
     |           ^^^^^^^^^^
...
2948 | / atomic_int_ptr_sized! {
2949 | |     "16" 2
2950 | |     "32" 4
2951 | |     "64" 8
2952 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the macro `atomic_int_ptr_sized` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot find macro `atomic_int` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:2926:9
     |
2926 |           atomic_int! {
     |           ^^^^^^^^^^
...
2948 | / atomic_int_ptr_sized! {
2949 | |     "16" 2
2950 | |     "32" 4
2951 | |     "64" 8
2952 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the macro `atomic_int_ptr_sized` (in Nightly builds, run with -Z macro-backtrace for more info)

   Compiling aya-bpf v0.1.0 (https://github.com/aya-rs/aya?branch=main#405c6a85)
     Running `rustc --crate-name build_script_build --edition=2021 /home/josh/.cargo/git/checkouts/aya-c55fbc69175ac116/405c6a8/bpf/aya-bpf/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C metadata=87a0897f2d7b6858 -C extra-filename=-87a0897f2d7b6858 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/build/aya-bpf-87a0897f2d7b6858 -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern rustversion=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/librustversion-ded991fd87af52d4.so --cap-lints allow`
     Running `rustc --crate-name syn --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.107/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="full"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' -C metadata=9dc005491733f9fd -C extra-filename=-9dc005491733f9fd --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern proc_macro2=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libproc_macro2-4af297d59f1cf81b.rmeta --extern quote=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libquote-1de904bd82a1bdc5.rmeta --extern unicode_ident=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libunicode_ident-dd948ce851eb96fc.rmeta --cap-lints allow`
     Running `/home/josh/dev/poppy/poppy-ebpf/../target/debug/build/aya-bpf-87a0897f2d7b6858/build-script-build`
error[E0412]: cannot find type `AtomicIsize` in module `crate::sync::atomic`
   --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:206:45
    |
206 | impl RefUnwindSafe for crate::sync::atomic::AtomicIsize {}
    |                                             ^^^^^^^^^^^ not found in `crate::sync::atomic`

error[E0412]: cannot find type `AtomicI64` in module `crate::sync::atomic`
   --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:218:45
    |
218 | impl RefUnwindSafe for crate::sync::atomic::AtomicI64 {}
    |                                             ^^^^^^^^^ help: a struct with a similar name exists: `AtomicPtr`
    |
   ::: /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:176:1
    |
176 | pub struct AtomicPtr<T> {
    | ----------------------- similarly named struct `AtomicPtr` defined here

error[E0412]: cannot find type `AtomicUsize` in module `crate::sync::atomic`
   --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:225:45
    |
225 | impl RefUnwindSafe for crate::sync::atomic::AtomicUsize {}
    |                                             ^^^^^^^^^^^ not found in `crate::sync::atomic`

error[E0412]: cannot find type `AtomicU64` in module `crate::sync::atomic`
   --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:237:45
    |
237 | impl RefUnwindSafe for crate::sync::atomic::AtomicU64 {}
    |                                             ^^^^^^^^^ help: a struct with a similar name exists: `AtomicPtr`
    |
   ::: /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:176:1
    |
176 | pub struct AtomicPtr<T> {
    | ----------------------- similarly named struct `AtomicPtr` defined here

   Compiling num_enum_derive v0.5.7
   Compiling aya-bpf-macros v0.1.0 (https://github.com/aya-rs/aya?branch=main#405c6a85)
     Running `rustc --crate-name num_enum_derive --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/num_enum_derive-0.5.7/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C embed-bitcode=no -C debug-assertions=off -C metadata=6ee71dd8d6de62a4 -C extra-filename=-6ee71dd8d6de62a4 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern proc_macro2=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libproc_macro2-4af297d59f1cf81b.rlib --extern quote=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libquote-1de904bd82a1bdc5.rlib --extern syn=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libsyn-9dc005491733f9fd.rlib --extern proc_macro --cap-lints allow`
     Running `rustc --crate-name aya_bpf_macros --edition=2021 /home/josh/.cargo/git/checkouts/aya-c55fbc69175ac116/405c6a8/aya-bpf-macros/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C embed-bitcode=no -C debug-assertions=off -C metadata=4a80198f40547bc3 -C extra-filename=-4a80198f40547bc3 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern proc_macro2=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libproc_macro2-4af297d59f1cf81b.rlib --extern quote=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libquote-1de904bd82a1bdc5.rlib --extern syn=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libsyn-9dc005491733f9fd.rlib --extern proc_macro --cap-lints allow`
   Compiling num_enum v0.5.7
     Running `rustc --crate-name num_enum --edition=2018 /home/josh/.cargo/registry/src/github.com-1ecc6299db9ec823/num_enum-0.5.7/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=d3db6ff298ebc883 -C extra-filename=-d3db6ff298ebc883 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern num_enum_derive=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libnum_enum_derive-6ee71dd8d6de62a4.so --cap-lints allow`
   Compiling aya-log-common v0.1.13 (https://github.com/aya-rs/aya?branch=main#405c6a85)
     Running `rustc --crate-name aya_log_common --edition=2021 /home/josh/.cargo/git/checkouts/aya-c55fbc69175ac116/405c6a8/aya-log-common/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off --cfg 'feature="default"' -C metadata=67ea55bf24358926 -C extra-filename=-67ea55bf24358926 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern num_enum=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libnum_enum-d3db6ff298ebc883.rmeta --cap-lints allow`
   Compiling aya-log-parser v0.1.11-dev.0 (https://github.com/aya-rs/aya?branch=main#405c6a85)
     Running `rustc --crate-name aya_log_parser --edition=2018 /home/josh/.cargo/git/checkouts/aya-c55fbc69175ac116/405c6a8/aya-log-parser/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debug-assertions=off -C metadata=344082842cf04cd7 -C extra-filename=-344082842cf04cd7 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern aya_log_common=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libaya_log_common-67ea55bf24358926.rmeta --cap-lints allow`
error[E0425]: cannot find function `atomic_swap` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1253:18
     |
1253 |         unsafe { atomic_swap(self.p.get(), ptr, order) }
     |                  ^^^^^^^^^^^ help: a function with a similar name exists: `atomic_load`
...
2983 | unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
     | ------------------------------------------------------------------- similarly named function `atomic_load` defined here

error[E0425]: cannot find function `strongest_failure_ordering` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1308:58
     |
1308 |         match self.compare_exchange(current, new, order, strongest_failure_ordering(order)) {
     |                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `atomic_compare_exchange` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1355:18
     |
1355 |         unsafe { atomic_compare_exchange(self.p.get(), current, new, success, failure) }
     |                  ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `atomic_compare_exchange_weak` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1407:18
     |
1407 |         unsafe { atomic_compare_exchange_weak(self.p.get(), current, new, success, failure) }
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `atomic_add` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1603:18
     |
1603 |         unsafe { atomic_add(self.p.get(), core::ptr::invalid_mut(val), order).cast() }
     |                  ^^^^^^^^^^ help: a function with a similar name exists: `atomic_load`
...
2983 | unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
     | ------------------------------------------------------------------- similarly named function `atomic_load` defined here

error[E0425]: cannot find function `atomic_sub` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1638:18
     |
1638 |         unsafe { atomic_sub(self.p.get(), core::ptr::invalid_mut(val), order).cast() }
     |                  ^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `atomic_or` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1689:18
     |
1689 |         unsafe { atomic_or(self.p.get(), core::ptr::invalid_mut(val), order).cast() }
     |                  ^^^^^^^^^ help: a function with a similar name exists: `atomic_load`
...
2983 | unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
     | ------------------------------------------------------------------- similarly named function `atomic_load` defined here

error[E0425]: cannot find function `atomic_and` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1739:18
     |
1739 |         unsafe { atomic_and(self.p.get(), core::ptr::invalid_mut(val), order).cast() }
     |                  ^^^^^^^^^^ help: a function with a similar name exists: `atomic_load`
...
2983 | unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
     | ------------------------------------------------------------------- similarly named function `atomic_load` defined here

error[E0425]: cannot find function `atomic_xor` in this scope
    --> /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:1787:18
     |
1787 |         unsafe { atomic_xor(self.p.get(), core::ptr::invalid_mut(val), order).cast() }
     |                  ^^^^^^^^^^ help: a function with a similar name exists: `atomic_load`
...
2983 | unsafe fn atomic_load<T: Copy>(dst: *const T, order: Ordering) -> T {
     | ------------------------------------------------------------------- similarly named function `atomic_load` defined here

   Compiling aya-log-ebpf-macros v0.1.0 (https://github.com/aya-rs/aya?branch=main#405c6a85)
     Running `rustc --crate-name aya_log_ebpf_macros --edition=2021 /home/josh/.cargo/git/checkouts/aya-c55fbc69175ac116/405c6a8/aya-log-ebpf-macros/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C embed-bitcode=no -C debug-assertions=off -C metadata=86dbf03a3f283b83 -C extra-filename=-86dbf03a3f283b83 --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --extern aya_log_common=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libaya_log_common-67ea55bf24358926.rlib --extern aya_log_parser=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libaya_log_parser-344082842cf04cd7.rlib --extern proc_macro2=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libproc_macro2-4af297d59f1cf81b.rlib --extern quote=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libquote-1de904bd82a1bdc5.rlib --extern syn=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps/libsyn-9dc005491733f9fd.rlib --extern proc_macro --cap-lints allow`
Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `core` due to 17 previous errors

Caused by:
  process didn't exit successfully: `rustc --crate-name core --edition=2021 /home/josh/.rustup/toolchains/nightly-2023-01-11-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=181 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C panic=abort -C linker-plugin-lto -C codegen-units=1 -C metadata=0e6c5a3b3083e49a -C extra-filename=-0e6c5a3b3083e49a --out-dir /home/josh/dev/poppy/poppy-ebpf/../target/bpfel-unknown-none/debug/deps --target bpfel-unknown-none -Z force-unstable-if-unmarked -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/bpfel-unknown-none/debug/deps -L dependency=/home/josh/dev/poppy/poppy-ebpf/../target/debug/deps --cap-lints allow` (exit status: 1)
thread 'main' panicked at 'assertion failed: status.success()', xtask/src/build_ebpf.rs:61:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

nightly-2023-01-10 and below works.

This file was recently changed: https://github.com/rust-lang/rust/commits/master/library/core/src/sync/atomic.rs

@w01fb0ss
Copy link

I also got the same error

@joshuataylor
Copy link
Author

joshuataylor commented Jan 18, 2023

Take a look at aya-rs/aya-template#70 , it's a pretty simple fix 🎉

Pin nightly to that version, and everything else can use "normal" nightly.

shaneutt pushed a commit to kubernetes-sigs/blixt that referenced this issue Jan 20, 2023
The 2023-01-11 nightly rust build [broke
aya](aya-rs/aya#490) and subsequently the
build of the Blixt Dataplane.
Pinning the rust toolchain version to 2023-01-10 as a temporary fix.
@alessandrod
Copy link
Collaborator

This was fixed in rustc

shaneutt pushed a commit to kubernetes-sigs/blixt that referenced this issue Mar 3, 2023
The 2023-01-11 nightly rust build [broke
aya](aya-rs/aya#490) and subsequently the
build of the Blixt Dataplane.
Pinning the rust toolchain version to 2023-01-10 as a temporary fix.
shaneutt pushed a commit to shaneutt/blixt that referenced this issue Oct 11, 2023
The 2023-01-11 nightly rust build [broke
aya](aya-rs/aya#490) and subsequently the
build of the Blixt Dataplane.
Pinning the rust toolchain version to 2023-01-10 as a temporary fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants