报错信息一:./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token “(“
解决方法:
先确保必须的依赖已经装上
sudo apt-get update
sudo apt-get install -y python3-wstool python3-rosdep ninja-build stow
如果都已经安装,那就是试下面的方法
在你的./boost/boost/thread/pthread里找到thread_data.hpp
里面把#if PTHREAD_STACK_MIN>0
换成#ifdef PTHREAD_STACK_MIN
报错信息二:
ninja: error: '/usr/lib/x86_64-linux-gnu/libpthread.so', needed by '/home/name/carto_ws/devel_isolated/cartographer_rviz/lib/libcartographer_rviz.so', missing and no known rule to make it'
原因libpthread.so文件丢失
先确保libpthread库是否安装:
sudo apt-get update
sudo apt-get install libpthread-stubs0-dev
再尝试手动连接:
sudo ln -s /usr/lib/x86_64-linux-gnu/libpthread.so.0 /usr/lib/x86_64-linux-gnu/libpthread.so
这样基本就解决问题了