aya-rs/aya

EBPF compile error with Mold linker

Closed this issue · 9 comments

Note: I understand this is low priority since mold is not a default, mainly wanted to make this known for other users. Things compile fine without mold

When using mold linker with the following in ~/.cargo/config.toml

[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=mold"]

Command: RUST_LOG=info cargo run --config 'target."cfg(all())".runner="sudo -E"'

I get the following error message:

   Compiling aya-build v0.1.2 (https://github.com/aya-rs/aya#3d8cb08b)
   Compiling xdp-hello v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello)
The following warnings were emitted during compilation:

warning: xdp-hello@0.1.0:    Compiling core v0.0.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
warning: xdp-hello@0.1.0:    Compiling compiler_builtins v0.1.138
warning: xdp-hello@0.1.0:    Compiling aya-ebpf-cty v0.2.2 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling aya-ebpf-bindings v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling aya-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling xdp-hello-ebpf v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf)
warning: xdp-hello@0.1.0:    Compiling rustc-std-workspace-core v1.99.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
warning: xdp-hello@0.1.0:    Compiling num_enum v0.7.3
warning: xdp-hello@0.1.0:    Compiling xdp-hello-common v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-common)
warning: xdp-hello@0.1.0:    Compiling aya-log-common v0.1.15 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling aya-log-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0: error: linking with `bpf-linker` failed: exit status: 1
warning: xdp-hello@0.1.0:   |
warning: xdp-hello@0.1.0:   = 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/rustchubHvf/symbols" "/tmp/rustchubHvf/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2.xdp_hello.c2cb6c06a33fd315-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_ebpf-ed444f0176545831.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_common-ff7bf91cb7964e70.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libnum_enum-7793268e66036f23.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf-7cd711b9d19526c1.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_bindings-01d8c31005a3616d.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_cty-62a8feeca1b90df4.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/librustc_std_workspace_core-2b874829a367ac00.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcore-5630b912b3f6d8b8.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcompiler_builtins-98e97c0add3f1e7d.rlib" "--cpu" "generic" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2" "-O3" "--debug" "-fuse-ld=mold"
warning: xdp-hello@0.1.0:   = note: Error: error: unexpected argument '-f' found
warning: xdp-hello@0.1.0:           
warning: xdp-hello@0.1.0:             tip: to pass '-f' as a value, use '-- -f'
warning: xdp-hello@0.1.0:           
warning: xdp-hello@0.1.0:           Usage: bpf-linker [OPTIONS] --output <OUTPUT> <INPUTS>...
warning: xdp-hello@0.1.0:           
warning: xdp-hello@0.1.0:           For more information, try '--help'.
warning: xdp-hello@0.1.0:           
warning: xdp-hello@0.1.0:           
warning: xdp-hello@0.1.0: 
warning: xdp-hello@0.1.0: 
warning: xdp-hello@0.1.0: error: could not compile `xdp-hello-ebpf` (bin "xdp-hello") due to 1 previous error

error: failed to run custom build command for `xdp-hello v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello)`

Caused by:
  process didn't exit successfully: `/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-8825a4159dfd87ca/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf
  cargo:warning=   Compiling core v0.0.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
  cargo:warning=   Compiling compiler_builtins v0.1.138
  cargo:warning=   Compiling aya-ebpf-cty v0.2.2 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling aya-ebpf-bindings v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling aya-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling xdp-hello-ebpf v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf)
  cargo:warning=   Compiling rustc-std-workspace-core v1.99.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
  cargo:warning=   Compiling num_enum v0.7.3
  cargo:warning=   Compiling xdp-hello-common v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-common)
  cargo:warning=   Compiling aya-log-common v0.1.15 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling aya-log-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=error: linking with `bpf-linker` failed: exit status: 1
  cargo:warning=  |
  cargo:warning=  = 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/rustchubHvf/symbols" "/tmp/rustchubHvf/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2.xdp_hello.c2cb6c06a33fd315-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_ebpf-ed444f0176545831.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_common-ff7bf91cb7964e70.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libnum_enum-7793268e66036f23.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf-7cd711b9d19526c1.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_bindings-01d8c31005a3616d.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_cty-62a8feeca1b90df4.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/librustc_std_workspace_core-2b874829a367ac00.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcore-5630b912b3f6d8b8.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcompiler_builtins-98e97c0add3f1e7d.rlib" "--cpu" "generic" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2" "-O3" "--debug" "-fuse-ld=mold"
  cargo:warning=  = note: Error: error: unexpected argument '-f' found
  cargo:warning=          
  cargo:warning=            tip: to pass '-f' as a value, use '-- -f'
  cargo:warning=          
  cargo:warning=          Usage: bpf-linker [OPTIONS] --output <OUTPUT> <INPUTS>...
  cargo:warning=          
  cargo:warning=          For more information, try '--help'.
  cargo:warning=          
  cargo:warning=          
  cargo:warning=
  cargo:warning=
  cargo:warning=error: could not compile `xdp-hello-ebpf` (bin "xdp-hello") due to 1 previous error

  --- stderr
  Error: env -u RUSTC -u RUSTC_WORKSPACE_WRAPPER CARGO_CFG_BPF_TARGET_ARCH="x86_64" "cargo" "+nightly" "build" "--package" "xdp-hello-ebpf" "-Z" "build-std=core" "--bins" "--message-format=json" "--release" "--target" "bpfel-unknown-none" "--target-dir" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf" failed: ExitStatus(unix_wait_status(25856))
➜  xdp-hello git:(main) ✗ 

Your rustflags = ... is "leaking" through our cargo-in-cargo build, and so your -fuse-ld=mold is leaking into the BPF compilation rather than just being applied to your userspace code.

Can you write

[target.x86_64-unknown-linux-gnu]
linker = "mold"

instead?

With the suggestion above, I get this error:

   Compiling assert_matches v1.5.0
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustcAeVmpG/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/serde-8b4e2aa4624ae8c3/build_script_build-8b4e2aa4624ae8c3.build_script_build.852cd3f27292ea78-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/serde-8b4e2aa4624ae8c3/build_script_build-8b4e2aa4624ae8c3.9b0u9yf0o9n6l0ik55oanbu6d.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/serde-8b4e2aa4624ae8c3/build_script_build-8b4e2aa4624ae8c3" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

   Compiling bitflags v2.6.0
   Compiling once_cell v1.20.2
   Compiling clap_lex v0.7.3
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustccBfFuK/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/serde_json-3cf905519417f5b3/build_script_build-3cf905519417f5b3.build_script_build.b5906f98f90ec8f-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/serde_json-3cf905519417f5b3/build_script_build-3cf905519417f5b3.cv9hrv92c6p8725dn3vvq6go8.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/serde_json-3cf905519417f5b3/build_script_build-3cf905519417f5b3" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `serde` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustcnfujHG/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-7b7494bdde75ce5c/build_script_build-7b7494bdde75ce5c.build_script_build.552f2e72afa452c9-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-7b7494bdde75ce5c/build_script_build-7b7494bdde75ce5c.build_script_build.552f2e72afa452c9-cgu.1.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-7b7494bdde75ce5c/build_script_build-7b7494bdde75ce5c.92c6zdx03ad6vauvz8hn32x8b.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-7b7494bdde75ce5c/build_script_build-7b7494bdde75ce5c" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `serde_json` (build script) due to 1 previous error
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustcl7h7de/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/proc-macro2-e08fec03b275422e/build_script_build-e08fec03b275422e.build_script_build.7f9f9b2346393008-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/proc-macro2-e08fec03b275422e/build_script_build-e08fec03b275422e.build_script_build.7f9f9b2346393008-cgu.1.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/proc-macro2-e08fec03b275422e/build_script_build-e08fec03b275422e.0tt503el69mp2grakxklqqz0y.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/proc-macro2-e08fec03b275422e/build_script_build-e08fec03b275422e" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `thiserror` (build script) due to 1 previous error
error: could not compile `proc-macro2` (build script) due to 1 previous error
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustc7C69T8/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/anyhow-f798ed9ede4924e3/build_script_build-f798ed9ede4924e3.build_script_build.4b14fd6c6a4b4183-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/anyhow-f798ed9ede4924e3/build_script_build-f798ed9ede4924e3.build_script_build.4b14fd6c6a4b4183-cgu.1.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/anyhow-f798ed9ede4924e3/build_script_build-f798ed9ede4924e3.986zb1c84qig2t3niw0jgwsec.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/anyhow-f798ed9ede4924e3/build_script_build-f798ed9ede4924e3" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `anyhow` (build script) due to 1 previous error
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustcqwEjDa/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-c103773314e56507/build_script_build-c103773314e56507.build_script_build.e695aa992dd4225b-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-c103773314e56507/build_script_build-c103773314e56507.build_script_build.e695aa992dd4225b-cgu.1.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-c103773314e56507/build_script_build-c103773314e56507.2d5bimt9muqmcu3uodv6xury6.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/thiserror-c103773314e56507/build_script_build-c103773314e56507" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `thiserror` (build script) due to 1 previous error
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustcfphwlq/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/libc-ffcfc8b2ebcc95b8/build_script_build-ffcfc8b2ebcc95b8.build_script_build.46e78be37b79d422-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/libc-ffcfc8b2ebcc95b8/build_script_build-ffcfc8b2ebcc95b8.build_script_build.46e78be37b79d422-cgu.1.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/libc-ffcfc8b2ebcc95b8/build_script_build-ffcfc8b2ebcc95b8.build_script_build.46e78be37b79d422-cgu.2.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/libc-ffcfc8b2ebcc95b8/build_script_build-ffcfc8b2ebcc95b8.build_script_build.46e78be37b79d422-cgu.3.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/libc-ffcfc8b2ebcc95b8/build_script_build-ffcfc8b2ebcc95b8.544gz8tnthhtod56r7spf4vc3.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/libc-ffcfc8b2ebcc95b8/build_script_build-ffcfc8b2ebcc95b8" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `libc` (build script) due to 1 previous error
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustcaSzWd8/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/semver-2c6660ac46c50f80/build_script_build-2c6660ac46c50f80.build_script_build.dc3108cff604313-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/semver-2c6660ac46c50f80/build_script_build-2c6660ac46c50f80.1o6kc32opq2f3gx2cv39u25yf.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/semver-2c6660ac46c50f80/build_script_build-2c6660ac46c50f80" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `semver` (build script) due to 1 previous error
error: linking with `mold` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/eric/.rustup/toolchains/1.80-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" "mold" "-m64" "/tmp/rustcR8nfFu/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/camino-ac132ec2bc77e4a4/build_script_build-ac132ec2bc77e4a4.build_script_build.9aa1e3b20e757e0f-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/camino-ac132ec2bc77e4a4/build_script_build-ac132ec2bc77e4a4.build_script_build.9aa1e3b20e757e0f-cgu.1.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/camino-ac132ec2bc77e4a4/build_script_build-ac132ec2bc77e4a4.build_script_build.9aa1e3b20e757e0f-cgu.2.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/camino-ac132ec2bc77e4a4/build_script_build-ac132ec2bc77e4a4.3vjwc83bu8hmzvfx9a452rwfh.rcgu.o" "-Wl,--as-needed" "-L" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/deps" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-52417a9a08ba8fb9.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b238e97929fdc18.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-3692c2663daa48a5.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-5c1e2d61611c0240.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-e55c5186b9bbabcb.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7911d2fe92903c6c.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-c03510cdc48cfa52.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ec6f3765287c7b7.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ab3f1b788cf79cfc.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-6db4226b4e34b1a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-f5bb1a38d410fa1e.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-e585efe74c64604d.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-03f8e93b59ffc316.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-669e9182bfe197a6.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-64b53226be979181.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-26921ac7e6a44d2b.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6703049be165ebf1.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-04bfdf6b094564ce.rlib" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-6648dc218e522d87.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/eric/.rustup/toolchains/1.80-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/camino-ac132ec2bc77e4a4/build_script_build-ac132ec2bc77e4a4" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
  = note: mold: fatal: unknown -m argument: 64
          

error: could not compile `camino` (build script) due to 1 previous error
➜  xdp-hello git:(main) ✗ 

Yeah, mold doesn't implement the clang porcelain. You can implement your own trampoline:
linker.sh:

exec clang -fuse-ld=mold "$@"

.cargo/config.toml:

[target.x86_64-unknown-linux-gnu]
linker = "linker.sh"

PATH=.:$PATH cargo ....

Awesome, I was able to make it work with:

echo '#!/bin/bash\nexec clang -fuse-ld=mold "$@"' > ~/.cargo/linker.sh
chmod +x ~/.cargo/linker.sh

~/.cargo/config.toml

[target.x86_64-unknown-linux-gnu]
linker = ".cargo/linker.sh"

note that the shebang is needed

Great, glad it worked.

@esemeniuc

Can you also try the following?

[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = "-C link-arg=-fuse-ld=mold"

Without the custom script.

Isn't that the first thing he tried?

@vadorovsky when running your suggestion, I get

   Compiling aya-build v0.1.2 (https://github.com/aya-rs/aya#3d8cb08b)
   Compiling xdp-hello v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello)
The following warnings were emitted during compilation:

warning: xdp-hello@0.1.0:    Compiling proc-macro2 v1.0.92
warning: xdp-hello@0.1.0:    Compiling unicode-ident v1.0.14
warning: xdp-hello@0.1.0:    Compiling compiler_builtins v0.1.138
warning: xdp-hello@0.1.0:    Compiling version_check v0.9.5
warning: xdp-hello@0.1.0:    Compiling core v0.0.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
warning: xdp-hello@0.1.0:    Compiling rustversion v1.0.18
warning: xdp-hello@0.1.0:    Compiling aya-ebpf-cty v0.2.2 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling rustix v0.38.41
warning: xdp-hello@0.1.0:    Compiling aya-ebpf-bindings v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling linux-raw-sys v0.4.14
warning: xdp-hello@0.1.0:    Compiling bitflags v2.6.0
warning: xdp-hello@0.1.0:    Compiling home v0.5.9
warning: xdp-hello@0.1.0:    Compiling either v1.13.0
warning: xdp-hello@0.1.0:    Compiling proc-macro-error-attr v1.0.4
warning: xdp-hello@0.1.0:    Compiling proc-macro-error v1.0.4
warning: xdp-hello@0.1.0:    Compiling quote v1.0.37
warning: xdp-hello@0.1.0:    Compiling aya-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling syn v2.0.90
warning: xdp-hello@0.1.0:    Compiling which v6.0.3
warning: xdp-hello@0.1.0:    Compiling xdp-hello-ebpf v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf)
warning: xdp-hello@0.1.0:    Compiling num_enum_derive v0.7.3
warning: xdp-hello@0.1.0:    Compiling aya-ebpf-macros v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling num_enum v0.7.3
warning: xdp-hello@0.1.0:    Compiling aya-log-common v0.1.15 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling aya-log-parser v0.1.13 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling aya-log-ebpf-macros v0.1.0 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0:    Compiling rustc-std-workspace-core v1.99.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
warning: xdp-hello@0.1.0:    Compiling xdp-hello-common v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-common)
warning: xdp-hello@0.1.0:    Compiling aya-log-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
warning: xdp-hello@0.1.0: error: linking with `bpf-linker` failed: exit status: 1
warning: xdp-hello@0.1.0:   |
warning: xdp-hello@0.1.0:   = 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/.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-sdk/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/rustcC594Bj/symbols" "/tmp/rustcC594Bj/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2.xdp_hello.c6b82e26b9b96a77-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_ebpf-ed444f0176545831.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_common-ff7bf91cb7964e70.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libnum_enum-7793268e66036f23.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf-7cd711b9d19526c1.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_bindings-01d8c31005a3616d.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_cty-62a8feeca1b90df4.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/librustc_std_workspace_core-2b874829a367ac00.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcore-5630b912b3f6d8b8.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcompiler_builtins-98e97c0add3f1e7d.rlib" "--cpu" "generic" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2" "-O3" "--debug" "-fuse-ld=mold"
warning: xdp-hello@0.1.0:   = note: Error: error: unexpected argument '-f' found
warning: xdp-hello@0.1.0:
warning: xdp-hello@0.1.0:             tip: to pass '-f' as a value, use '-- -f'
warning: xdp-hello@0.1.0:
warning: xdp-hello@0.1.0:           Usage: bpf-linker [OPTIONS] --output <OUTPUT> <INPUTS>...
warning: xdp-hello@0.1.0:
warning: xdp-hello@0.1.0:           For more information, try '--help'.
warning: xdp-hello@0.1.0:
warning: xdp-hello@0.1.0:
warning: xdp-hello@0.1.0:
warning: xdp-hello@0.1.0:
warning: xdp-hello@0.1.0: error: could not compile `xdp-hello-ebpf` (bin "xdp-hello") due to 1 previous error

error: failed to run custom build command for `xdp-hello v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello)`

Caused by:
  process didn't exit successfully: `/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-8825a4159dfd87ca/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-changed=/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf
  cargo:warning=   Compiling proc-macro2 v1.0.92
  cargo:warning=   Compiling unicode-ident v1.0.14
  cargo:warning=   Compiling compiler_builtins v0.1.138
  cargo:warning=   Compiling version_check v0.9.5
  cargo:warning=   Compiling core v0.0.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
  cargo:warning=   Compiling rustversion v1.0.18
  cargo:warning=   Compiling aya-ebpf-cty v0.2.2 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling rustix v0.38.41
  cargo:warning=   Compiling aya-ebpf-bindings v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling linux-raw-sys v0.4.14
  cargo:warning=   Compiling bitflags v2.6.0
  cargo:warning=   Compiling home v0.5.9
  cargo:warning=   Compiling either v1.13.0
  cargo:warning=   Compiling proc-macro-error-attr v1.0.4
  cargo:warning=   Compiling proc-macro-error v1.0.4
  cargo:warning=   Compiling quote v1.0.37
  cargo:warning=   Compiling aya-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling syn v2.0.90
  cargo:warning=   Compiling which v6.0.3
  cargo:warning=   Compiling xdp-hello-ebpf v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-ebpf)
  cargo:warning=   Compiling num_enum_derive v0.7.3
  cargo:warning=   Compiling aya-ebpf-macros v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling num_enum v0.7.3
  cargo:warning=   Compiling aya-log-common v0.1.15 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling aya-log-parser v0.1.13 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling aya-log-ebpf-macros v0.1.0 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=   Compiling rustc-std-workspace-core v1.99.0 (/home/eric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
  cargo:warning=   Compiling xdp-hello-common v0.1.0 (/home/eric/dev/aya-book/examples/xdp-hello/xdp-hello-common)
  cargo:warning=   Compiling aya-log-ebpf v0.1.1 (https://github.com/aya-rs/aya#3d8cb08b)
  cargo:warning=error: linking with `bpf-linker` failed: exit status: 1
  cargo:warning=  |
  cargo:warning=  = 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/.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-sdk/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/rustcC594Bj/symbols" "/tmp/rustcC594Bj/symbols.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2.xdp_hello.c6b82e26b9b96a77-cgu.0.rcgu.o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_ebpf-ed444f0176545831.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_log_common-ff7bf91cb7964e70.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libnum_enum-7793268e66036f23.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf-7cd711b9d19526c1.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_bindings-01d8c31005a3616d.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libaya_ebpf_cty-62a8feeca1b90df4.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/librustc_std_workspace_core-2b874829a367ac00.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcore-5630b912b3f6d8b8.rlib" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/libcompiler_builtins-98e97c0add3f1e7d.rlib" "--cpu" "generic" "-o" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf/bpfel-unknown-none/release/deps/xdp_hello-62bb41ae9dcc9fc2" "-O3" "--debug" "-fuse-ld=mold"
  cargo:warning=  = note: Error: error: unexpected argument '-f' found
  cargo:warning=
  cargo:warning=            tip: to pass '-f' as a value, use '-- -f'
  cargo:warning=
  cargo:warning=          Usage: bpf-linker [OPTIONS] --output <OUTPUT> <INPUTS>...
  cargo:warning=
  cargo:warning=          For more information, try '--help'.
  cargo:warning=
  cargo:warning=
  cargo:warning=
  cargo:warning=
  cargo:warning=error: could not compile `xdp-hello-ebpf` (bin "xdp-hello") due to 1 previous error

  --- stderr
  Error: env -u RUSTC -u RUSTC_WORKSPACE_WRAPPER CARGO_CFG_BPF_TARGET_ARCH="x86_64" "cargo" "+nightly" "build" "--package" "xdp-hello-ebpf" "-Z" "build-std=core" "--bins" "--message-format=json" "--release" "--target" "bpfel-unknown-none" "--target-dir" "/home/eric/dev/aya-book/examples/xdp-hello/target/debug/build/xdp-hello-225514b0bfc87dda/out/xdp-hello-ebpf" failed: ExitStatus(unix_wait_status(25856))
➜  xdp-hello git:(main)