-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Python 3.14.0-beta.1 C-extension builds try to link against python314t.lib
on non-threaded python
#133779
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
Comments
Sorry, but reading the report on GH like this is not possible. Would it be possible to attach a log file instead? TiA |
Sorry I forgot to triple-quote it. But I can certainly also provide a text file. |
Now it's more readable, no need for a text file! |
cc @zooba as the Windows expert |
Ah, that stupid generated header file again. If you define I think GitHub just use our old installer and so probably it's gotten mixed up with the builds again. Do we know whether build backends have learned to set the variable explicitly yet? If they have, I'll just pull out the attempt to generate headers, since it causes way more bugs than it solves. |
Can we manually generate or fix a functioning header file? If not, would it be possible to release a new beta soon? Beta 1 is unfortunately unusable on Windows. |
Manually removing |
I tried that in mhammond/pywin32@aedcff9 and now even 3.13 fails: https://github.com/mhammond/pywin32/actions/runs/14946775119/job/41991104423?pr=2605 |
Lines 321 to 337 in 13c94d0
The line Lines 97 to 103 in 13c94d0
|
I'm facing the same issue that the linker tries to link the free-threading library on Windows.
-- Use Python_INCLUDE_DIR: "C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include"
-- Use Python_INCLUDE_DIRS: "C:\hostedtoolcache\windows\Python\3.14.0-beta.1\x64\Include"
-- Use Python_LIBRARY: ""
-- Use Python_LIBRARIES: "C:/hostedtoolcache/windows/Python/3.14.0-beta.1/x64/libs/python314.lib"
-- Use PYTHON_MODULE_DEBUG_POSTFIX: ""
-- Use PYTHON_MODULE_EXTENSION: ".cp314-win_amd64.pyd"
-- Use PYTHON_IS_DEBUG: "0"
-- Use SETUPTOOLS_EXT_SUFFIX: ""
...
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(1395,5): warning MSB8012: TargetPath(C:\Users\RUNNER~1\AppData\Local\Temp\tmpz9ioy6q0.build-lib\optree\_C.cp314-win_amd64.pyd) does not match the Linker's OutputFile property value (C:\Users\RUNNER~1\AppData\Local\Temp\tmpz9ioy6q0.build-lib\optree\_C.cp314-win_amd64.pyd). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). [C:\Users\RUNNER~1\AppData\Local\Temp\tmp64dnsk0o.build-temp\Release\src\_C.vcxproj]
LINK : fatal error LNK1104: cannot open file 'python314t.lib' [C:\Users\RUNNER~1\AppData\Local\Temp\tmp64dnsk0o.build-temp\Release\src\_C.vcxproj]
error: command 'C:\\Program Files\\CMake\\bin\\cmake.EXE' failed with exit code 1
-- Use Python_INCLUDE_DIR: "C:\Users\runneradmin\.pyenv\pyenv-win\versions\3.14.0b1\Include"
-- Use Python_INCLUDE_DIRS: "C:\Users\runneradmin\.pyenv\pyenv-win\versions\3.14.0b1\Include"
-- Use Python_LIBRARY: ""
-- Use Python_LIBRARIES: "optimized;C:/Users/runneradmin/.pyenv/pyenv-win/versions/3.14.0b1/libs/python314.lib;debug;C:/Users/runneradmin/.pyenv/pyenv-win/versions/3.14.0b1/libs/python314_d.lib"
-- Use PYTHON_MODULE_DEBUG_POSTFIX: "_d"
-- Use PYTHON_MODULE_EXTENSION: ".cp314-win_amd64.pyd"
-- Use PYTHON_IS_DEBUG: "1"
-- Use SETUPTOOLS_EXT_SUFFIX: ""
...
LINK : fatal error LNK1104: cannot open file 'python314t_d.lib' [C:\Users\runneradmin\AppData\Local\Temp\tmpnmv2w89v.build-temp\Release\src\_C.vcxproj]
error: command 'C:\\Program Files\\CMake\\bin\\cmake.EXE' failed with exit code 1
|
3.14.0b1 is confused about -t vs non-t: python/cpython#133779
python314t.lib
on non-threaded pythonpython314t.lib
on non-threaded python
Ah, very good catch. That condition needs to be fixed (or more likely, we need to just drop @hugovk for consideration of the beta2 timeline, since people are requesting an expedited update (and my suggested workaround doesn't actually work). |
…to a static header. This means that extension builders will need to specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
Turns out we couldn't just fix the condition (all the other conditions also use |
…tatic header. (GH-133966) Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds. This was usually the case already, but this change guarantees it in all circumstances.
…to a static header. (pythonGH-133966) Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds. This was usually the case already, but this change guarantees it in all circumstances.
… to a static header. (GH-133966) Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds. This was usually the case already, but this change guarantees it in all circumstances.
This change led to a break in the JIT regen script, which @brandtbucher is looking at. I assume that's covered by a new issue and we can close this one. |
…GH-134349) (cherry picked from commit 7ad9046) Co-authored-by: Brandt Bucher <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
I'm completely unsure where the issue stems from (it could be setuptools, https://github.com/actions/setup-python, an actual issue in the first beta, or due to one of pywin32's numerous build hacks which I've been reducing over the years). But since
https://discuss.python.org/t/python-3-14-0-beta-1-is-here/91117 mentions
And this wasn't happening in alphas, and now does with the first beta. I figured I may as well take a note here.
Mostly copied from pypa/setuptools#4988:
Ever since the Python 3.14 beta 1, pywin32's 3.14 dev builds have started failing. It was working fine in alphas.
Here's the full log: https://github.com/mhammond/pywin32/actions/runs/14912683012/job/41890682321?pr=2582
github build log.txt
Of interest is the following line:
LINK : fatal error LNK1104: cannot open file 'python314t.lib'
. I don't understand wherepython314t.lib
comes from. Or how to go about debugging/investigating this.Relevant build files:
CPython versions tested on:
3.14
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: