Skip to content

Windows Architecture Problems #2701

@tobiasdiez

Description

@tobiasdiez

Description

Using the standard config (using uv-build-frontend, and meson-python as build backend):

build_wheels:
    name: Build wheels on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - ubuntu-24.04-arm
          - windows-latest
          - windows-11-arm
          - macos-15-intel
          - macos-latest
    steps:
      - uses: actions/checkout@v6
      - uses: astral-sh/setup-uv@v7
      - name: Build wheels
        uses: pypa/[email protected]
      - uses: actions/upload-artifact@v5
        with:
          name: release-wheels-${{ matrix.os }}
          path: wheelhouse/*.whl

the Windows wheels fail to build with

  • on 32-bit:
   <       Program python found: YES
  <       (D:\a\_temp\setup-uv-cache\builds-v0\.tmpnDVlI6\Scripts\python.exe)
  <       Skipping pkgconfig lookup, LIBPC is unset
  <       Need python for x86_64, but found x86
  • on ARM:
  [75/76] Linking target primecount.cp311-win_arm64.pyd
  FAILED: primecount.cp311-win_arm64.pyd 
  "c++"  -o primecount.cp311-win_arm64.pyd primecount.cp311-win_arm64.pyd.p/meson-generated_src_primecountpy_primecount.pyx.cpp.obj "-Wl,--allow-shlib-undefined" "-Wl,-O1" "-shared" "-Wl,--start-group" "-Wl,--out-implib=primecount.cp311-win_arm64.dll.a" "subprojects/primecount-8.0/liblibprimecount_static.a" "subprojects/primecount-8.0/liblibprimesieve_static.a" "C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.11.9\tools\python311.dll" "C:/mingw64/lib/gcc/x86_64-w64-mingw32/14.2.0/libgomp.dll.a" "C:/mingw64/x86_64-w64-mingw32/lib/libmingwthrd.a" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32" "-Wl,--end-group"
  C:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonarm64.3.11.9\tools\python311.dll: file not recognized: file format not recognized

It looks to me that the reason for both errors is that the Python installed via nuget has the wrong architecture.

Build log

https://github.com/dimpase/primecountpy/actions/runs/20519628156/job/58952806173?pr=29

CI config

https://github.com/dimpase/primecountpy/actions/runs/20509947760/workflow?pr=26

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