-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[boost] [boost-mpi] [boost-python] Boost does not build for iOS, and probably Android as well #21474
Description
Is your feature request related to a problem? Please describe.
The problem is about Boost.Python not being able to build for iOS, and probably Android as well. It brings in Python3 as a dependency and that can only be built for the host OS.
Proposed solution
The solution is to exclude iOS (and Android) in 3 places - the Boost main manifest, the Boost.MPI manifest, both for dependencies, and finally in the Boost.Python manifest for supported platforms. Here are the relevant changes:
Boost (line 144) and Boost.MPI (line 27) dependencies in vcpkg.json:
{
"name": "boost-python",
"platform": "!uwp & !(arm & windows) & !emscripten & !ios & !android"
},
Boost.Python supported platforms (line 7) in vcpkg.json:
"supports": "!uwp & !(arm & windows) & !emscripten & !ios & !android",
Describe alternatives you've considered
Currently using a private vcpkg registry with the modified Boost manifests. This results in successful iOS builds using vcpkg.
The check could list supported platforms explicitly instead of excluding unsupported platforms as they are found. E.g.:
"windows & !arm & !uwp | linux | osx"
Additional context
I have an open issue with the details of how Python3 fails to build for iOS. I doubt it's of much use since Python3 shouldn't be built for iOS in the first place, but here it is for reference: #20214
A similar fix can be applied to the Python3 vcpkg.json manifest (line 6) as well:
"supports": "!(arm | uwp | emscripten | ios | android)",
I notice the ARM condition here is not only about Windows, no idea how does that affect modern Apple Mac hardware since the new Macs now use ARM MacOS. It's a separate issue from my problem, but whoever is addressing may want to revisit it.