Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Add Debian 9 host support to cross-compile cross_compile #42

Open
2 tasks
potentialdiffer opened this issue Oct 30, 2019 · 10 comments
Open
2 tasks

Add Debian 9 host support to cross-compile cross_compile #42

potentialdiffer opened this issue Oct 30, 2019 · 10 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@potentialdiffer
Copy link

potentialdiffer commented Oct 30, 2019

Consolidated Issue (see initial report at the bottom)

The below behavior is observed when attempting to use the tool when the host is Debian 9.

This has been changed from a bug to a feature request to support that platform as a host platform for this tool.

python3-docker should be installed by pip instead of apt on Debian 9
Once this works, add Debian 9 support instructions to README.md

Testing

Manual QA: Verify cross-compile runs on Debian 9

Acceptance Criteria

  • Change python3-docker rosdep for Debian Buster to use pip
  • Create instructions in README.md for running on Debian Buster

Initial bug report: : pkg_resources.DistributionNotFound 'docker'

Hey people,
I am trying out the new toolchain on Debian Stretch but running into an issue:

$ ros2 run cross_compile cross_compile --sysroot-base-image raspbian/stretch --sysroot-path /path/to/sysroot/

Traceback (most recent call last):
  File "/home/xxx/ros2/install/cross_compile/lib/cross_compile/cross_compile", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/xxx/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/home/xxx/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/home/xxx/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/xxx/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/home/xxx/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/xxx/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'docker' distribution was not found and is required by cross-compile

docker-ce is installed and runs without any problems. Might this be due to Debian Stretch python version?
Thanks!

@potentialdiffer
Copy link
Author

I tried with python 3.6 but I am still receiving the same error message.

@thomas-moulard
Copy link
Member

Thanks for the bug report @potentialdiffer.
How are you installing cross_compile? Using the Debian package, or from source?

@potentialdiffer
Copy link
Author

I am building all my workspaces from source and therefore cross_compile as well.

@zmichaels11
Copy link
Contributor

zmichaels11 commented Oct 31, 2019

I'm going to try and reproduce your issue.
I'm trying:

  • ROS2 distro: dashing from source
  • OS: debian stretch

I'll check in after the build completes.

@zmichaels11
Copy link
Contributor

zmichaels11 commented Oct 31, 2019

@potentialdiffer, I was able to reproduce this error.

A workaround is to install the python docker package directly with pip.
pip3 install docker.

I'll continue to look into resolving this issue without a workaround.

@emersonknapp
Copy link
Contributor

@potentialdiffer did you run rosdep install against your workspace to install the runtime dependencies? python3-docker is a runtime dependency of this package, as specified in the package.xml, and it does have a rule in rosdistro for debian. https://github.com/ros/rosdistro/blob/master/rosdep/python.yaml#L5037 - it would be good to know if that's not working properly

@zmichaels11
Copy link
Contributor

I just tried rosdep install and it did try and install python3-docker, however the version of python3-docker in Debian stretch is too old to run cross_compile. (Stretch has python3-docker 1.9.0-1)

@potentialdiffer
Copy link
Author

I did rosdep install:

rosdep install -r --rosdistro=dashing --ignore-packages-from-source --from-paths src/

I get some errors due to other packages. But I resoveld those before by installing them manually. Bo error occurs due to cross_compile package.

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rmw_fastrtps_dynamic_cpp: No definition of [fastrtps] for OS [debian]
urdfdom: No definition of [urdfdom_headers] for OS [debian]
kdl_parser: No definition of [urdfdom_headers] for OS [debian]
rosidl_typesupport_connext_cpp: No definition of [rti-connext-dds-5.3.1] for OS [debian]
rosidl_typesupport_opensplice_cpp: No definition of [libopensplice69] for OS [debian]
robot_state_publisher: No definition of [urdfdom_headers] for OS [debian]
rosidl_typesupport_fastrtps_c: No definition of [fastrtps] for OS [debian]
connext_cmake_module: No definition of [rti-connext-dds-5.3.1] for OS [debian]
rmw_connext_cpp: No definition of [rti-connext-dds-5.3.1] for OS [debian]
rosidl_typesupport_opensplice_c: No definition of [libopensplice69] for OS [debian]
rmw_connext_shared_cpp: No definition of [rti-connext-dds-5.3.1] for OS [debian]
opensplice_cmake_module: No definition of [libopensplice69] for OS [debian]
rmw_opensplice_cpp: No definition of [libopensplice69] for OS [debian]
rosidl_typesupport_fastrtps_cpp: No definition of [fastrtps] for OS [debian]
urdf: No definition of [urdfdom_headers] for OS [debian]
rmw_fastrtps_cpp: No definition of [fastrtps] for OS [debian]
rmw_fastrtps_shared_cpp: No definition of [fastrtps] for OS [debian]
Continuing to install resolvable dependencies...
#All required rosdeps installed successfully

Installing python3-docker with apt did not solve the problem, however installing with pip, as @zmichaels11 mentioned fixed this issue for me.

As mentioned in #41 I needed to install python 3.6 in advance to get it all work.

I am not sure what the initial problem was. Could it be that rosdep did not install the docker dependency as it was the wrong python version?

@zmichaels11
Copy link
Contributor

I'm looking into having rosdep install python3-docker from pip.

@zmichaels11
Copy link
Contributor

zmichaels11 commented Nov 8, 2019

Update:
python3-docker should be installed by pip only on Debian 9
Once this works, we'll add Debian 9 support instructions to README.md

So we can track this on our roadmap:

Testing

  • Manual QA: Verify cross-compile runs on Debian 9

Acceptance Criteria

  • Change python3-docker rosdep for Debian Buster to use pip
  • Create instructions in README.md for running on Debian Buster

@emersonknapp emersonknapp added the bug Something isn't working label Dec 6, 2019
@emersonknapp emersonknapp changed the title cross_compile: pkg_resources.DistributionNotFound 'docker' Add Debian 9 support to cross-compile cross_compile Dec 6, 2019
@emersonknapp emersonknapp added enhancement New feature or request and removed bug Something isn't working labels Dec 6, 2019
@zmichaels11 zmichaels11 changed the title Add Debian 9 support to cross-compile cross_compile Add Debian 9 host support to cross-compile cross_compile Dec 11, 2019
@emersonknapp emersonknapp added the help wanted Extra attention is needed label Feb 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants