osrf / rmf_core

Provides the centralized functions of RMF: scheduling, etc.
Apache License 2.0
102 stars 41 forks source link

Some issues when install RMF on Nvidia Jetson Xavier NX #321

Closed winnerineast closed 3 years ago

winnerineast commented 3 years ago

Describe the bug When I build rmf_core on nvidia jetson xavier nx and hit some build error on rmf_traffic_ros2.

Workspace information:

Steps to Reproduce

  1. the gcc version is 7.5 which is not suitable for ROS and RMF. The workaround is to install gcc 8 separately.
  2. yaml-cpp version 0.5.2 which fails rmf_traffic_ros2. The workaround is to install yaml-cpp from source separately.
  3. after the workaround 1 and 2, when run "CXX=g++-8 colcon build --cmake-args -DCMAKE_BUILD_TYPE=RELEASE", still hit the build error.

Expected behavior I expect the build successfully.

Actual behavior
I expect the build successfully but the output error as below:

Starting >>> ament_cmake_catch2
Starting >>> rmf_cmake_uncrustify                 
Starting >>> rmf_utils                                                                      
Starting >>> rmf_dispenser_msgs                                                                                
Starting >>> rmf_fleet_msgs                                                                                        
Starting >>> rmf_traffic_msgs                                                                                      
Finished <<< rmf_cmake_uncrustify [3.50s]                                                                                            
Starting >>> rmf_door_msgs
Finished <<< ament_cmake_catch2 [3.97s]                                                                   
Starting >>> rmf_lift_msgs
Finished <<< rmf_utils [4.51s]                                                                               
Starting >>> rmf_traffic
Finished <<< rmf_dispenser_msgs [13.6s]                                                                                
Starting >>> rmf_task_msgs
Finished <<< rmf_lift_msgs [10.9s]                                                                                 
Starting >>> rmf_ingestor_msgs                                                                                     
Finished <<< rmf_door_msgs [14.3s]                                                                                 
Starting >>> rmf_charger_msgs
Finished <<< rmf_traffic [14.9s]                                                                                   
Starting >>> rmf_battery
Finished <<< rmf_fleet_msgs [21.0s]                                                                                
Starting >>> rmf_workcell_msgs
Finished <<< rmf_battery [5.35s]                                                                                
Starting >>> rmf_task
Finished <<< rmf_ingestor_msgs [12.1s]                                                                          
Finished <<< rmf_charger_msgs [10.7s]                                                                             
Finished <<< rmf_task [5.58s]                                                                                      
Finished <<< rmf_workcell_msgs [13.1s]                                                                               
Finished <<< rmf_task_msgs [23.5s]                                                                               
Finished <<< rmf_traffic_msgs [46.8s]                           
Starting >>> rmf_traffic_ros2
--- stderr: rmf_traffic_ros2                                
librmf_traffic_ros2.so: undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
librmf_traffic_ros2.so: undefined reference to `vtable for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
librmf_traffic_ros2.so: undefined reference to `typeinfo for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node::m_amount'
librmf_traffic_ros2.so: undefined reference to `YAML::BadConversion::~BadConversion()'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::absolute(std::filesystem::__cxx11::path const&)'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node_data::push_back(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::create_directories(std::filesystem::__cxx11::path const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
collect2: error: ld returned 1 exit status
librmf_traffic_ros2.so: undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
librmf_traffic_ros2.so: undefined reference to `vtable for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
librmf_traffic_ros2.so: undefined referencemake[2]: *** [rmf_traffic_schedule] Error 1
 to `typeinfo for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node::m_amount'
librmf_traffic_ros2.so: undefined reference to `YAML::BadConversion::~BadConversion()'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::absolute(std::filesystem::__cxx11::path const&)'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node_data::push_back(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::create_directories(std::filesystem::__cxx11::path const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
make[1]: *** [CMakeFiles/rmf_traffic_schedule.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMakeFiles/test_rmf_traffic_ros2.dir/test/unit/test_ParticipantRegistry.cpp.o: In function `____C_A_T_C_H____T_E_S_T____9()':
test_ParticipantRegistry.cpp:(.text+0x1a20): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
test_ParticipantRegistry.cpp:(.text+0x1a28): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
CMakeFiles/test_rmf_traffic_ros2.dir/test/unit/test_ParticipantRegistry.cpp.o: In function `YAML::Node YAML::Node::operator[]<char [5]>(char const (&) [5])':
test_ParticipantRegistry.cpp:(.text._ZN4YAML4NodeixIA5_cEES0_RKT_[_ZN4YAML4NodeixIA5_cEES0_RKT_]+0x9f8): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
CMakeFiles/test_rmf_traffic_ros2.dir/test/unit/test_ParticipantRegistry.cpp.o: In function `YAML::Node YAML::Node::operator[]<char [10]>(char const (&) [10])':
test_ParticipantRegistry.cpp:(.text._ZN4YAML4NodeixIA10_cEES0_RKT_[_ZN4YAML4NodeixIA10_cEES0_RKT_]+0xcd8): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
librmf_traffic_ros2.so: undefined reference to `vtable for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `typeinfo for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node::m_amount'
librmf_traffic_ros2.so: undefined reference to `YAML::BadConversion::~BadConversion()'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::absolute(std::filesystem::__cxx11::path const&)'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node_data::push_back(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystemcollect2: error: ld returned 1 exit status
::create_directories(std::filesystem::__cxx11::path const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [rmf_traffic_blockade] Error 1
make[1]: *** [CMakeFiles/rmf_traffic_blockade.dir/all] Error 2
make[2]: *** [test_rmf_traffic_ros2] Error 1
make[1]: *** [CMakeFiles/test_rmf_traffic_ros2.dir/all] Error 2
librmf_traffic_ros2.so: undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
librmf_traffic_ros2.so: undefined reference to `vtable for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
librmf_traffic_ros2.so: undefined reference to `typeinfo for YAML::BadConversion'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node::m_amount'
librmf_traffic_ros2.so: undefined reference to `YAML::BadConversion::~BadConversion()'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::absolute(std::filesystem::__cxx11::path const&)'
librmf_traffic_ros2.so: undefined reference to `YAML::detail::node_data::push_back(YAML::detail::node&, std::shared_ptr<YAML::detail::memory_holder> const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::create_directories(std::filesystem::__cxx11::path const&)'
librmf_traffic_ros2.so: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [participant_node] Error 1
make[1]: *** [CMakeFiles/participant_node.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< rmf_traffic_ros2 [3.95s, exited with code 2]

Summary: 15 packages finished [53.1s]
  1 package failed: rmf_traffic_ros2
  1 package had stderr output: rmf_traffic_ros2
  2 packages not processed

Screenshots NA.

Additional context NA.

mxgrey commented 3 years ago

There appears to be a linking issue with libyaml-cpp on your platform and possibly std::filesystem as well. Without having access to an nvidia jetson xavier nx, it will be quite difficult for us to identify why those linking issues exist. You'll need to check how libyaml-cpp is installed and whether its cmake config-file (or find-module) on your system is correctly importing its targets.

For your reference, the config-file for libyaml-cpp on my platform is located at /usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-config.cmake

luca-della-vedova commented 3 years ago

Hi @winnerineast I have a Xavier NX lying around and I tried to compile rmf, here are my findings:

Basically it seems most of the issues arise from the ecosystem being stuck to Ubuntu 18.04 and should be solved once they provide Ubuntu 20.04 images (or if you wanted you could just upgrade manually).

mxgrey commented 3 years ago

Since the issue is understood and needs to be corrected on the platform rather than in any RMF package, I'm going to close this ticket.