-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cmake/catkin scripts not detecting python & numpy C/C++ header include dirs correctly #123
Comments
Hi @ahundt, have you solved this problem? |
nope, just used the hack I mention above. |
Thanks @ahundt for the pointers. Just had the same issue and the workaround works for now. You suggested cmake scripts above. Any particular reason why one would need the custom FindPythonLibs? For Kalibr adding |
No unfortunately the python + numpy scripts in CMake itself are broken to my knowledge, they make no effort to coordinate python and numpy, and thus could find python 2.7 and the numpy files for a totally different python version. Here is the bug report I submitted to CMake itself but there hasn't been any action: @NikolausDemmel perhaps you can confirm that you were able to reproduce the problem at the linked page? Often that leads to a priority bump. You can also get the files I used there. |
Thanks. The hack works for now. I am using Ubuntu 16.04. |
What do I do with the Cmake files in the link? (FindNumPy.cmake...) |
I faced the same problem and solved it in this way!Thank you! |
The build scripts incorrectly assume the location of numpy.
I suggest using the
python
andnumpy
cmake scripts in the folder linked below to solve the problem. I recently used them in a similar manner to fix the bullet3 configuration:https://github.com/bulletphysics/bullet3/tree/master/build3/cmake
I followed the setup instructions, then ran the following to debug the build:
catkin build --verbose --make-args VERBOSE=1
The problem is the numpy location is assumed, rather than correctly detected by having cmake run a python script with something like:
explanation of the above:
https://stackoverflow.com/questions/14657375/cython-fatal-error-numpy-arrayobject-h-no-such-file-or-directory
Here is my case:
I got the following error and as you can see the incorrect directory is included
-I/usr/include/python2.7
:in case others come across this my quick fix was the following, which does not solve the issue correctly since it could break other packages when they build or when using other python versions:
The text was updated successfully, but these errors were encountered: