Skip to content
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

python3-dev required? #3

Closed
sloretz opened this issue Nov 3, 2020 · 3 comments
Closed

python3-dev required? #3

sloretz opened this issue Nov 3, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@sloretz
Copy link
Contributor

sloretz commented Nov 3, 2020

While building this on bionic I saw an error building launch_testing_ament_cmake

--- stderr: launch_testing_ament_cmake                                                                                                                                                            
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
  (Required is at least version "3.5")
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindPythonLibs.cmake:262 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /ros2_rolling/install/python_cmake_module/share/python_cmake_module/cmake/Modules/FindPythonExtra.cmake:133 (find_package)
  CMakeLists.txt:29 (find_package)


---
Failed   <<< launch_testing_ament_cmake [4.30s, exited with code 1]

It depends on python_cmake_module, but this repo REQUIREs PythonLibs to be found

find_package(PythonLibs 3.5 REQUIRED)

Maybe this package should depend on python3-dev? Or maybe launch_testing_ament_cmake should depend on python3-dev?

@sloretz sloretz added the bug Something isn't working label Nov 3, 2020
@clalancette
Copy link
Contributor

There are actually two parts to this:

  1. What provides the FindPythonLibs.cmake file
  2. What provides the python libraries to be found

For the first one, it looks like that on Ubuntu, the package cmake-data provides FindPythonLibs.cmake. I think we typically assume that that is installed, so I think we can ignore that one here.

For the second one, it looks like the actual package that installs Python.h and /usr/lib/x86_64-linux-gnu/libpython3.8.so (at least on Ubuntu 20.04) is the libpython3.8-dev package. This in turn is depended on by python3.8-dev, which is depended on by python3-dev. This same pattern holds for Ubuntu 18.04 as well. On Fedora, the situation is a bit simpler in that python3-devel just contains the header files needed.

So that's the long way of saying that I agree with you; any place that calls find_package(PythonLibs) should depend on the python3-dev rosdep key. And since this is one of those places, I think this package should be the one to depend on it.

@mikaelarguedas
Copy link
Member

Shouldnt that be covered by

<buildtool_export_depend>python3-dev</buildtool_export_depend>
?

If I had to guess the issue comes from the fact that you used rosdep to install your dependencies and that this fix ros-infrastructure/rosdep#753 still hasnt been released.

@sloretz
Copy link
Contributor Author

sloretz commented Nov 4, 2020

If I had to guess the issue comes from the fact that you used rosdep to install your dependencies and that this fix ros-infrastructure/rosdep#753 still hasnt been released.

That's 100% what happened. Thanks for pointing that out! Looks like there's nothing to fix in this repo so I'll close this.

@sloretz sloretz closed this as completed Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants