xdp_hello example fails to build on Arch
Closed this issue · 2 comments
esemeniuc commented
Building the xdp_hello example with the following commands fails on Arch:
rustup install nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
cargo install bpf-linker
cd examples/xdp-hello/
cargo xtask build-ebpf
Output
info: component 'rust-src' is up to date
Updating crates.io index
Ignored package `bpf-linker v0.9.13` is already installed, use --force to override
cd: no such file or directory: examples/xdp-hello/
Compiling xtask v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xtask)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
Running `target/debug/xtask build-ebpf`
Compiling xdp-hello-ebpf v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf)
error: linking with `bpf-linker` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.cargo/bin:/home/eric/.local/share/solana/install/active_release/bin:/home/eric/.local/share/JetBrains/Toolbox/scripts:/home/eric/.volta/bin:/home/eric/.yarn/bin:/home/eric/.cargo/bin:/home/eric/Android/Sdk/platform-tools:/home/eric/.local/bin:/opt/google-cloud-cli/bin:/home/eric/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/opt/solana-release/bin" VSLANG="1033" "bpf-linker" "--export-symbols" "/tmp/rustc0xvp6p/symbols" "/tmp/rustc0xvp6p/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.1qdqheo120vl3hr5dep8xvwca.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.2yr1pzbbebu3y0m8nuggwn5ma.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.34t0sw3nwzj2eb471j6m4v082.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.3mhmh3p9son0rsgnxtb6701t3.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.3ndlpmcj1um1i3b802t89pihb.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.3xdbs80okvhvz6k9zi3297nyt.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.4bo6ws0sbsbn7iqs4dm22ixc9.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.9j92fq13e1eqkqtepcipylmj3.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.9pjfyp90f6513l126992jttr3.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.aj6x4l9hia7oxn25mi75mjka0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.bbsatmwmq4am05kthne57up63.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.cbcish0lwo3ssjhz375mcxryc.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.e9mn6o16oy3hcjkg2kda85r3d.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c.eew2h4dq3pthyqy4cq3qk7b4a.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libaya_log_ebpf-afccbaef4c147715.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libaya_log_common-69a0e379b0866bd9.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libnum_enum-7bebff766923d5c3.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libaya_ebpf-4e7fed6ffb4a1b53.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libaya_ebpf_bindings-9ef0562ac33521ce.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libaya_ebpf_cty-3e1a9ebe741e4301.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/librustc_std_workspace_core-556ff21a0e3b31e0.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libcore-ce65fedbd28b894e.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/bpfel-unknown-none/debug/deps/libcompiler_builtins-b43c157d22b01f10.rlib" "--cpu" "generic" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf/../target/bpfel-unknown-none/debug/deps/xdp_hello-354905b480ebd63c" "-O0" "--debug"
= note: unable to open LLVM shared lib /home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-19-rust-1.85.0-nightly.so: /home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-19-rust-1.85.0-nightly.so: file too short
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
ERROR llvm: <unknown>:0:0: in function xdp_hello i32 (ptr): A call to built-in function 'abort' is not supported.
Error: LLVM issued diagnostic with error severity
error: could not compile `xdp-hello-ebpf` (bin "xdp-hello") due to 1 previous error
thread 'main' panicked at xtask/src/build_ebpf.rs:56:5:
assertion failed: status.success()
I have also tried this with nightly-2024-10-25
, but it produces the same output
Kernel: 6.6.52-1-lts
LLVM: llvm 18.1.8-4
tamird commented
Must build in release. Book and template have been updated.
esemeniuc commented
Works now with default linker, thank you