System details: Jetson Agx xavier with Ubuntu 20.04, Noetic ROS
Linux xavieruhdc-desktop 5.10.192-tegra #1 SMP PREEMPT Mon Feb 19 20:19:53 PST 2024 aarch64 aarch64 aarch64 GNU/Linux
1.) Install noetic ros full installed. Then
2.) depthai-core installed.
cd /tmp
git clone --recursive luxonis/depthai-core.git \
&& sudo cmake -Hdepthai-core -Bdepthai-core/build -DBUILD_SHARED_LIBS=ON -D CMAKE_CXX_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=/usr/local \
&& sudo cmake --build depthai-core/build --target install --parallel 8 \
&& cd /tmp \
&& sudo rm -r depthai-core
Above was successfully installed.
Then followed by depthai-ros installation.
mkdir -p dai_ws/src
cd dai_ws/src
git clone --branch noetic luxonis/depthai-ros.git
cd ..
rosdep install --from-paths src --ignore-src -r -y
source /opt/ros/<ros-distro>/setup.bash
catkin_make_isolated
[ 12%] Linking CXX shared library /media/xavieruhdc/dai_ws/devel_isolated/depthai_bridge/lib/libdepthai_bridge.so
/usr/bin/ld: /opt/ros/noetic/lib/aarch64-linux-gnu/libdepthai-core.a(CalibrationHandler.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZGVZN3dai7Logging11getInstanceEvE7logging' which may bind externally can not be used when making a shared object; recompile with -fPIC
/opt/ros/noetic/lib/aarch64-linux-gnu/libdepthai-core.a(CalibrationHandler.cpp.o): in function `dai::CalibrationHandler::setBoardInfo(std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
(.text+0x498): dangerous relocation: unsupported relocation
/usr/bin/ld: /opt/ros/noetic/lib/aarch64-linux-gnu/cmake/depthai/dependencies/lib/libspdlog.a(color_sinks.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTSSt19_Sp_make_shared_tag' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text.ZNSt23_Sp_counted_ptr_inplaceIN6spdlog5sinks21ansicolor_stderr_sinkINS0_7details17console_nullmutexEEESaIS5_ELN9gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[ZNSt23_Sp_counted_ptr_inplaceIN6spdlog5sinks21ansicolor_stderr_sinkINS0_7details17console_nullmutexEEESaIS5_ELN9gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x24): dangerous relocation: unsupported relocation
/usr/bin/ld: /opt/ros/noetic/lib/aarch64-linux-gnu/cmake/depthai/dependencies/lib/libspdlog.a(color_sinks.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZZNSt19_Sp_make_shared_tag5_S_tiEvE5__tag' which may bind externally can not be used when making a shared object; recompile with -fPIC
/opt/ros/noetic/lib/aarch64-linux-gnu/cmake/depthai/dependencies/lib/libspdlog.a(color_sinks.cpp.o): in function `std::Sp_counted_ptr_inplace<spdlog::async_logger, std::allocator<spdlog::async_logger>, (__gnu_cxx::Lock_policy)2>::_M_get_deleter(std::type_info const&)':
(.text.ZNSt23_Sp_counted_ptr_inplaceIN6spdlog12async_loggerESaIS1_ELN9gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[ZNSt23_Sp_counted_ptr_inplaceIN6spdlog12async_loggerESaIS1_ELN9gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x4): dangerous relocation: unsupported relocation
/usr/bin/ld: /opt/ros/noetic/lib/aarch64-linux-gnu/cmake/depthai/dependencies/lib/libspdlog.a(color_sinks.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTSSt19_Sp_make_shared_tag' which may bind externally can not be used when making a shared object; recompile with -fPIC
(.text.ZNSt23_Sp_counted_ptr_inplaceIN6spdlog12async_loggerESaIS1_ELN9gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info[ZNSt23_Sp_counted_ptr_inplaceIN6spdlog12async_loggerESaIS1_ELN9gnu_cxx12_Lock_policyE2EE14_M_get_deleterERKSt9type_info]+0x24): dangerous relocation: unsupported relocation
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/depthai_bridge.dir/build.make:284: /media/xavieruhdc/dai_ws/devel_isolated/depthai_bridge/lib/libdepthai_bridge.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:249: CMakeFiles/depthai_bridge.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
<== Failed to process package 'depthai_bridge':
Command '['/media/xavieruhdc/dai_ws/devel_isolated/depthai_ros_msgs/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2.
Reproduce this error by running:
==> cd /media/xavieruhdc/dai_ws/build_isolated/depthai_bridge && /media/xavieruhdc/dai_ws/devel_isolated/depthai_ros_msgs/env.sh make -j4 -l4
Command failed, exiting.