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

Add catkin_pkg as a dependency when installing from binary packages #503

Closed
minggangw opened this issue Jun 11, 2018 · 10 comments
Closed

Add catkin_pkg as a dependency when installing from binary packages #503

minggangw opened this issue Jun 11, 2018 · 10 comments

Comments

@minggangw
Copy link

minggangw commented Jun 11, 2018

Bug report

Required Info:

  • Operating System:
    • Linux/macOS/Windows
  • Installation type:
    • binaries
  • Version or commit hash:
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • N/A

Steps to reproduce issue

Any C++ project, run

ament build .

Expected behavior

Build successfully

Actual behavior

lack of module catkin_pkg

Additional information

The Wiki for the Development Setup section has been updated. I think we'd better add catkin_pkg as a dependency for installing from binary packages on Wiki also, as ament is a common command for the toolchain.

@dirk-thomas
Copy link
Member

The packages which need catkin_pkg declare it as a dependency in their manifest already (see e.g. https://github.com/ament/ament_tools/blob/f367b3258faddc1777fe82c1feaef8b3b9bcde4a/package.xml#L16). Do you have a specific package in mind where this is not the case at the moment?

@dirk-thomas dirk-thomas added the more-information-needed Further information is required label Jun 11, 2018
@minggangw
Copy link
Author

Hi @dirk-thomas , I met this problem when running the ci of rclnodejs using binary package, steps to reproduce:

1.Download the nightly build package from ci.ros.org for windows or macOS and unzip it.
2.Install the dependencies for windows or macOS
3.Build a simple project by ament build .(I also tried https://github.com/ros2/examples/tree/master/rclcpp)
4.Reported ModuleNotFoundError: No module named 'catkin_pkg' on windows or macOS

The problem can be solved after installing catkin_pkg(python3 -m pip install catkin_pkg). If something is wrong, please correct me, thanks!

@dirk-thomas
Copy link
Member

dirk-thomas commented Jun 12, 2018

The macOS instructions as well as the Windows instructions do mention that you need to install catkin_pkg.

@mikaelarguedas
Copy link
Member

I think the confusion comes from the fact that @minggangw is referring to the "Install from binaries" instructions and not the "Install from source" ones.

@minggangw In general the installation from binaries should allow you to install everything you need to run ROS2 executables (aka the runtime dependencies but not the build dependencies). So it should not be expected to be able to build packages by following only the instructions from the binary install page.

Though as we now have packages depending on catkin_pkg at runtime (ros2/ros2cli#94), I think you're right catkin_pkg should be added to the instructions from binary.

@minggangw
Copy link
Author

minggangw commented Jun 13, 2018

The "Install from binaries" I mentioned locates on Wiki, not from source code. @mikaelarguedas You understand exactly what I have reported.

Not only build packages, but also any ament related commands failed without catkin_pkg. Thanks!

@dirk-thomas dirk-thomas added documentation and removed more-information-needed Further information is required labels Jun 13, 2018
@dirk-thomas
Copy link
Member

I added the dependency to the following pages:

Please feel free to make changes to wiki pages in the future when you are confident about the modifications. It is already editable by anyone (with a GitHub account).

Assuming that these changes address the problem described in the ticket I will go ahead and close it. Please feel free to comment and if necessary the issue can be reopened if further changes are necessary.

@minggangw
Copy link
Author

Thanks, that fixed my issue.

@asimonov-hitachi
Copy link

I have seen an issue with catkin_pkg trying to build ros2 crystal from source (as documented here https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/)

here is what has failed:

$ colcon build --symlink-install
Starting >>> ament_package
Starting >>> ament_flake8
Starting >>> fastcdr
Starting >>> poco_vendor
Starting >>> ament_cppcheck
Starting >>> gtest_vendor
Starting >>> osrf_pycommon
Starting >>> tinyxml2_vendor
Starting >>> tinyxml_vendor
Starting >>> urdfdom_headers
Starting >>> orocos_kdl
Starting >>> osrf_testing_tools_cpp
Finished <<< ament_package [0.87s]                                                                                                                                                              
Finished <<< ament_flake8 [0.88s]
Starting >>> ament_cmake_core
Starting >>> ament_pep257
Finished <<< ament_cppcheck [0.94s]
Starting >>> ament_pep8                                                                                                                                                     
Finished <<< osrf_pycommon [1.31s]
--- stderr: ament_cmake_core
Traceback (most recent call last):
  File "/data/home/alexey/dev/ros2_crystal_ws/src/ament/ament_cmake/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 21, in <module>
    from catkin_pkg.package import parse_package_string
ModuleNotFoundError: No module named 'catkin_pkg'
CMake Error at cmake/core/ament_package_xml.cmake:94 (message):
  execute_process(/data/home/alexey/miniconda3/bin/python3
  /data/home/alexey/dev/ros2_crystal_ws/src/ament/ament_cmake/ament_cmake_core/cmake/core/package_xml_2_cmake.py
  /data/home/alexey/dev/ros2_crystal_ws/src/ament/ament_cmake/ament_cmake_core/package.xml
  /data/home/alexey/dev/ros2_crystal_ws/build/ament_cmake_core/ament_cmake_core/package.cmake)
  returned error code 1
Call Stack (most recent call first):
  cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
  CMakeLists.txt:15 (ament_package_xml)


---
Failed   <<< ament_cmake_core	[ Exited with code 1 ]
[2.801s] ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<_communicate_and_close_fds() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:265> exception=RuntimeError('cannot reuse already awaited coroutine',)>
RuntimeError: cannot reuse already awaited coroutine
Aborted  <<< ament_pep8
Aborted  <<< gtest_vendor
Aborted  <<< poco_vendor                                                                                                                                                                        
Aborted  <<< ament_pep257                                                                                                                                                                      
Aborted  <<< tinyxml2_vendor                                                                                                                                                                   
Aborted  <<< tinyxml_vendor
Aborted  <<< urdfdom_headers
Aborted  <<< fastcdr
Aborted  <<< orocos_kdl                                                                                            
Aborted  <<< osrf_testing_tools_cpp                                           

Summary: 4 packages finished [3.88s]
  1 package failed: ament_cmake_core
  10 packages aborted: ament_pep257 ament_pep8 fastcdr gtest_vendor orocos_kdl osrf_testing_tools_cpp poco_vendor tinyxml2_vendor tinyxml_vendor urdfdom_headers
  1 package had stderr output: ament_cmake_core
  217 packages not processed

after installing catkin_pkg (python3 -m pip install catkin_pkg i got much further

@dirk-thomas
Copy link
Member

Assuming you are on Ubuntu you should not install Python packages via pip if there is a Debian package equivalent. You should uninstall it to avoid problems in the future and install the Debian package python3-catkin-pkg-modules instead.

@asimonov-hitachi
Copy link

yes, just found your comments on #660 and realised I was using miniconda python accidentally. going back to system python3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants