Repository navigation
compiler_builtins string.h functions are not available when using std targets with #![no_std] #137833
Description
Code
The basm-rs project which uses no-std with mem feature for compiler-builtins fails to build on recent nightly. It can be reproduced on nightly-2025-02-28 on Windows x64 and Linux x64 by the following:
git clone https://github.com/boj-rs/basm-rs.git
cd basm-rs
git reset --hard 2e3799d
cargo runThe following PR seems relevant: #135501 (Inject compiler_builtins during postprocessing and ensure it is made private)
Although not sure, I suspect this might be due to the internal changes by the above PR making the mem feature ignored on the compiler-builtins crate.
Adding/removing compiler-builtins with mem feature enabled (on Cargo.toml) doesn't alleviate the issue.
I expected to see this happen: build should succeed
Instead, this happened: build fails with linker error (unresolved external symbols, LNK2001 and LNK2019 on memcpy, memset, strlen, etc.)
Linker error on Windows x64
error: linking with `link.exe` failed: exit code: 1120
|
= note: \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX64\\x64\\link.exe\" \"/DEF:C:\\Users\\UNNER~1\\AppData\\Local\\Temp\\ustcw0AdYp\\lib.def\" \"/NOLOGO\" \"C:\\Users\\UNNER~1\\AppData\\Local\\Temp\\ustcw0AdYp\\symbols.o\" \"<20 object files omitted>\" \"D:\\a\\basm-rs\\basm-rs\\target\\x86_64-pc-windows-msvc\\debug\\deps/{libbasm_std-e50feab6cac5330a.rlib,libryu-2d7a27dd94711b38.rlib,liblibm-fe7c82a0dfd00cea.rlib}.rlib\" \"<sysroot>\\lib\\ustlib\\x86_64-pc-windows-msvc\\lib/{liballoc-*,librustc_std_workspace_core-*,libcore-*,libcompiler_builtins-*}.rlib\" \"kernel32.lib\" \"/defaultlib:msvcrt\" \"/NXCOMPAT\" \"/OUT:D:\\a\\basm-rs\\basm-rs\\target\\x86_64-pc-windows-msvc\\debug\\deps\\basm.exe\" \"/OPT:NOREF,NOICF\" \"/DEBUG\" \"/PDBALTPATH:%_PDB%\" \"/NATVIS:<sysroot>\\lib\\ustlib\\etc\\intrinsic.natvis\" \"/NATVIS:<sysroot>\\lib\\ustlib\\etc\\liballoc.natvis\" \"/NATVIS:<sysroot>\\lib\\ustlib\\etc\\libcore.natvis\" \"/NATVIS:<sysroot>\\lib\\ustlib\\etc\\libstd.natvis\" \"/SUBSYSTEM:CONSOLE\" \"/NODEFAULTLIB\" \"/DYNAMICBASE\" \"/ENTRY:_basm_start\" \"/NXCOMPAT:NO\" \"/STACK:268435456\" \"/EMITTOOLVERSIONINFO:NO\" \"/EMITPOGOPHASEINFO\"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: LINK : warning LNK4216: Exported entry point _basm_start
Creating library D:\a\basm-rs\basm-rs\target\x86_64-pc-windows-msvc\debug\deps\basm.lib and object D:\a\basm-rs\basm-rs\target\x86_64-pc-windows-msvc\debug\deps\basm.exp
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.2d78w7yq39aio618eu29n502q.rcgu.o) : error LNK2001: unresolved external symbol memset
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.8mxgkpuy6eljjccapmv5glh9y.rcgu.o) : error LNK2001: unresolved external symbol memset
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.2e9hbj5zjzej5yoo4fu21vxtv.rcgu.o) : error LNK2001: unresolved external symbol memset
libcore-b522dd968c06714e.rlib(core-b522dd968c06714e.core.edc02a3bf6895602-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memset
basm.9g5xzwdjyxd5pguzsqqvp1u28.rcgu.o : error LNK2001: unresolved external symbol memset
basm.ej25b0acf8kdeqne13ab4e3tg.rcgu.o : error LNK2001: unresolved external symbol memset
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.21coi540lkxfaa98dxwpief3l.rcgu.o) : error LNK2001: unresolved external symbol memset
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.6hgz425wf1ayywi5fv5zoeppv.rcgu.o) : error LNK2001: unresolved external symbol memset
liballoc-e4bc1996f9879934.rlib(alloc-e4bc1996f9879934.alloc.e6877761d14c58d1-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libcore-b522dd968c06714e.rlib(core-b522dd968c06714e.core.edc02a3bf6895602-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.5zm4u3b7fw5pph8duhnwpp6sy.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.2e9hbj5zjzej5yoo4fu21vxtv.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.clqiejq8kje9m36l2phy1w3p7.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.3vz9srzewsp7rhgzgwnlscjyp.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.4a4k385dn4e64jekc5mql1bvs.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.1bhgywgafx4gek4bizurc869q.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.8mxgkpuy6eljjccapmv5glh9y.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.4mpf37xghynf3g95v9jum0jua.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.2d78w7yq39aio618eu29n502q.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.bxi98gwkuewj2h7gu80p7ilhj.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.13w32kxokxkxyhh2n5kpvrakm.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.1jxwkrjvpwz2q2r6atshltkax.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.21coi540lkxfaa98dxwpief3l.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.7w49ql5si9b0bo5czy3vd3fp6.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.05gcffme57m7trw63ywnai9vp.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.6hgz425wf1ayywi5fv5zoeppv.rcgu.o) : error LNK2001: unresolved external symbol memcpy
basm.9g5xzwdjyxd5pguzsqqvp1u28.rcgu.o : error LNK2001: unresolved external symbol memcpy
basm.cmnxgaonqn55yzn8blh7dmqx0.rcgu.o : error LNK2001: unresolved external symbol memcpy
basm.ej25b0acf8kdeqne13ab4e3tg.rcgu.o : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.d039nxxqg81e8ll6x542f66xx.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libbasm_std-e50feab6cac5330a.rlib(basm_std-e50feab6cac5330a.4a4k385dn4e64jekc5mql1bvs.rcgu.o) : error LNK2019: unresolved external symbol memmove referenced in function _ZN5alloc11collections9vec_deque21VecDeque$LT$T$C$A$GT$24handle_capacity_increase17h8b4f648ad63441e0E
liballoc-e4bc1996f9879934.rlib(alloc-e4bc1996f9879934.alloc.e6877761d14c58d1-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memmove
liballoc-e4bc1996f9879934.rlib(alloc-e4bc1996f9879934.alloc.e6877761d14c58d1-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol strlen referenced in function _ZN5alloc3ffi5c_str7CString8from_raw17h6b22e763d8c0a09cE
libcore-b522dd968c06714e.rlib(core-b522dd968c06714e.core.edc02a3bf6895602-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol memcmp referenced in function _ZN4core3str7pattern11StrSearcher3new17h9aededd987e99d14E
D:\a\basm-rs\basm-rs\target\x86_64-pc-windows-msvc\debug\deps\basm.exe : fatal error LNK1120: 5 unresolved externals
Linker error on Linux x64
error: linking with `cc` failed: exit status: 1
|
= note: \"cc\" \"-Wl,--version-script=/tmp/rustclFz4Fk/list\" \"-Wl,--no-undefined-version\" \"-m64\" \"/tmp/rustclFz4Fk/symbols.o\" \"<20 object files omitted>\" \"-Wl,--as-needed\" \"-Wl,-Bstatic\" \"/home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/{libbasm_std-1acb57257a97f135.rlib,libryu-bd5489fc747e1497.rlib,liblibm-5e8cfbe847b175e2.rlib}.rlib\" \"<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{liballoc-*,librustc_std_workspace_core-*,libcore-*,libcompiler_builtins-*}.rlib\" \"-Wl,-Bdynamic\" \"-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld\" \"-fuse-ld=lld\" \"-Wl,--eh-frame-hdr\" \"-Wl,-z,noexecstack\" \"-L\" \"<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib\" \"-o\" \"/home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/basm-65a3de73172c3759\" \"-Wl,--no-gc-sections\" \"-pie\" \"-Wl,-z,relro,-z,now\" \"-nodefaultlibs\" \"-nostartfiles\" \"-nostdlib\" \"-static-pie\" \"-fno-exceptions\" \"-fno-asynchronous-unwind-tables\" \"-fno-unwind-tables\" \"-fno-stack-protector\" \"-fno-plt\" \"-Wl,--entry=_basm_start,--build-id=none,--gc-sections,--export-dynamic,--no-eh-frame-hdr,-z,norelro\"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: rust-lld: error: undefined symbol: memset
>>> referenced by writer.rs:116 (basm-std/src/platform/io/writer.rs:116)
>>> /home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/basm-65a3de73172c3759.6h36ab66ebuo091kns7g1lspd.rcgu.o:(basm_std::platform::io::writer::Writer$LT$_$GT$::new::h5e1d045719356f57)
>>> referenced by writer.rs:302 (basm-std/src/platform/io/writer.rs:302)
>>> /home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/basm-65a3de73172c3759.6h36ab66ebuo091kns7g1lspd.rcgu.o:(basm_std::platform::io::writer::Writer$LT$_$GT$::u64::h40db478c2d0af0ea)
>>> referenced by writer.rs:303 (basm-std/src/platform/io/writer.rs:303)
>>> /home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/basm-65a3de73172c3759.6h36ab66ebuo091kns7g1lspd.rcgu.o:(basm_std::platform::io::writer::Writer$LT$_$GT$::u64::h40db478c2d0af0ea)
>>> referenced 5 more times
rust-lld: error: undefined symbol: memcpy
>>> referenced by writer.rs:115 (basm-std/src/platform/io/writer.rs:115)
>>> /home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/basm-65a3de73172c3759.6h36ab66ebuo091kns7g1lspd.rcgu.o:(basm_std::platform::io::writer::Writer$LT$_$GT$::new::h5e1d045719356f57)
>>> referenced by mod.rs:3594 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:3594)
>>> basm_std-1acb57257a97f135.5gkonddl664c9rz6m85dkzhrb.rcgu.o:(alloc::vec::Vec$LT$T$C$A$GT$::append_elements::h074461469b673f76) in archive /home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/libbasm_std-1acb57257a97f135.rlib
>>> referenced by mod.rs:3594 (/home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:3594)
>>> basm_std-1acb57257a97f135.8ju6k4gh4r2sxl5p2ta3jlwdn.rcgu.o:(alloc::alloc::Global::grow_impl::h17fbfe5bd8679995) in archive /home/runner/work/basm-rs/basm-rs/target/x86_64-unknown-linux-gnu/debug/deps/libbasm_std-1acb57257a97f135.rlib
>>> referenced 13 more times
collect2: error: ld returned 1 exit status
Version it worked on
It most recently worked on: nightly-2025-02-23
Version with regression
rustc --version --verbose:
rustc 1.87.0-nightly (287487624 2025-02-28)
binary: rustc
commit-hash: 287487624357c19b22d27aa3ed584b8ccd080b4d
commit-date: 2025-02-28
host: x86_64-pc-windows-msvc
release: 1.87.0-nightly
LLVM version: 20.1.0
Output of cargo-bisect-rustc
searched nightlies: from nightly-2025-02-20 to nightly-2025-02-28
regressed nightly: nightly-2025-02-24
searched commit range: 46420c9...f8a913b
regressed commit: bca5f37
bisected with cargo-bisect-rustc v0.6.7
Host triple: x86_64-pc-windows-msvc
Reproduce with:
cargo bisect-rustc --end=2025-02-28
Activity
tgross35 commentedon Mar 1, 2025
Thanks for bisecting already. I don't think the compiler changes in #135501 should have affected Cargo features at all since that only affects when the already-built compiler-builtins crate gets injected; however, I am wondering whether the changes from public to private in Cargo.toml may have changed the way features get are getting enabled. Cc @rust-lang/cargo in case anybody knows of some behavior differences here.
Are you able to build rustc? That theory can probably be tested by reverting 8c1b49d (Use
public-dependenciesin all sysroot crates) which shouldn't affect anything else.Separately, it may be useful if you can post the output ofnevermind, that part is reasonably straightforward.nm -gC libcompiler_builtins-hash.rlibfor that target (just search forlibcompiler_builtinsin the rustc sysroot to get the right file) to see what exactly the story is for available symbols.saethlin commentedon Mar 1, 2025
Why is this relevant? Maybe you know something about basm that I don't know, but AFAIK the problem is this:
https://github.com/boj-rs/basm-rs/blob/2e3799d684b6fc3f9db672b8f077966c5ee04541/basm/Cargo.toml#L32-L45
I was previously advised by t-libs that adding a Cargo dependency on the published compiler-builtins is not a use of the library that is supported, and indeed I ran into many strange linkage and crate resolution issues when I was trying to do that.
byeongkeunahn commentedon Mar 1, 2025
I'm not familiar with building rustc, I'll give it a try when I have time. Thanks for the suggestion :)
I appreciate that this is not an intended use case. However, in that case, the issue is that the linking error persists when the compiler-builtins dependency is removed from Cargo.toml. If I recall correctly, the compiler-builtins dependency was added a few years ago to resolve the same linker error regarding undefined external symbols (memcpy/memset/strlen).
tgross35 commentedon Mar 1, 2025
I know nothing about basm but the original post says:
I assumed this meant they were still seeing a regression across the versions even if they removed the
compiler_builtinsdependency. Why that project has the dependency in the first place, I have no idea.(But yeah, we need to do something about compiler-builtins on crates.io once we understand whether there are any remaining legitimate usecases, syncs have me very pretty of that not being a submodule/tree anyway. On my eventual todo list...)
tgross35 commentedon Mar 1, 2025
It's reasonably easy,
./x build --stage 1, then run the commands from https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#creating-a-rustup-toolchain so you cancargo +stage1 build .... The rest of page has more details.If you can reproduce this with a smaller crate, I'll also try to take a closer look over the weekend.
byeongkeunahn commentedon Mar 1, 2025
I've constructed a minimized version which runs on x64 Windows only. It is set to use nightly-2025-02-23. Any of the following changes will make
cargo runfail with linker errors:rustflags = ["-C", "target-cpu=haswell"]in.cargo/config.tomlis removedFurthermore, while the minimized version does not have issues with
cargo run --release, the original (full) repo still fails with linker errors.Please find the minimal example below.
basm-rs-minimal-example.zip
It is possible that I might be using the
no-stdfeature incorrectly. Please let me know if that is the case.bjorn3 commentedon Mar 1, 2025
Does it work if you keep the compiler-builtins dependency with the mem feature enabled but add
extern crate compiler_builtins;to your source code?byeongkeunahn commentedon Mar 1, 2025
Oh yes, that seems to work on nightly-2025-02-24 and afterwards. More precisely, the following works:
However, when the order is reversed, linking error persists:
I've observed the same tendency in both the minimal example and the original repo.
Unfortunately,
cargo fmt(which we check for on CI) prefers the latter ordering.tgross35 commentedon Mar 1, 2025
I'm guessing the difference is that with the first version and before #135501, the crates.io version built with
memgets picked up and I think you wind up with both in the graph. But with the second version it's gettingcompiler_builtinsfromalloc's graph first (which is the sysroot version withoutmem) and so it doesn't addcompiler_builtinsagain due to the check atrust/compiler/rustc_metadata/src/creader.rs
Lines 1124 to 1131 in 8c39296
RUSTC_LOG=rustc_metadata::creader=infoand comparing the output between the two.Removing
target-cpu=haswelland running with or without--releaseprobably just changes codegen such that the missing symbols are sometimes needed at all. This could also be looking at your crate's.rlibbefore link with the different flag combinations and seeing whether or not there is an undefined symbolmemcpy(I think the Windows equivalent ofnmto check this isdumpbin?).Why are you passing
/NODEFAULTLIBin build.rs? I'm assuming this is why it isn't just using the system's library. We don't distributecompiler_builtinswith thememfeature on Windows to avoid conflicting with the system libs.byeongkeunahn commentedon Mar 2, 2025
It was to reduce the binary size whenever possible. Nevertheless, the linker error pattern doesn't change even if /NODEFAULTLIB is removed.
basm-rs-minimal-example-v2.zip
tgross35 commentedon Mar 2, 2025
Reduced:
With
rustc src\lib.rs -Cpanic=abort -C link-arg=/SUBSYSTEM:CONSOLE -C link-arg=/ENTRY:_basm_start, the same symbols are missing (memcpy,memset,memmoveetc).Run with
RUSTC_LOG=rustc_metadata::creader=infomakes it pretty clear that after #135501, a non-sysrootcompiler_builtinsdoesn't get into the crate graph unless added early withextern crate compiler_builtins, but for older versions it allowed duplicates. It is possible to adjust that part of resolution to allow >1compiler_builtinscrate (by deleting the block I linked above).I am hesitant to do that though because the current behavior is generally preferable; we want to discourage direct use of
compiler_builtins, and enabling multiple versions to be linked is an absolute disaster waiting to happen (E.g. we recently changed the function signatures on our i128 overflowing multiplication symbols).I'm not sure what a better solution is, however. Maybe it's easiest to enable
memin the distributed version on Windows and make the symbols weak? We do this for other symbols, with a caveat that I think this doesn't work for windows-gnu.Cc @ChrisDenton, do you have any ideas?
byeongkeunahn commentedon Mar 2, 2025
Thank you for the detailed analysis. One thing I'd like to note is that the linker error also occurs on Linux, not just Windows. The error message on Linux can be found at the beginning of this issue thread. The reason I limited the above example to Windows was simply to minimize the amount of code.
tgross35 commentedon Mar 2, 2025
Ah, I thought we were providing the symbols on Unix because weak linkage works well, but I guess bootstrap only sets this for no_std targets
rust/src/bootstrap/src/core/build_steps/compile.rs
Line 601 in 1c3b035
[-]no-std build fails on Windows/Linux x64[/-][+]`compiler_builtins` `string.h` functions are not available when using `std` targets with `#![no_std]`[/+]landaire commentedon Mar 28, 2025
I'm unsure if this is related, but I also hit this issue and after using the
extern crateworkaround mentioned above hit a different issue:Linker Error
error: linking with `link.exe` failed: exit code: 1120 | = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NODEFAULTLIB" "C:\\Users\\lander\\AppData\\Local\\Temp\\rustcsrdZhG\\symbols.o" "<1 object files omitted>" "C:\\Users\\lander\\dev\\solstice\\crates\\shellcode_stage1_network\\target\\x86_64-pc-windows-msvc\\release\\deps/{libcompiler_builtins-b938875b878c1ff4.rlib}.rlib" "C:\\Users\\lander\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\windows_x86_64_msvc-0.52.6\\lib\\windows.0.52.0.lib" "/defaultlib:msvcrt" "/NXCOMPAT" "/LIBPATH:C:\\Users\\lander\\.cargo\\registry\\src\\index.crates.io-1949cf8c6b5b557f\\windows_x86_64_msvc-0.52.6\\lib" "/OUT:C:\\Users\\lander\\dev\\solstice\\crates\\shellcode_stage1_network\\target\\x86_64-pc-windows-msvc\\release\\deps\\shellcode_stage1_network.exe" "/OPT:REF,ICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/NATVIS:\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:\\lib\\rustlib\\etc\\libstd.natvis" "/ENTRY:main" "/MERGE:.edata=.rdata" "/MERGE:.rustc=.data" "/MERGE:.rdata=.text" "/MERGE:.pdata=.text" "/DEBUG:NONE" "/EMITPOGOPHASEINFO" = note: some arguments are omitted. use `--verbose` to show all linker arguments = note: libcompiler_builtins-b938875b878c1ff4.rlib(compiler_builtins-b938875b878c1ff4.compiler_builtins.c7542ed34b4d2950-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol fmaf referenced in function _ZN83_$LT$f32$u20$as$u20$compiler_builtins..math..libm..support..float_traits..Float$GT$3fma17hb07370d428c712a6E␍ libcompiler_builtins-b938875b878c1ff4.rlib(compiler_builtins-b938875b878c1ff4.compiler_builtins.c7542ed34b4d2950-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol fma referenced in function _ZN83_$LT$f64$u20$as$u20$compiler_builtins..math..libm..support..float_traits..Float$GT$3fma17h158ba5f14d8cf5fbE␍ C:\Users\lander\dev\solstice\crates\shellcode_stage1_network\target\x86_64-pc-windows-msvc\release\deps\shellcode_stage1_network.exe : fatal error LNK1120: 2 unresolved externals␍I may have missed something but I couldn't really find any other recent similar issues in
compiler_builtinsor this repo.The failing project is here (note: I have not pushed changes yet for the
extern crateworkaround and a different issue that surfaced by upgradingnightly): https://github.com/exploits-forsale/solstice/blob/main/crates/shellcode_stage1_network/Cargo.tomltgross35 commentedon Apr 1, 2025
@landaire that shouldn't be related to the change here, mind opening a new issue?