Skip to content

multiple definition of .weak.rustc_debug_gdb_scripts_section.default on windows in stdarch CI #155277

Closed

Description

@folkertdev

With latest (2026-04-14, though our last succesful CI build is from the 13th) nightly we hit this linker error on windows when running stdarch CI

multiple definition of `.weak.rustc_debug_gdb_scripts_section.default'; D:\a\stdarch\stdarch\target\x86_64-pc-windows-gnu\debug\deps\stdarch_gen_arm-c2d4a4c482dd3e81.1nzalzaaigcyndp95lkud74oo.027raph.rcgu.o:1nzalzaaigcyndp95lkud74oo:(.debug_gdb_scripts+0x0): first defined here

rust-lang/stdarch#2081

https://triage.rust-lang.org/gha-logs/rust-lang/stdarch/71235814881?pr=2081#L2026-04-14T09:12:38.0816704Z-L2026-04-14T09:12:38.1054175Z

On my linux machine this works fine

cargo +nightly-2026-04-14-x86_64-unknown-linux-gnu build -p stdarch-gen-arm --target=x86_64-pc-windows-gnu

I can't debug or bisect this on windows, I don't have a windows machine.

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 14, 2026
  2. folkertdev commented on Apr 14, 2026

    @folkertdev
    ContributorAuthor

    Might be #154840?

  3. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    A-debuggersArea: debuggers themselves (gdc, lldb, cdb, WinDbg, etc.)
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 14, 2026
  4. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 14, 2026
  5. added
    C-bugCategory: This is a bug.
    E-needs-investigationCall for participation: This issues needs some investigation to determine current status
    on Apr 14, 2026
  6. mati865 commented on Apr 14, 2026

    @mati865
    Member

    Archiving linker error before CI logs are rotated:

    error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
      |
      = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "D:\\a\\stdarch\\stdarch\\target\\x86_64-pc-windows-gnu\\debug\\deps\\rustc5dRnln\\symbols.o" "<151 object files omitted>" "-Wl,-Bstatic" "D:\\a\\stdarch\\stdarch\\target\\x86_64-pc-windows-gnu\\debug\\deps/{libserde_yaml-0b892d5075b5512a,libryu-df11df3f32bc85db,libindexmap-b95cabdbb6e1c9bb,libhashbrown-c2dc3562ef121da4,libyaml_rust-7ac3da5daa91beec,liblinked_hash_map-f0071a461afe04e1}.rlib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib/{libtest-*,libgetopts-*,librustc_std_workspace_std-*}.rlib" "D:\\a\\stdarch\\stdarch\\target\\x86_64-pc-windows-gnu\\debug\\deps/{libwalkdir-7e010c723400c3f9,libsame_file-6cd91a9b8eef8380,libwinapi_util-bbc6fe358da8a841,libwindows_sys-3629a1c2bb118464,libwindows_link-90ef4cc0bf4976be,libserde_with-bba20707be1e22e0,libregex-56412243b1c69027,libregex_automata-4dabafa3297ba08f,libaho_corasick-e90fd2bad6d6a8b9,libmemchr-939c7785b6dc0a6c,libregex_syntax-7061d5fa82dfb258,libitertools-a118363b4c6ac2a6,libeither-c222ccfcfa622491,libserde-ee0a0a4dd2aecc0d,libserde_core-510e9aec32b55c99,libquote-2b498924c33f666f,libproc_macro2-e9f0bfc5b2f9e85a,libunicode_ident-329e8370e265def1}.rlib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib/{libproc_macro-*,librustc_literal_escaper-*,libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,libwindows_link-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lkernel32" "-lkernel32" "-lkernel32" "-lkernel32" "-lntdll" "-luserenv" "-lws2_32" "-ldbghelp" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-lmingwex" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-o" "D:\\a\\stdarch\\stdarch\\target\\x86_64-pc-windows-gnu\\debug\\deps\\stdarch_gen_arm-c2d4a4c482dd3e81.exe" "-Wl,--gc-sections" "-nodefaultlibs"
      = note: some arguments are omitted. use `--verbose` to show all linker arguments
      = note: C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/15.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:\a\stdarch\stdarch\target\x86_64-pc-windows-gnu\debug\deps\stdarch_gen_arm-c2d4a4c482dd3e81.9ul22rteqt6x41b1oy83npkbi.027raph.rcgu.o:9ul22rteqt6x41b1oy83npkbi:(.debug_gdb_scripts+0x0): multiple definition of `.weak.__rustc_debug_gdb_scripts_section__.default'; D:\a\stdarch\stdarch\target\x86_64-pc-windows-gnu\debug\deps\stdarch_gen_arm-c2d4a4c482dd3e81.1nzalzaaigcyndp95lkud74oo.027raph.rcgu.o:1nzalzaaigcyndp95lkud74oo:(.debug_gdb_scripts+0x0): first defined here
              collect2.exe: error: ld returned 1 exit status
    

    The build command appears to be STDARCH_DISABLE_ASSERT_INSTR=1 RUSTFLAGS=' -D warnings -Z merge-functions=disabled -Z verify-llvm-ir -C target-feature=-sse3 -C target-feature=+avx' cargo test --target=x86_64-pc-windows-gnu --profile=dev -- in stdarch repo.

  7. added a commit that references this issue on Apr 14, 2026
  8. added a commit that references this issue on Apr 14, 2026
  9. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuggersArea: debuggers themselves (gdc, lldb, cdb, WinDbg, etc.)C-bugCategory: This is a bug.E-needs-investigationCall for participation: This issues needs some investigation to determine current statusO-windows-gnuToolchain: GNU, Operating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions