ros-tooling / cross_compile

A tool to build ROS and ROS2 workspaces for various targets
Apache License 2.0
188 stars 60 forks source link

Two README command issues #144

Closed timrobotson closed 4 years ago

timrobotson commented 4 years ago

Description

Went through the README to cross compile a project and found two issues with the copy + paste commands. The first is the command:

cp -r <full_path_to_your_ros_ws>/src sysroot/ros_ws/src

Ends up making the path:

sysroot/ros_ws/src/src/<ros_package>

Need to remove the last src there.

Second is when running:

python3 -m ros_cross_compile \
  --sysroot-path /absolute/path/to/sysroot \
  --arch aarch64 \
  --os ubuntu
  --rosdistro dashing

with /sysroot on the end, it complains that it can't find sysroot inside sysroot. Full exception:

admin:~ $ python3 -m ros_cross_compile --sysroot-path ~/environment/sysroot/ --arch aarch64 --os ubuntu --rosdistro dashing
/usr/lib/python3/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/ros_cross_compile/__main__.py", line 21, in <module>
    sys.exit(_main())
  File "/home/ubuntu/.local/lib/python3.6/site-packages/ros_cross_compile/ros_cross_compile.py", line 137, in main
    custom_data_dir=args.custom_data_dir)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/ros_cross_compile/sysroot_compiler.py", line 257, in __init__
    self._setup_sysroot_dir(custom_setup_script_path, custom_data_dir)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/ros_cross_compile/sysroot_compiler.py", line 278, in _setup_sysroot_dir
    sysroot_dir=self._target_sysroot))
FileNotFoundError: Sysroot directory not found at "/home/ubuntu/environment/sysroot/sysroot". Make sure you specify the full path to the directory containing "sysroot".
emersonknapp commented 4 years ago

Thanks for reporting this, we will address it posthaste!