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

wip! mold: fatal: failed to load plugin : /usr/bin/ld: undefined symbol: onload #1358

Open
okias opened this issue Oct 13, 2024 · 1 comment

Comments

@okias
Copy link

okias commented Oct 13, 2024

I need to test against default linker in CI, if this will happen too, but so far it could be on mold side, so dropping here as WIP report-in-progress.
Ref: https://gitlab.freedesktop.org/dh/mesa/-/jobs/65017251 .

FAILED: src/nouveau/compiler/nak 
rustc -C linker=compiler-wrapper-clang-15.sh --color=always -C debug-assertions=no -C overflow-checks=no --crate-type bin -D warnings --edition=2021 -C opt-level=3 --crate-name nak --emit dep-info=src/nouveau/compiler/nak.d --emit link=src/nouveau/compiler/nak --out-dir src/nouveau/compiler/nak.p -C metadata=ed48680@@nak@exe -Aclippy::identity_op -Aclippy::len_zero -Aclippy::manual_range_contains -Aclippy::needless_range_loop -Aclippy::redundant_field_names -Aclippy::upper_case_acronyms -Aclippy::vec_box -Aclippy::write_with_newline -Aclippy::not_unsafe_ptr_arg_deref -Anon_snake_case -Clink-arg=-Wno-unused-command-line-argument -C default-linker-libraries --test --extern bitview=src/nouveau/compiler/libbitview.rlib --extern nak_bindings=src/nouveau/compiler/libnak_bindings.rlib --extern compiler=src/compiler/rust/libcompiler.rlib --extern nak_ir_proc=src/nouveau/compiler/libnak_ir_proc.so --extern acorn=src/nouveau/compiler/libacorn.rlib --extern paste=subprojects/paste-1.0.14/libpaste.so --extern nvidia_headers=src/nouveau/headers/libnvidia_headers.rlib -Clink-arg=src/nouveau/winsys/libnouveau_ws.a -Clink-arg=src/nouveau/headers/libnvidia_headers_c.a -Clink-arg=src/compiler/libcompiler.a -Clink-arg=src/util/libmesa_util.a -Clink-arg=src/util/libmesa_util_sse41.a -Clink-arg=src/util/blake3/libblake3.a -Clink-arg=src/c11/impl/libmesa_util_c11.a --extern nv_push_rs=src/nouveau/headers/libnv_push_rs.rlib -Clink-arg=/usr/lib/x86_64-linux-gnu/libdrm.so -Clink-arg=/usr/lib/x86_64-linux-gnu/libz.so -Clink-arg=-pthread -Clink-arg=/lib/x86_64-linux-gnu/libzstd.so -Clink-arg=/usr/lib/x86_64-linux-gnu/libunwind.so -Clink-arg=-pthread -Clink-arg=-pthread -Lsrc/nouveau/compiler -Lsrc/compiler/rust -Lsubprojects/paste-1.0.14 -Lsrc/nouveau/headers -Lsrc/nouveau/winsys -Lsrc/compiler -Lsrc/util -Lsrc/util/blake3 -Lsrc/c11/impl -Clink-arg=-L/usr/lib/llvm-15/lib/clang/15.0.6 -Clink-arg=-L/usr/bin/../lib/gcc/x86_64-linux-gnu/12 -Clink-arg=-L/usr/lib/gcc/x86_64-linux-gnu/12 -Clink-arg=-L/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../lib64 -Clink-arg=-L/usr/lib64 -Clink-arg=-L/lib/x86_64-linux-gnu -Clink-arg=-L/usr/lib/x86_64-linux-gnu -Clink-arg=-L/lib/../lib64 -Clink-arg=-L/usr/lib/../lib64 -Clink-arg=-L/lib -Clink-arg=-L/usr/lib -Clink-arg=-lstdc++ -C 'link-arg=-Wl,-rpath,$ORIGIN/:$ORIGIN/../../../subprojects/paste-1.0.14:/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib' -C link-arg=-Wl,-rpath-link,/builds/dh/mesa/_build/src/nouveau/compiler:/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib -C link-arg=-Wl,-rpath-link,/builds/dh/mesa/_build/subprojects/paste-1.0.14:/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib ../src/nouveau/compiler/nak/lib.rs
error: linking with `compiler-wrapper-clang-15.sh` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/builds/dh/mesa/.gitlab-ci/build" VSLANG="1033" "compiler-wrapper-clang-15.sh" "-m64" "/tmp/rustcEarXEa/symbols.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.00.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.01.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.02.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.03.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.04.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.05.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.06.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.07.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.08.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.09.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.10.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.11.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.12.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.13.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.14.rcgu.o" "src/nouveau/compiler/nak.p/nak.nak.c6ffe18af4df074d-cgu.15.rcgu.o" "src/nouveau/compiler/nak.p/nak.4tzxoe3qr35rwygh.rcgu.o" "-Wl,--as-needed" "-L" "src/nouveau/compiler" "-L" "src/compiler/rust" "-L" "subprojects/paste-1.0.14" "-L" "src/nouveau/headers" "-L" "src/nouveau/winsys" "-L" "src/compiler" "-L" "src/util" "-L" "src/util/blake3" "-L" "src/c11/impl" "-L" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-5d722ce3e5d0595e.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-76f5006e4e062e57.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunicode_width-a18ed5fdf4a57b72.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_std-a14b8d31733ef9e9.rlib" "/builds/dh/mesa/_build/src/nouveau/headers/libnv_push_rs.rlib" "/builds/dh/mesa/_build/src/nouveau/compiler/libacorn.rlib" "/builds/dh/mesa/_build/src/nouveau/compiler/libnak_bindings.rlib" "/builds/dh/mesa/_build/src/compiler/rust/libcompiler.rlib" "/builds/dh/mesa/_build/src/nouveau/headers/libnvidia_headers.rlib" "/builds/dh/mesa/_build/src/nouveau/compiler/libbitview.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-66d8041607d2929b.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-a57e2388c0aea9b1.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-dcd9be90ae2cb505.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-516789932d161b4e.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-1ff34b0cf871cb60.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-0c110dd0650d6cb7.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-a6e97aae2681ad8f.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-b93dac2525ec4d1e.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-ce1d65fb391ae98b.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-8933a2fb54d88492.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-306712ebb1ee1a3f.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-349c574f342b0d30.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-65c422a3ad95273d.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-7e6330a6c0cb9441.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-39c59240bfdfab27.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-e9d126c51bb8b2bb.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-5af394d9b1f07bdc.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-693a8f23970c5917.rlib" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-13fc9d1ed9c7a2bc.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "src/nouveau/compiler/nak" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wno-unused-command-line-argument" "src/nouveau/winsys/libnouveau_ws.a" "src/nouveau/headers/libnvidia_headers_c.a" "src/compiler/libcompiler.a" "src/util/libmesa_util.a" "src/util/libmesa_util_sse41.a" "src/util/blake3/libblake3.a" "src/c11/impl/libmesa_util_c11.a" "/usr/lib/x86_64-linux-gnu/libdrm.so" "/usr/lib/x86_64-linux-gnu/libz.so" "-pthread" "/lib/x86_64-linux-gnu/libzstd.so" "/usr/lib/x86_64-linux-gnu/libunwind.so" "-pthread" "-pthread" "-L/usr/lib/llvm-15/lib/clang/15.0.6" "-L/usr/bin/../lib/gcc/x86_64-linux-gnu/12" "-L/usr/lib/gcc/x86_64-linux-gnu/12" "-L/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../lib64" "-L/usr/lib64" "-L/lib/x86_64-linux-gnu" "-L/usr/lib/x86_64-linux-gnu" "-L/lib/../lib64" "-L/usr/lib/../lib64" "-L/lib" "-L/usr/lib" "-lstdc++" "-Wl,-rpath,$ORIGIN/:$ORIGIN/../../../subprojects/paste-1.0.14:/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib" "-Wl,-rpath-link,/builds/dh/mesa/_build/src/nouveau/compiler:/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib" "-Wl,-rpath-link,/builds/dh/mesa/_build/subprojects/paste-1.0.14:/root/.rustup/toolchains/1.76.0-2024-02-08-x86_64-unknown-linux-gnu/lib"
  = note: mold: fatal: failed to load plugin : /usr/bin/ld: undefined symbol: onload
          clang: error: linker command failed with exit code 1 (use -v to see invocation)       
@rui314
Copy link
Owner

rui314 commented Oct 14, 2024

The linker complains that you passed /usr/bin/ld as an argument for the --plugin option, which takes a linker plugin .so file. You want to check what linker options you are passing.

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

2 participants