-
Notifications
You must be signed in to change notification settings - Fork 46
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
numpy include path not discovered on non-Ubuntu distributions #66
Comments
This is also the case on Arch with the package https://www.archlinux.org/packages/extra/x86_64/python-numpy/. It places the headers in I temporarily fixed this by creating the symbolic link @richmattes Maybe you can update the title to reflect that this affects multiple distros? |
@richmattes I definitely agree with approach 1, do you think you could get that into a PR? I would be happy to review. |
Sure, but it won't be until this weekend. Do you prefer the patch posted,
or using python to query the include path unconditionally?
…On Tue, Jul 9, 2019, 3:40 PM Michael Carroll ***@***.***> wrote:
@richmattes <https://github.com/richmattes> I definitely agree with
approach 1, do you think you could get that into a PR? I would be happy to
review.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#66?email_source=notifications&email_token=AACJWLDYDDZHSSWFOWEFIVDP6TSURA5CNFSM4H3XFPRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZRJ4UQ#issuecomment-509779538>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACJWLAG64RPE6FKGY5ZLBDP6TSURANCNFSM4H3XFPRA>
.
|
Update rosidl_generator_py to test for numpy headers exist on the python include paths, and query numpy for its include path if the headers are not found. Resolves ros2#66 Signed-off-by: Rich Mattes <[email protected]>
Update rosidl_generator_py to test for numpy headers exist on the python include paths, and query numpy for its include path if the headers are not found. Resolves ros2#66 Signed-off-by: Rich Mattes <[email protected]>
Update rosidl_generator_py to test for numpy headers exist on the python include paths, and query numpy for its include path if the headers are not found. Resolves #66 Signed-off-by: Rich Mattes <[email protected]>
Update rosidl_generator_py to test for numpy headers exist on the python include paths, and query numpy for its include path if the headers are not found. Resolves #66 Signed-off-by: Rich Mattes <[email protected]>
Update rosidl_generator_py to test for numpy headers exist on the python include paths, and query numpy for its include path if the headers are not found. Resolves #66 Signed-off-by: Rich Mattes <[email protected]>
Bug report
Required Info:
Steps to reproduce issue
Follow dashing installation instructions, with the Fedora-specific sub-page for package installation (with some edits I will PR once I get a complete build). The process can be automated using the following Dockerfile and commands.
Dockerfile:
Commands
Expected behavior
colcon build
completes without errorActual behavior
rosidl_generator_py
fails with warnings about missing numpy includes:Additional information
The issue is in
rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake
On Fedora, the numpy headers are installed to
/usr/lib64/pythonx.y/site-packages/numpy/core/include/numpy/
, and the python2-numpy package installs a symlink to the system include path:/usr/include/numpy -> /usr/lib64/python2.7/site-packages/numpy/core/include/numpy/
. On systems without the python2 version of numpy, the include path can't be resolved, and the above errors occur.It appears Debian is either installing or providing a symlink to numpy's include directory under
/usr/include/pythonx.y
, which is being added to the include path via the PythonExtra module inpython_cmake_module
, which may be why the problem doesn't occur with Debian/Ubuntu.There is some CMake code in the referenced CMake module that runs the python interpreter to get the numpy include path on APPLE and WIN32 systems.
There are a few ways to solve this. In order of my preference:
find_file
given the hint${PythonExtra_INCLUDE_DIRS}
The following diff works for conditional numpy include discovery. It prints the
Using NUMPY_INCLUDE_DIR
message with the above configuration, and doesn't print it when I symlink the numpy include dir to/usr/include/numpy
or/usr/include/python3.7m/numpy
The text was updated successfully, but these errors were encountered: