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

Build error on Dockerfile for Jetson Nano #3984

Closed
elgarbe opened this issue Nov 23, 2023 · 2 comments
Closed

Build error on Dockerfile for Jetson Nano #3984

elgarbe opened this issue Nov 23, 2023 · 2 comments

Comments

@elgarbe
Copy link

elgarbe commented Nov 23, 2023

          We do not specifically change the default GCC version from the host operating system on Tier 1 supported OS’ of your distribution. 

Since you did not include the issue template I can’t tell you what version that is, but you can look it up on the distribution’s package manager.

Originally posted by @SteveMacenski in #3983 (comment)

I get this error:

[Processing: nav2_behavior_tree, nav2_costmap_2d, ompl, rviz_ogre_vendor]
[ 28%] Building CXX object CMakeFiles/layers.dir/plugins/denoise_layer.cpp.o
[ 48%] Building CXX object src/ompl/CMakeFiles/ompl.dir/multilevel/datastructures/projections/src/None.cpp.o
[ 43%] Linking CXX shared library libnav2_planner_selector_bt_node.so
[ 39%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreLog.cpp.o
[ 43%] Built target nav2_planner_selector_bt_node
[ 44%] Building CXX object CMakeFiles/nav2_controller_selector_bt_node.dir/plugins/action/controller_selector_node.cpp.o
[ 48%] Building CXX object src/ompl/CMakeFiles/ompl.dir/multilevel/datastructures/projections/src/RNSO2_RN.cpp.o
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/layer.hpp:40,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:18,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/usr/include/c++/7/bits/stl_pair.h: In instantiation of ‘struct std::pair<nav2_costmap_2d::Image<short unsigned int>, short unsigned int>’:
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:989:56:   required from ‘void nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:972:37:   required from ‘bool nav2_costmap_2d::imgproc_impl::GroupsRemover::tryRemoveGroupsWithLabelType(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, size_t, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, const IsBg&, bool) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:936:59:   required from ‘void nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsPickLabelType(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:908:7:   required from ‘void nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroups(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::ConnectivityType, size_t, const IsBg&) const [with IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:156:56:   required from here
/usr/include/c++/7/bits/stl_pair.h:303:17: error: ‘constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = nav2_costmap_2d::Image<short unsigned int>; _T2 = short unsigned int]’ declared to take const reference, but implicit declaration would take non-const
       constexpr pair(const pair&) = default;
                 ^~~~
/usr/include/c++/7/bits/stl_pair.h: In instantiation of ‘struct std::pair<nav2_costmap_2d::Image<unsigned int>, unsigned int>’:
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:989:56:   required from ‘void nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:972:37:   required from ‘bool nav2_costmap_2d::imgproc_impl::GroupsRemover::tryRemoveGroupsWithLabelType(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, size_t, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, const IsBg&, bool) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:950:49:   required from ‘void nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsPickLabelType(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:908:7:   required from ‘void nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroups(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::ConnectivityType, size_t, const IsBg&) const [with IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]’
/root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:156:56:   required from here
/usr/include/c++/7/bits/stl_pair.h:303:17: error: ‘constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = nav2_costmap_2d::Image<unsigned int>; _T2 = unsigned int]’ declared to take const reference, but implicit declaration would take non-const
In file included from /usr/include/c++/7/functional:64:0,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/async_buffer_interface.h:33,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/buffer.h:41,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/layer.hpp:44,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:18,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/usr/include/c++/7/bits/stl_algo.h:4295:5: error: ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; _OIter = std::_Bit_iterator; _UnaryOperation = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(size_t)>]’, declared using local type ‘nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(size_t)>’, is used but never defined [-fpermissive]
     transform(_InputIterator __first, _InputIterator __last,
     ^~~~~~~~~
In file included from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:18:0,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:19,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image.hpp:184:6: error: ‘void nav2_costmap_2d::Image<T>::convert(nav2_costmap_2d::Image<TargetElement>&, Converter&&) const [with TargetElement = unsigned char; Converter = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(short unsigned int, uint8_t&)>; T = short unsigned int]’, declared using local type ‘nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(short unsigned int, uint8_t&)>’, is used but never defined [-fpermissive]
 void Image<T>::convert(Image<TargetElement> & target, Converter && converter) const
      ^~~~~~~~
In file included from /usr/include/c++/7/functional:64:0,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/async_buffer_interface.h:33,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/buffer.h:41,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/layer.hpp:44,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:18,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/usr/include/c++/7/bits/stl_algo.h:4295:5: error: ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; _OIter = std::_Bit_iterator; _UnaryOperation = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(size_t)>]’, declared using local type ‘nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(size_t)>’, is used but never defined [-fpermissive]
     transform(_InputIterator __first, _InputIterator __last,
     ^~~~~~~~~
In file included from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:18:0,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:19,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image.hpp:184:6: error: ‘void nav2_costmap_2d::Image<T>::convert(nav2_costmap_2d::Image<TargetElement>&, Converter&&) const [with TargetElement = unsigned char; Converter = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(unsigned int, uint8_t&)>; T = unsigned int]’, declared using local type ‘nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>; size_t = long unsigned int]::<lambda(unsigned int, uint8_t&)>’, is used but never defined [-fpermissive]
 void Image<T>::convert(Image<TargetElement> & target, Converter && converter) const
      ^~~~~~~~
[ 48%] Building CXX object src/ompl/CMakeFiles/ompl.dir/multilevel/datastructures/projections/src/RN_RM.cpp.o
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image.hpp:184:6: error: ‘void nav2_costmap_2d::Image<T>::convert(nav2_costmap_2d::Image<TargetElement>&, Converter&&) const [with TargetElement = unsigned char; Converter = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>]::<lambda(unsigned int, uint8_t&)>; T = unsigned int]’ used but never defined [-Werror]
In file included from /usr/include/c++/7/functional:64:0,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/async_buffer_interface.h:33,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/buffer.h:41,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/layer.hpp:44,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:18,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/usr/include/c++/7/bits/stl_algo.h:4295:5: error: ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; _OIter = std::_Bit_iterator; _UnaryOperation = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>]::<lambda(size_t)>]’ used but never defined [-Werror]
     transform(_InputIterator __first, _InputIterator __last,
     ^~~~~~~~~
In file included from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image_processing.hpp:18:0,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:19,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise/image.hpp:184:6: error: ‘void nav2_costmap_2d::Image<T>::convert(nav2_costmap_2d::Image<TargetElement>&, Converter&&) const [with TargetElement = unsigned char; Converter = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>]::<lambda(short unsigned int, uint8_t&)>; T = short unsigned int]’ used but never defined [-Werror]
 void Image<T>::convert(Image<TargetElement> & target, Converter && converter) const
      ^~~~~~~~
In file included from /usr/include/c++/7/functional:64:0,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/async_buffer_interface.h:33,
                 from /opt/ros/humble/install/include/tf2_ros/tf2_ros/buffer.h:41,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/layer.hpp:44,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/include/nav2_costmap_2d/denoise_layer.hpp:18,
                 from /root/nav2_ws/src/navigation2/nav2_costmap_2d/plugins/denoise_layer.cpp:15:
/usr/include/c++/7/bits/stl_algo.h:4295:5: error: ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<long unsigned int*, std::vector<long unsigned int> >; _OIter = std::_Bit_iterator; _UnaryOperation = nav2_costmap_2d::imgproc_impl::GroupsRemover::removeGroupsImpl(nav2_costmap_2d::Image<unsigned char>&, nav2_costmap_2d::MemoryBuffer&, nav2_costmap_2d::imgproc_impl::EquivalenceLabelTrees<Label>&, size_t, const IsBg&) const [with nav2_costmap_2d::ConnectivityType connectivity = (nav2_costmap_2d::ConnectivityType)4; Label = short unsigned int; IsBg = nav2_costmap_2d::DenoiseLayer::removeGroups(nav2_costmap_2d::Image<unsigned char>&) const::<lambda(uint8_t)>]::<lambda(size_t)>]’ used but never defined [-Werror]
     transform(_InputIterator __first, _InputIterator __last,
     ^~~~~~~~~
cc1plus: all warnings being treated as errors
CMakeFiles/layers.dir/build.make:159: recipe for target 'CMakeFiles/layers.dir/plugins/denoise_layer.cpp.o' failed
make[2]: *** [CMakeFiles/layers.dir/plugins/denoise_layer.cpp.o] Error 1
CMakeFiles/Makefile2:294: recipe for target 'CMakeFiles/layers.dir/all' failed
Makefile:145: recipe for target 'all' failed
make[1]: *** [CMakeFiles/layers.dir/all] Error 2
make: *** [all] Error 2
--- stderr: nav2_costmap_2d

EDIT: Add my dockerfile to reproduce the error
My dockerfile:

FROM dustynv/ros:humble-ros-base-l4t-r32.7.1

RUN mkdir -p /root/nav2_ws/src
WORKDIR /root/nav2_ws

ENV ROS_PACKAGE_PATH=/opt/ros/humble/install

# ROS fundamentals
RUN apt-mark hold '*opencv*' \
    && apt-get update \
    && apt autoremove -y \
    && rosinstall_generator --deps --exclude RPP --rosdistro humble navigation2 > ros2.humble.nav2.rosinstall \
    && vcs import src/ < ros2.humble.nav2.rosinstall \
    && . /opt/ros/$ROS_DISTRO/install/setup.sh \
    && rosdep fix-permissions \
    && rosdep update \
    && rosdep install -y --ignore-src --from-paths src --rosdistro humble --skip-keys "xsimd" --skip-keys "ignition-cmake2" --skip-keys "ignition-math6"

RUN echo "Fixing client.hpp file" \
    && sed -i "s|return value|return std::move(value) |g" /opt/ros/humble/install/include/rclcpp/rclcpp/client.hpp \
    && echo "client.hpp fixed" \
    && echo "Building..." \
    && . /opt/ros/$ROS_DISTRO/install/setup.sh \
    && colcon build --symlink-install --base-paths src --event-handlers console_direct+ &> results.txt

# ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp
# COPY ros_entrypoint.sh /
# ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]
@elgarbe elgarbe changed the title gcc version for build from source Build error on Dockerfile for Jetson Nano Nov 23, 2023
@SteveMacenski
Copy link
Member

Please don't file new tickets. Comment on existing ones.

You still did not provide the issue template context, so I cannot help. Please direct this to Robotics Stack Exchange in the future or look into the errors.

@elgarbe
Copy link
Author

elgarbe commented Nov 23, 2023

Usually I file a ticket on github project and after a couple of posts we decide to close the issue as solved or not. I don't know why yuo close the issue and don't let me answer yuor requests.
Anyway:

I'm working on building Nav2 from source on a Dockerfile for the Jetson Nano. The official ubuntu distro is 18.04 (no ROS2 for it), so I'm using https://github.com/dusty-nv/jetson-containers as a base image. My Dockerfile is:

FROM dustynv/ros:humble-ros-base-l4t-r32.7.1

RUN mkdir -p /root/nav2_ws/src
WORKDIR /root/nav2_ws

ENV ROS_PACKAGE_PATH=/opt/ros/humble/install

# ROS fundamentals
RUN apt-mark hold '*opencv*' \
    && apt-get update \
    && apt autoremove -y \
    && rosinstall_generator --deps --exclude RPP --rosdistro humble navigation2 > ros2.humble.nav2.rosinstall \
    && vcs import src/ < ros2.humble.nav2.rosinstall \
    && . /opt/ros/$ROS_DISTRO/install/setup.sh \
    && rosdep fix-permissions \
    && rosdep update \
    && rosdep install -y --ignore-src --from-paths src --rosdistro humble --skip-keys "xsimd" --skip-keys "ignition-cmake2" --skip-keys "ignition-math6"

RUN echo "Fixing client.hpp file" \
    && sed -i "s|return value|return std::move(value) |g" /opt/ros/humble/install/include/rclcpp/rclcpp/client.hpp \
    && echo "client.hpp fixed"  

# ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp
# COPY ros_entrypoint.sh /
# ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]

  • Operating System: Ubuntu 22.04 in docker container
  • ROS2 Version: Humble building from source on the base image
  • Version or commit hash: fc2a199a4c1f8d8cfd8abdb216685b47508e01b2

Steps to reproduce issue

On a Jetson Nano:
Create a Dockerfile with provided code and run

docker build -t nav2_docker -f Dockerfile .
docker run -it nav2_docker:latest

Once incide de docker container run
colcon build --symlink-install --base-paths src --event-handlers console_direct+
or
colcon build --symlink-install --base-paths src --event-handlers console_direct+ &> results.txt

Expected behavior

The build process finishd without errors

Actual behavior

The build process finishd with reported error
results.zip

Additional information

I think that the problem is related to the version of the gcc that comes with dustynv/ros:humble-ros-base-l4t-r32.7.1, maybe it's too old and doesn't recognize the code that generate the error. But I'm noob at c++.
I have to skip this package from rosdep, --skip-keys "ignition-cmake2" --skip-keys "ignition-math6", I'm working on it too.

Thank

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

No branches or pull requests

2 participants