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

Windows GNU Toolchain doesn't find gcc anymore #42422

Closed
CryZe opened this issue Jun 4, 2017 · 6 comments
Closed

Windows GNU Toolchain doesn't find gcc anymore #42422

CryZe opened this issue Jun 4, 2017 · 6 comments
Assignees
Labels
O-windows-gnu Toolchain: GNU, Operating system: Windows regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.

Comments

@CryZe
Copy link
Contributor

CryZe commented Jun 4, 2017

Starting with rustc 1.19.0-nightly (6684d176c 2017-06-03) the compiler is not able to find gcc anymore when targeting x86_64-pc-windows-gnu, at least on AppVeyor.

  Compiling odds v0.2.25
   Compiling itoa v0.3.1
   Compiling quote v0.2.3
   Compiling color_quant v1.0.0
   Compiling winapi-build v0.1.1
   Compiling lzw v0.10.0
   Compiling libc v0.2.23
   Compiling num_cpus v1.5.1
   Compiling deque v0.3.2
   Compiling scoped_threadpool v0.1.7
   Compiling rayon-core v1.0.2
error: could not exec the linker `gcc`: The system cannot find the file specified. (os error 2)
  |
  = note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-nostdlib" "-m64" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\crt2.o" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "-L" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "C:\\projects\\livesplit-core\\target\\debug\\build\\rayon-core-c51968ef174e14dd\\build_script_build-c51968ef174e14dd.0.o" "-o" "C:\\projects\\livesplit-core\\target\\debug\\build\\rayon-core-c51968ef174e14dd\\build_script_build-c51968ef174e14dd.exe" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "C:\\projects\\livesplit-core\\target\\debug\\deps" "-L" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-5a958d157a8d8d98.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librand-ce86047000b56785.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcollections-b8b9a576d130e244.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd_unicode-9fbe5d3bbc85c563.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-14e8bb7ca07ebf2c.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-a4bc20050f473f79.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-892bd58ec617c3bd.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-b9c9173c47c20c41.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc_system-141f235246f01712.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-3a6338503b91076c.rlib" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-e9e280acad4314a4.rlib" "-Wl,-Bdynamic" "-l" "advapi32" "-l" "ws2_32" "-l" "userenv" "-l" "shell32" "-Wl,-Bstatic" "-l" "gcc_eh" "-l" "pthread" "-Wl,-Bdynamic" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "C:\\Users\\appveyor\\.rustup\\toolchains\\nightly-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"

I assume the switch to the MSVC 2017 linker could've caused this: #38584

@ollie27
Copy link
Member

ollie27 commented Jun 4, 2017

Yeah looks like #42225 caused this (cc. @brson). Specifically https://github.com/rust-lang/rust/pull/42225/files#diff-1b71e145dde424ac83e674eef22373d8L710 removed the call to command_path which was used to find gcc.

@Mark-Simulacrum Mark-Simulacrum added O-windows-gnu Toolchain: GNU, Operating system: Windows regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Jun 4, 2017
@brson
Copy link
Contributor

brson commented Jun 5, 2017

I'll look into this tomorrow.

@brson brson self-assigned this Jun 5, 2017
@brson
Copy link
Contributor

brson commented Jun 6, 2017

I've got a patch, but so far having a hard time producing the proper compiler locally to test.

@CryZe
Copy link
Contributor Author

CryZe commented Jun 8, 2017

And now it's a beta regression too, so the fix needs to be backported.

bors added a commit that referenced this issue Jun 8, 2017
Fix setting PATH during linkage on windows-gnu

This makes the behavior almost exactly the same as before the VS2017 patch, except that on MSVC builds the host bin path is no longer added to PATH. I am not sure that's actually necessary on any platform.

r? @alexcrichton

Fixes #42422
@lilianmoraru
Copy link

This didn't trickle down to beta yet.

@CryZe
Copy link
Contributor Author

CryZe commented Jun 13, 2017

Yeah, it should be in the next beta. They are bumping the beta version right now in #42609 it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows-gnu Toolchain: GNU, Operating system: Windows regression-from-stable-to-nightly Performance or correctness regression from stable to nightly.
Projects
None yet
Development

No branches or pull requests

5 participants