Skip to content

Use PythonLibs (cmake) - #56

Merged
TallJimbo merged 2 commits into
ndarray:masterfrom
termoshtt:cmake_pythonlib
Jun 26, 2016
Merged

TallJimbo merged 2 commits into
ndarray:masterfrom
termoshtt:cmake_pythonlib

Conversation

@termoshtt

Copy link
Copy Markdown
Contributor

This project cannot be compiled by cmake in Python3 environment since cmake cannot find the shared library such as libpython3.5m.so.
It is caused by libs/numpy/cmake/FindPythonLibsNew.cmake, which was copied from numexpr project:
https://github.com/pydata/numexpr/blob/master/FindPythonLibsNew.cmake
As argued on the issue pydata/numexpr#102 ,
this is because the shared library has additional suffix "m".
This bug has been fixed in the numexpr project, but it has not been copied yet.
Indeed, when I copy it, I can build in Python3 env.
And I also confirm that I can build with FindPythonLibs.cmake, which is supplied by the official cmake package.
So I propose to use FindPythonLIbs.cmake instead.

I apologize that this PR should be included in the previous one #39 .

@dgolden1

Copy link
Copy Markdown

👍 I confirm that this PR fixes cmake build problems that I was having using Anaconda Python 3.5.1 on OS X.

Thank you, @termoshtt !

This is the error I was getting before this PR after running make:

make[2]: *** No rule to make target `/Users/dgolden/anaconda3/lib/libpython3.5.dylib', needed by `lib/libboost_numpy.dylib'.  Stop.
make[1]: *** [libs/numpy/src/CMakeFiles/boost_numpy.dir/all] Error 2
make: *** [all] Error 2

@TallJimbo
TallJimbo merged commit 5dd9963 into ndarray:master Jun 26, 2016
@termoshtt
termoshtt deleted the cmake_pythonlib branch June 27, 2016 09:17
@termoshtt termoshtt mentioned this pull request Dec 1, 2016
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