Undefined reference error when building autoware workspace on ubuntu 22.04

asked 2023-07-26 23:46:50 -0500

kyy gravatar image

updated 2023-07-27 23:45:39 -0500

Hello, I met a problem when I build the autoware workspace. I followed its official guideline: https://autowarefoundation.github.io/....

System: Ubuntu 22.04, ROS2 Humble

Command to execute: colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

Output:

......
Starting >>> lanelet2_map_preprocessor                                   
Finished <<< tier4_adapi_rviz_plugin [1.54s]
Starting >>> tier4_traffic_light_rviz_plugin                             
--- stderr: costmap_generator                                            
/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_getinfo@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_perform@CURL_OPENSSL_4'
/usr/bin/ld: /lib/x86_64-linux-gnu/libnetcdf.so.19: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFReadRGBAStripExt@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFReadFromUserBuffer@LIBTIFF_4.0'
......
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFGetStrileOffsetWithErr@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_addpart@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_version_info@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_name@CURL_OPENSSL_4'
gmake[2]: *** [CMakeFiles/test_objects_to_costmap.dir/build.make:607: test_objects_to_costmap] Error 1
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFGetStrileOffset@LIBTIFF_4.0'
gmake[1]: *** [CMakeFiles/Makefile2:271: CMakeFiles/test_objects_to_costmap.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `TIFFGetStrileByteCount@LIBTIFF_4.0'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_filename@CURL_OPENSSL_4'
......
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_free@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_init@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_mime_data_cb@CURL_OPENSSL_4'
/usr/bin/ld: /lib/libgdal.so.30: undefined reference to `curl_multi_wait@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/test_points_to_costmap.dir/build.make:607: test_points_to_costmap] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:243: CMakeFiles/test_points_to_costmap.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

In the /usr/lib/ directory, libgdal.so, libgdal.so.30, libgdal.so.30.1 exist.

The packages may be related, like libcurl4-openssl-dev have been installed.

When I try to install gdal independently, it also output similar errors like:

/usr/bin/ld: /home/lab/Downloads/gdal-3.4.2/.libs/libgdal.so: undefined reference to `ffinit'
/usr/bin/ld: /home/lab/Downloads/gdal-3.4.2/.libs/libgdal.so: undefined reference to `jpeg_write_tables@LIBJPEG_9.0'
/usr/bin/ld: /home/lab/Downloads/gdal-3.4.2/.libs/libgdal.so: undefined reference to `ffthdu'
......
edit retag flag offensive close merge delete