Autoware.auto常见问题及解决方案

cc1plus: error: bad value (‘tigerlake’) for ‘-march=’ switch

原因分析:gcc版本过低,更新gcc版本至10.0版本
解决方案

  1. ade环境下更新软件源
sudo gedit /etc/apt/sources.list

在文件中输入:

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://mirrors.aliyun.com/ubuntu/ focal-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://mirrors.aliyun.com/ubuntu/ focal multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ focal-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://mirrors.aliyun.com/ubuntu/ focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
  1. ade环境下更新gcc
sudo apt install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
sudo update-alternatives --config gcc

2. /usr/bin/ld: warning: libhdf5.so.101, needed by /usr/lib/x86_64-linux-gnu/libarmadillo.so.9, not found

--- stderr: grid_map_ros
/usr/bin/ld: warning: libhdf5.so.101, needed by /usr/lib/x86_64-linux-gnu/libarmadillo.so.9, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libarmadillo.so.9: undefined reference to `H5Ovisit'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/grid_map_ros-test.dir/build.make:290: grid_map_ros-test] Error 1
make[1]: *** [CMakeFiles/Makefile2:103: CMakeFiles/grid_map_ros-test.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

原因分析:缺少libhdf5.so.101库文件
解决方案:先查看电脑里是否有该文件,运行locate libhdf5.so发现:
Autoware.auto常见问题及解决方案_第1张图片
电脑中存在libhdf5.so.101库文件,将库文件路径添加到环境变量中即可。

 echo "export LD_LIBRARY_PATH=/home/zhangying/anaconda3/lib:$LD_LIBRARY_PATH" >> ~/.bashrc
 echo "export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH" >> ~/.bashrc
 source ~/.bashrc

3.libfontconfig.so.1: undefined reference to `uuid_generate_random@UUID_1.0’

解决方案
找到自己anaconda3目录下的lib,搜索libuuid,将搜索到的文件全部删除。
Autoware.auto常见问题及解决方案_第2张图片

4. cc1plus: all warnings being treated as errors

解决方案

export CFLAGS="-Wno-error"
export CXXFLAGS="-Wno-error"

你可能感兴趣的:(autoware.auto,编译,安装,常见问题)