From d5e9d3aab9341ba4b66d01663256956a5b50d9bc Mon Sep 17 00:00:00 2001 From: Dustin Franklin Date: Tue, 16 Aug 2022 19:08:38 -0400 Subject: [PATCH] fix for cmake build error --- Dockerfile.ros.foxy | 58 ++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/Dockerfile.ros.foxy b/Dockerfile.ros.foxy index ee2869376..ccc623e7c 100644 --- a/Dockerfile.ros.foxy +++ b/Dockerfile.ros.foxy @@ -22,6 +22,7 @@ ENV LANG=en_US.UTF-8 ENV PYTHONIOENCODING=utf-8 + # # add the ROS deb repo to the apt sources list # @@ -32,6 +33,7 @@ RUN apt-get update && \ gnupg2 \ lsb-release \ ca-certificates \ + python3-pip \ && rm -rf /var/lib/apt/lists/* \ && apt-get clean @@ -39,19 +41,46 @@ RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null +# +# upgrade cmake - https://stackoverflow.com/a/56690743 +# this is needed to build some of the ROS2 packages +# +#RUN apt-get update && \ +# apt-get install -y --no-install-recommends \ +# software-properties-common \ +# apt-transport-https \ +# ca-certificates \ +# gnupg \ +# lsb-release \ +# && rm -rf /var/lib/apt/lists/* \ +# && apt-get clean + +#RUN wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \ +# apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \ +# apt-get update && \ +# apt-get install -y --no-install-recommends --only-upgrade \ +# cmake \ +# && rm -rf /var/lib/apt/lists/* \ +# && apt-get clean + +# workaround for https://github.com/dusty-nv/jetson-containers/issues/181 +RUN apt purge -y cmake && \ + pip3 install cmake==3.23.3 --upgrade --verbose + +RUN cmake --version + + # # install development packages # RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ - cmake \ git \ libbullet-dev \ libpython3-dev \ python3-colcon-common-extensions \ python3-flake8 \ - python3-pip \ python3-numpy \ python3-pytest-cov \ python3-rosdep \ @@ -103,31 +132,6 @@ RUN apt-get purge -y '*opencv*' || echo "previous OpenCV installation not found" cp -r /usr/lib/python${PYTHON3_VERSION}/dist-packages/cv2 /usr/local/lib/python${PYTHON3_VERSION}/dist-packages/cv2 -# -# upgrade cmake - https://stackoverflow.com/a/56690743 -# this is needed to build some of the ROS2 packages -# -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - software-properties-common \ - apt-transport-https \ - ca-certificates \ - gnupg \ - lsb-release \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean - -RUN wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \ - apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \ - apt-get update && \ - apt-get install -y --no-install-recommends --only-upgrade \ - cmake \ - && rm -rf /var/lib/apt/lists/* \ - && apt-get clean - -RUN cmake --version - - # # compile yaml-cpp-0.6, which some ROS packages may use (but is not in the 18.04 apt repo) #