ROS with DriveWorks on Xavier compilation and runtime issues

Because now I can not cross compile for ROS,
I build ROS on Xavier, but I meet the compilation issue for libgdal.so

//usr/lib/libgdal.so.20: undefined reference to `xercesc_3_2::DOMImplementationRegistry::getDOMImplementation(char16_t const*)'
//usr/lib/libgdal.so.20: undefined reference to `xercesc_3_2::XSModel::getComponentsByNamespace(xercesc_3_2::XSConstants::COMPONENT_TYPE, char16_t const*)'
...

So I add target_link_libraries for xerces-c in CMakeLists.txt
Then it will be compile success.
But at runtime it show

/home/nvidia/ros_ws/devel/lib/driveworks_test/gmsl_node: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: _ZN11xercesc_3_211InputSource11setEncodingEPKDs

All these code I build on host machine, it’s work. And no any runtime issues.
If any suggest?

Dear Denny.hsu,
We are checking internally on this topic. I will let you know the steps

Dear Denny.hsu,
The ROS compilation steps are available in next release of DRIVE SW documentation. If you need them now, can you please file a bug and share bug ID here.

Dear Denny.hsu,

Have you compiled ROS using this document?
https://docs.nvidia.com/drive/drive_os_5.1.12.0L/nvvib_docs/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide%2FBootloader%2Frobot_os.html%23wwpID0E0BI0HA
If not, could you please help to check it? Thanks.

I had try it for ROS2 before, but failed with something wrong.
I think some package may not be install correctly for ubuntu 18.04.

I will try it again for ROS1 melodic.

Hi Denny.hsu,

Besides cross compiling, you can also refer to http://wiki.ros.org/melodic/Installation/Source for source installation directly on your system. It’s even more straightforward and working well. Thanks!

I build ROS on Xavier, but I meet the compilation issue for libgdal.so… like my first comment…

My gmsl node use cv_bridge to translate image from nvimage to sensor_msgs::ImagePtr
http://wiki.ros.org/image_transport

I’m not sure if this is an nvidia-specific issue. Could you help check below?

Please directly check if the function symbol is exported from the library actually.
Please see if the issue is reproducible on host system too.
Please share your complete steps to reproduce the issue.

Maybe the issue is not related to ROS.
First install gdal-bin.
Then input command “gdalinfo”.
On host system, no error displayed. But on Xavier Drive Software 10.0, it shows the error
$ gdalinfo
gdalinfo: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: _ZN11xercesc_3_211InputSource11setEncodingEPKDs.

on Xavier Drive Software 9.0, no error.

We have two target systems, they act the same as i described above.

The detail is reported in this topic:
“libgdal.so has undefined symbol”
https://devtalk.nvidia.com/default/topic/1069642/libgdal-so-has-undefined-symbol/?offset=3#5418921

Can you check it please?

We have identified the issue and provide a resolution in that topic. Please check. Thanks!