-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rust stable 1.78 using 'x86_64-pc-windows-gnu' host tool to build 'thumbv7em-none-eabihf' arm bare metal target got rust-lld failed #125809
Comments
Those libraries are provided alongside other Rust binaries:
Note
I rust-lld should be called with PATH set to |
I have tested using clean rust host toolchain installed by rustinit, and just build cortex-m-quickstart, then it reproduce the problem. |
searched nightlies: from nightly-2024-02-01 to nightly-2024-03-16 bisected with cargo-bisect-rustc v0.6.8Host triple: x86_64-pc-windows-gnu cargo bisect-rustc --start=1.77.0 --end=1.78.0 --target thumbv7m-none-eabi --prompt -c rust-mingw --preserve --script C:/Program Files/Git/usr/bin/bash.exe -- ./test.sh Won't be as easy to debug as I hoped. EDIT: perhaps rust-lang/cargo#13468? |
If I understand correctly, when @mati865 is it possible for you to add Also, could you check if rustc appends host tool bin to |
Would you mind sharing the output of |
Thought it might be important to add; all my tests were made with only
Yes, but apparently it's not in
Adding that env makes no difference:
I can do some builds during the weekend.
Judging from that code, it only adds |
My fault. Should be |
Oh, I had missed that too 😄 |
I set RUSTUP_WINDOWS_PATH_ADD_BIN=1 then build works fine too |
@ehuss do you have any thought on this? Should we revert rust-lang/cargo#13468 or should rustc do something else instead? |
Another option would be to add it to the end of |
@weihanglo I guess msvc works because it's required dlls has been installed by Windows OS or MSVC build tool |
@ChrisDenton are you talking about a fix in cargo or rustc? |
Runtime libraries are located alongside rustc, so invoking it directly would work fine. |
This would be my inclination that rustc ensures that it has the PATH set up correctly. We just need to make sure that things like rust-lang/cargo#8531 and rust-lang/rustup#3036 don't regress again. I suspect adding the |
…s-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809
…s-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809
…s-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809
I'm solving this now in my PR #128876 by shipping the required runtime DLLs along with |
…s-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809
…s-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809
…s, r=<try> Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809 try-job: dist-x86_64-mingw
…lls, r=Kobzol,petrochenkov,jieyouxu Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809 try-job: dist-x86_64-mingw
…lls, r=Kobzol,petrochenkov,jieyouxu Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809 try-job: dist-x86_64-mingw
Rollup merge of rust-lang#128876 - ColinFinck:rust-lld-with-runtime-dlls, r=Kobzol,petrochenkov,jieyouxu Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: rust-lang/rustup@ce3c09a Fixes rust-lang#125809 try-job: dist-x86_64-mingw
Failed reason is can't find 'libgcc_s_seh-1.dll' and 'libwinpthread-1.dll'
when fallback to 1.77.2 or using 'x86_64-pc-windows-msvc' host tool then every thing is ok
The text was updated successfully, but these errors were encountered: