Skip to content

FindPythonLibsNew.cmake not working with MSYS Python interpreter #1406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fteicht opened this issue May 22, 2018 · 6 comments
Closed

FindPythonLibsNew.cmake not working with MSYS Python interpreter #1406

fteicht opened this issue May 22, 2018 · 6 comments

Comments

@fteicht
Copy link

fteicht commented May 22, 2018

FindPythonLibsNew.cmake tests for windows system (CMAKE_HOST_WIN32 is true) then it assumes that the Python interpreter works with windows-like directories hierarchy (lines 141-143).
However, it does not work when using MSYS' python interpreter which assumes a Unix-like directories hierarchy.
Note that compiling python bindings with MSYS' mingw compiler requires to use MSYS' python interpreter. For instance, anaconda's interpreter's include files do not need to be compatible with MSYS' compiler due to version mismatch.

@xiaowen64
Copy link

this doesn't work on MSYS2

CMake Error at tools/FindPythonLibsNew.cmake:158 (message):
Python libraries not found
Call Stack (most recent call first):
tools/pybind11Tools.cmake:16 (find_package)
CMakeLists.txt:33 (include)

@samuelpmish
Copy link

same issue-- my underlying C++ code gets about a 2x speedup when compiling with gcc (via MinGW) versus visual studio, but I can't generate python bindings for it, because of these errors and incompatibility with MinGW.

What would need to change to support the MinGW toolchain on Windows?

@wojdyr
Copy link
Contributor

wojdyr commented Jun 10, 2019

FTR MSYS2 is now packaging patched pybind11
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-pybind11
(but it still doesn't work out of the box for me)

kanonet added a commit to kanonet/pybind11 that referenced this issue Jul 21, 2019
@wjakob
Copy link
Member

wjakob commented Jul 21, 2019

@wojdyr , @samuelpmish , @xiaowen64, @fteicht : would you be able to test @kanonet's PR #1851 and provide feedback on whether the issue is completely resolved after that?

@kanonet
Copy link
Contributor

kanonet commented Aug 4, 2019

What will happen if they do not answer? Will my fix get released? Is there anything I can do?

@wjakob wjakob closed this as completed in 640b8fe Aug 13, 2019
@wjakob
Copy link
Member

wjakob commented Aug 13, 2019

closed via #1851

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

No branches or pull requests

6 participants