Skip to content

Linker error when building Windows wheel for free-threaded build of CPython 3.14 #2676

@tfpf

Description

@tfpf

Description

Bug

When building a 64-bit Windows wheel for an extension module for the free-threaded build of CPython 3.14 with Setuptools, the process terminates with a fatal error.

LINK : fatal error LNK1104: cannot open file 'python314.lib'
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX86\x64\link.exe' failed with exit code 1104

Replication

  • Create a basic extension module which uses Setuptools. build-backend = "setuptools.build_meta"
  • Configure cibuildwheel to build a 64-bit Windows wheel for free-threaded CPython 3.14. build = ["cp314t-*"]

I have already set up a CI pipeline as above. See tfpf/pysorteddict at 51ab1e5b1589460fdd4586696182950bd4969b61 for the code.

I tested cibuildwheel 3.1.0, 3.2.0 and 3.3.0. All three versions exhibit the described behaviour.

Expected Result

A wheel should be built.

Actual Result

A wheel was not built; the process terminated with a linker error.

Other Information

@mxmlnkn originally mentioned this bug in #2531 (comment).

Build log

https://github.com/tfpf/pysorteddict/actions/runs/19801860555/job/56730312282

CI config

https://github.com/tfpf/pysorteddict/blob/51ab1e5b1589460fdd4586696182950bd4969b61/.github/workflows/ci.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions