Solve the kalibr_allan compilation error libpython3.8.so: undefined reference to `XML_SetHashSalt' under Ubuntu20.04

kalibr_allan project link:
https://github.com/rpng/kalibr_allan

When compiling the kalibr_allan tool under Ubuntu20.04, I encountered the following error message:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libpython3.8.so: undefined reference to `XML_SetHashSalt'
collect2: error: ld returned 1 exit status
make[2]: *** [kalibr_allan/bagconvert/CMakeFiles/bagconvert.dir/build.make:161:/home/slender/kalibr_allan/devel/lib/bagconvert/bagconvert] 错误 1
make[1]: *** [CMakeFiles/Makefile2:610:kalibr_allan/bagconvert/CMakeFiles/bagconvert.dir/all] 错误 2
make: *** [Makefile:141:all] 错误 2
Invoking "make -j8 -l8" failed

After referring to the following blog, I found that it is because of the conflict of libexpat.so.1, and the libexpat.so.1 in matlab and python3.8 point to different points.
https://www.coder.work/article/6733037

Find libexpat.so.1 under matlab and just change the name:

cd /usr/local/MATLAB/R2018b/bin/glnxa64
mv libexpat.so.1 libexpat.so.1.NOFIND

In addition, if the matlab path cannot be found, modify line 60 of the /kalibr_allan/bagconvert/cmake/FindMatlab.cmake file:
Insert image description here

Guess you like

Origin blog.csdn.net/slender_1031/article/details/128487692