Skip to content

Conversation

@dg0yt
Copy link
Contributor

@dg0yt dg0yt commented Jul 22, 2025

The android toolchain links with --no-undefined. So modules must be linked with Python libs.
CMake's FindPython is unaware of it. (The situation is similar to Windows DLLs, but Windows is handled by FindPython.)
pybind11 3.0.0 added a workaround, but this stumbles over effects from vcpkg's python wrapper.
The onnx ports don't have a pybind11 feature.

@dg0yt
Copy link
Contributor Author

dg0yt commented Jul 23, 2025

Port pybind11 was updated from a 2.6.13 to 3.0.0 while I was preparing the PR.
My original fix to the python wrapper might be valid in general, but pybind 3.0.0 comes with its own fixup, unfortunately raising a different issue in vcpkg. I will revert the python change here and focus on fixing the pybind port.
I keep and extend the suggested python change: It fixes Python_add_library for Android.

@dg0yt dg0yt changed the title [pybind11] WIP [pybind11,python3,openimageio] Fix python modules on Android Jul 24, 2025
@dg0yt dg0yt marked this pull request as ready for review July 24, 2025 05:38
@vicroms vicroms merged commit 15d59ec into microsoft:master Jul 24, 2025
18 checks passed
@dg0yt dg0yt deleted the pybind11 branch July 24, 2025 19:23
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.

2 participants