colcon build 编译报错如下:
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_closure_alloc@LIBFFI_CLOSURE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_type_pointer@LIBFFI_BASE_7.0'
/usr/bin/ld: /usr/local/lib/libpcl_io.so: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_prep_closure_loc@LIBFFI_CLOSURE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_type_uint8@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_prep_cif@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_type_uint64@LIBFFI_BASE_7.0'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pkg_simulator_main_ui.dir/build.make:562: pkg_simulator_main_ui] Error 1
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/pkg_simulator_main_ui.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
解决:
sudo ln -s /lib/x86_64-linux-gnu/libffi.so.7.1.0 /opt/ros/foxy/lib/libffi.so.7