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] test_distutils: fatal error LNK1158: cannot run 'rc.exe' #76148
Comments
test_distutils failed on AMD64 Windows10 3.x buildbot: http://buildbot.python.org/all/#/builders/3/builds/128 0:19:07 [165/407/1] test_distutils failed -- running: test_multiprocessing_spawn (377 sec) D:\buildarea\3.x.bolen-windows10\build\build\test_python_2228>exit 1 D:\buildarea\3.x.bolen-windows10\build\build\test_python_2228>exit 0 (...) ====================================================================== Traceback (most recent call last):
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\_msvccompiler.py", line 519, in link
self.spawn([self.linker] + ld_args)
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\_msvccompiler.py", line 542, in spawn
return super().spawn(cmd)
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\spawn.py", line 81, in _spawn_nt
"command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\tests\test_build_ext.py", line 82, in test_build_ext
cmd.run()
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\command\build_ext.py", line 558, in build_extension
target_lang=language)
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "D:\buildarea\3.x.bolen-windows10\build\lib\distutils\_msvccompiler.py", line 522, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158 |
Similar error on AMD64 Windows8 3.x: |
I don't think that it's related, but a recent change in PCbuild is: bpo-31957. IMHO it's more something that changed on the two buildbots. |
Hi David Bolen: Would you mind to look at this bug, please? thank you in advance ;-) |
This seems to correlate with my upgrading to the latest Win10 SDK on those workers (Steve pointed out I was still getting ucrt warnings during compilation). So they both jumped from like 10240 up to 16299. But that's all I changed. Interestingly I only had to fix 8.1 and 10, as 7 already had a version (15063) avoiding the warning, and it's tedious to change. But it's not experiencing the linking problem. I could swear I recall past link/rc problems, but my searching (and memory) are failing me at the moment. But I wonder if that's why I had left these two workers back at 10240, or if I had some local fix in place. |
Ok, so rc.exe appears truly not to be found when the test runs. The binary is a bit buried in the Windows Kit directory tree, and I'm guessing something is off after the upgrade (I'm not sure where it was in the tree before). I manually placed a copy in a directory I know is on the path and that seems to have resolved it. I also found a similar copy of rc.exe from the SDK to a local directory on my Windows 7 worker, so I suspect that was what I was remembering, and I probably hit the same thing when updating the SDK on that worker previously. Not sure if there's some better way it should work, but at least this resolves the issue from the SDK update - builds are currently in progress, but both workers passed test_distutils. |
The AMD64 Windows10 3.x buildbot: is green again, I close the issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: