0
votes

I have cross compiled boost for QNX and all the build files exists under the path /home/hari1234/qnx_cross_compile/src/arm/boost_1_63_0/build/include and /home/hari1234/qnx_cross_compile/src/arm/boost_1_63_0/build/lib

I am trying to compile ROS from source and it fail

/opt/qnx/install/host/linux/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld: warning: bin.v2/libs/system/build/qcc-arm/release/target-os-qnx/threading-multi/libboost_system.so.1.63.0, needed by /home/hari1234/qnx_cross_compile/src/arm/boost_1_63_0/build/lib/libboost_filesystem.so, not found (try using -rpath or -rpath-link) /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: warning: The 'tmpnam' function is dangerous. Use 'mkstemp' instead. /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: warning: The 'tempnam' function is dangerous. Use 'mkstemp' instead. /opt/qnx/install/host/linux/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld: warning: bin.v2/libs/system/build/qcc-arm/release/target-os-qnx/threading-multi/libboost_system.so.1.63.0, needed by /home/hari1234/qnx_cross_compile/src/arm/boost_1_63_0/build/lib/libboost_filesystem.so, not found (try using -rpath or -rpath-link) /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to boost::program_options::validate(boost::any&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, int)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference toboost::program_options::abstract_variables_map::operator[](std::__1::basic_string, std::__1::allocator > const&) const' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to boost::program_options::options_description::options_description(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int, unsigned int)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference toboost::program_options::detail::cmdline::cmdline(std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > const&)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to boost::program_options::to_internal(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference toboost::program_options::arg' /opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/lib/librospack.so: undefined reference to `boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > > const&, bool) const' cc: /opt/qnx/install/host/linux/x86_64/usr/bin/arm-unknown-nto-qnx7.0.0eabi-ld error 1 CMakeFiles/rospackexe.dir/build.make:106: recipe for target '/opt/qnx/install/arm_catkin_ros/devel_isolated/rospack/bin/rospack' failed

The warning suggests that libboost_filesystem.so looks for bin.v2/libs/system/build/qcc-arm/release/target-os-qnx/threading-multi/libboost_system.so.1.63.0 which is not found. I am not sure if the bin.v2 folder is to be generated while cross compiling boost for QNX. And I assume this is the reason why the undefined reference error to boost::filesystem::validate is happening.

Any pointers or help would be highly appreciated

Thanks in advance

1

1 Answers

0
votes

I was able to get past this issue by compiling boost libraries as static ones as opposed to dynamic ones. I was told that the original issue has to do something with setting the rpath