Skip to content

GH-47367: [Packaging][Python] Patch vcpkg to show logs and install newer Windows SDK for vs_buildtools - #47484

Merged
pitrou merged 17 commits into
apache:mainfrom
raulcd:raul-test-vcpk-patch
Sep 8, 2025
Merged

pitrou merged 17 commits into
apache:mainfrom
raulcd:raul-test-vcpk-patch

Conversation

@raulcd

@raulcd raulcd commented Sep 3, 2025 •

Copy link
Copy Markdown
Member

Rationale for this change

Our Windows wheels have been failing for a long time with some errors finding header files:

 Python313\Lib\subprocess.py:419: CalledProcessError
---------------------------- Captured stdout call -----------------------------
Compiling extensions.pyx because it changed.
[1/1] Cythonizing extensions.pyx
Extension module: <setuptools.extension.Extension('extensions') at 0x24849772490> ['C:\\Python313\\Lib\\site-packages\\numpy\\_core\\include', 'C:\\Python313\\Lib\\site-packages\\pyarrow\\include'] ['arrow_python', 'arrow'] ['C:\\Python313\\Lib\\site-packages\\pyarrow', 'C:\\Python313\\Lib\\site-packages\\pyarrow.libs']
running build_ext
building 'extensions' extension
creating build\temp.win-amd64-cpython-313\Release
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python313\Lib\site-packages\numpy\_core\include -IC:\Python313\Lib\site-packages\pyarrow\include -IC:\Python313\include -IC:\Python313\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /EHsc /Tpextensions.cpp /Fobuild\temp.win-amd64-cpython-313\Release\extensions.obj -D_ENABLE_EXTENDED_ALIGNED_STORAGE /std:c++17
extensions.cpp
C:\Python313\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory

We also couldn't re-build our images because vcpkg was failing to build dependencies.

What changes are included in this PR?

When installing through vs_buildtools the different components we were using a deprecated Windows SDK. Installing VCTools with all recommended packages fixes both the vcpkg build and the test failures on the wheel but due to image size we have decided to only upgrade the Windows SDK at the moment.

Link to MSVC VCTools package:
https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022#desktop-development-with-c

In order to understand the vcpkg failure I patched vcpkg so it prints the build log error. Patching vcpkg is also part of the PR so it can be used in the future.

Are these changes tested?

Yes

Are there any user-facing changes?

No

@raulcd

raulcd commented Sep 3, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions github-actions Bot added the awaiting committer review Awaiting committer review label Sep 3, 2025
@github-actions

github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown

Revision: b921d55

Submitted crossbow builds: ursacomputing/crossbow @ actions-3c0d496e90

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 3, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown

Revision: 534f53c

Submitted crossbow builds: ursacomputing/crossbow @ actions-674df955f6

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 3, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown

Revision: 8722d8b

Submitted crossbow builds: ursacomputing/crossbow @ actions-3af7390a33

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 3, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown

Revision: c195369

Submitted crossbow builds: ursacomputing/crossbow @ actions-d24a423afe

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 3, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown

Revision: 652eee8

Submitted crossbow builds: ursacomputing/crossbow @ actions-2dd7b487a4

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 4, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown

Revision: 4fe33ca

Submitted crossbow builds: ursacomputing/crossbow @ actions-7c37c8ca43

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 4, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown

Revision: 03eaa11

Submitted crossbow builds: ursacomputing/crossbow @ actions-ab25aea01a

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 4, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown

Revision: 29ab183

Submitted crossbow builds: ursacomputing/crossbow @ actions-435e7b2e7f

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 4, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 4, 2025

Copy link
Copy Markdown

Revision: 9dff6f2

Submitted crossbow builds: ursacomputing/crossbow @ actions-9b8f4ceae9

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
--add Microsoft.VisualStudio.Component.Windows10SDK.20348 `
--add Microsoft.VisualStudio.Component.VC.CMake.Project `
--includeRecommended ^ `

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that https://hub.docker.com/r/apache/arrow-dev/tags?name=windows&ordering=-name have the uploaded images but no images exist...

docker compose images may show the size of built images.

BTW, I think that we should use --includeRecommended even if it increases image size. We don't want to maintain Visual Studio components...

Comment thread ci/scripts/install_vcpkg.sh Outdated
@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Sep 4, 2025
Comment thread ci/scripts/install_vcpkg.sh Outdated
@github-actions github-actions Bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting merge Awaiting merge awaiting changes Awaiting changes awaiting change review Awaiting change review labels Sep 5, 2025
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Sep 8, 2025
@raulcd raulcd changed the title GH-47367: [Packaging][Python] Patch vcpkg to show logs and install VCTools with all recommended packages with vs_buildtools GH-47367: [Packaging][Python] Patch vcpkg to show logs and install newer Windows SDK for vs_buildtools Sep 8, 2025
@raulcd

raulcd commented Sep 8, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown

Revision: 8f4de06

Submitted crossbow builds: ursacomputing/crossbow @ actions-cd5b0cfb47

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd

raulcd commented Sep 8, 2025

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit wheel-windows-cp313-cp313-amd64

@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown

Revision: 4225665

Submitted crossbow builds: ursacomputing/crossbow @ actions-ad4245e729

Task Status
wheel-windows-cp313-cp313-amd64 GitHub Actions

@raulcd
raulcd requested a review from pitrou September 8, 2025 11:11
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Sep 8, 2025

@pitrou pitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thanks a lot for doing this!!

@pitrou
pitrou merged commit 64cfa7c into apache:main Sep 8, 2025
35 of 36 checks passed
@pitrou pitrou removed the awaiting changes Awaiting changes label Sep 8, 2025
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 64cfa7c.

There weren't enough matching historic benchmark results to make a call on whether there were regressions.

The full Conbench report has more details.

zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Oct 15, 2025
…all newer Windows SDK for vs_buildtools (apache#47484)

### Rationale for this change

Our Windows wheels have been failing for a long time with some errors finding header files:
```
 Python313\Lib\subprocess.py:419: CalledProcessError
---------------------------- Captured stdout call -----------------------------
Compiling extensions.pyx because it changed.
[1/1] Cythonizing extensions.pyx
Extension module: <setuptools.extension.Extension('extensions') at 0x24849772490> ['C:\\Python313\\Lib\\site-packages\\numpy\\_core\\include', 'C:\\Python313\\Lib\\site-packages\\pyarrow\\include'] ['arrow_python', 'arrow'] ['C:\\Python313\\Lib\\site-packages\\pyarrow', 'C:\\Python313\\Lib\\site-packages\\pyarrow.libs']
running build_ext
building 'extensions' extension
creating build\temp.win-amd64-cpython-313\Release
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python313\Lib\site-packages\numpy\_core\include -IC:\Python313\Lib\site-packages\pyarrow\include -IC:\Python313\include -IC:\Python313\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /EHsc /Tpextensions.cpp /Fobuild\temp.win-amd64-cpython-313\Release\extensions.obj -D_ENABLE_EXTENDED_ALIGNED_STORAGE /std:c++17
extensions.cpp
C:\Python313\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
```

We also couldn't re-build our images because vcpkg was failing to build dependencies.

### What changes are included in this PR?

When installing through vs_buildtools the different components we were using a deprecated Windows SDK. Installing VCTools with all recommended packages fixes both the vcpkg build and the test failures on the wheel but due to image size we have decided to only upgrade the Windows SDK at the moment.

Link to MSVC VCTools package:
https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022#desktop-development-with-c

In order to understand the vcpkg failure I patched vcpkg so it prints the build log error. Patching vcpkg is also part of the PR so it can be used in the future.

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* GitHub Issue: apache#47367

Lead-authored-by: Raúl Cumplido <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Mottl pushed a commit to Mottl/arrow that referenced this pull request May 26, 2026
…all newer Windows SDK for vs_buildtools (apache#47484)

### Rationale for this change

Our Windows wheels have been failing for a long time with some errors finding header files:
```
 Python313\Lib\subprocess.py:419: CalledProcessError
---------------------------- Captured stdout call -----------------------------
Compiling extensions.pyx because it changed.
[1/1] Cythonizing extensions.pyx
Extension module: <setuptools.extension.Extension('extensions') at 0x24849772490> ['C:\\Python313\\Lib\\site-packages\\numpy\\_core\\include', 'C:\\Python313\\Lib\\site-packages\\pyarrow\\include'] ['arrow_python', 'arrow'] ['C:\\Python313\\Lib\\site-packages\\pyarrow', 'C:\\Python313\\Lib\\site-packages\\pyarrow.libs']
running build_ext
building 'extensions' extension
creating build\temp.win-amd64-cpython-313\Release
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python313\Lib\site-packages\numpy\_core\include -IC:\Python313\Lib\site-packages\pyarrow\include -IC:\Python313\include -IC:\Python313\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" /EHsc /Tpextensions.cpp /Fobuild\temp.win-amd64-cpython-313\Release\extensions.obj -D_ENABLE_EXTENDED_ALIGNED_STORAGE /std:c++17
extensions.cpp
C:\Python313\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
```

We also couldn't re-build our images because vcpkg was failing to build dependencies.

### What changes are included in this PR?

When installing through vs_buildtools the different components we were using a deprecated Windows SDK. Installing VCTools with all recommended packages fixes both the vcpkg build and the test failures on the wheel but due to image size we have decided to only upgrade the Windows SDK at the moment.

Link to MSVC VCTools package:
https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022#desktop-development-with-c

In order to understand the vcpkg failure I patched vcpkg so it prints the build log error. Patching vcpkg is also part of the PR so it can be used in the future.

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* GitHub Issue: apache#47367

Lead-authored-by: Raúl Cumplido <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants