ros2/ros1_bridge

Building error in Docker container (Noetic & Foxy)

tgaspar opened this issue · 2 comments

Bug report

I am trying to build ros1_bridge under Docker with Noetic as the ROS1 distro and Foxy as the ROS2 distro. I have tried many different approaches but none seemed to work, or better, they all ended with the same error (described bellow).

Required Info:

  • Operating System:
    Windows running docker
  • Installation type:
    Source
  • Version or commit hash:
    82d1f45
  • DDS implementation:
    N/A
  • Client library (if applicable):
    N/A

Steps to reproduce issue

For this bug report I tried to take similar steps as in #261 . I am trying to build a Docker image using the following Dockerfile:

FROM ros:foxy-ros1-bridge

RUN apt-get update \
  && apt-get install -y ssh \
    build-essential \
    gcc \
    g++ \
    gdb \
    clang \
    cmake \
    rsync \
    nano \
    tar \
    python3 \
    ros-foxy-launch* \
  && apt-get clean

ENTRYPOINT ["/ros_entrypoint.sh"]

WORKDIR "/home/workspace"

CMD /bin/bash

Once inside, I ran the following commands:

git clone --single-branch --branch foxy https://github.com/ros2/ros1_bridge src/ros1_bridge
colcon build --symlink-install --packages-skip ros1_bridge
source /opt/ros/noetic/setup.bash
source /opt/ros/foxy/setup.bash

and finally

colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure

Expected behavior

A successful build.

Actual behavior

[Processing: ros1_bridge]te] [ros1_bridge:build 98% - 44min 18.1s]
--- stderr: ros1_bridge
collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
make[2]: *** [CMakeFiles/ros1_bridge.dir/build.make:5157: libros1_bridge.so] Error 1
make[2]: *** Deleting file 'libros1_bridge.so'
make[1]: *** [CMakeFiles/Makefile2:260: CMakeFiles/ros1_bridge.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< ros1_bridge [44min 33s, exited with code 2]

Summary: 0 packages finished [44min 34s]
  1 package failed: ros1_bridge
  1 package had stderr output: ros1_bridge

Additional information

Since the error is not really descriptive, I don't know how to proceed from here.

Additional question: Is the build time 44min normal?

I am not sure if you have seen the ROS support guidelines but we kindly ask to raise questions like this on answers.ros.org instead.

The rational for asking all kind of questions in a single place is:

  • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
  • In the future other users will search there for similar problems and can find your question and the potential answers.
  • The issue tracker in this repo is used to track bugs, feature requests, etc. But your question is not such an action item.

Therefore I will close this ticket here for now. If you have asked your question on answers.ros.org please feel free to add a link to the question to this ticket so that future readers can find the related question.

Thank you for pointing this out.

I did read the guidelines but my rationale was that the unexpected build behavior was concerning this package only. However, I agree with your explanation and the points you provided. I will be posting to answers.ros.org.