标签:zip 14. sshfs min libpcap date echo 为什么 cppcheck
sudo apt-get update -y && sudo apt-get install -y apt-transport-https bc build-essential cmake cppcheck curl debconf-utils doxygen gdb git google-perftools graphviz lcov libblas-dev libboost-all-dev libcurl4-openssl-dev libfreetype6-dev liblapack-dev libpcap-dev locate lsof nfs-common realpath shellcheck software-properties-common sshfs subversion unzip v4l-utils vim wget zip
/home/tmp
, 所以需要自己创建这个目录并把一些第三方库的压缩包放到该目录下, 具体可以参看install_bazel_packages.sh
目录:mkdir -p /home/tmp
cd /home/tmp
wget -O opencv-2.4.13.2.zip https://github.com/opencv/opencv/archive/2.4.13.2.zip
wget -O googletest-release-1.8.0.tar.gz https://github.com/google/googletest/archive/release-1.8.0.tar.gz
wget -O gflags-2.2.0.tar.gz https://github.com/gflags/gflags/archive/v2.2.0.tar.gz
wget -O glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz
wget -O benchmark-1.1.0.tar.gz https://github.com/google/benchmark/archive/v1.1.0.tar.gz
wget -O eigen-3.2.10.tar.gz https://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz
wget -O civetweb-1.10.tar.gz https://github.com/civetweb/civetweb/archive/v1.10.tar.gz
wget -O curlpp-0.8.1.tar.gz https://github.com/jpbarrette/curlpp/archive/v0.8.1.tar.gz
wget -O yaml-cpp-0.5.3.zip https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.zip
wget -O qp-oases-3.2.1-1.zip https://github.com/startcode/qp-oases/archive/v3.2.1-1.zip
wget -O proj.4-4.9.3.zip https://github.com/OSGeo/proj.4/archive/4.9.3.zip
wget -O tinyxml2-5.0.1.zip https://github.com/leethomason/tinyxml2/archive/5.0.1.zip
wget -O protobuf-3.3.0.tar.gz https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
bash docker/scripts/dev_start.sh && bash docker/scripts/dev_into.h
sudo apt-get install libgflags-dev
安装的话, 就有可能出现gflag
命名空间出错的问题。apollo.sh
脚本就行, 但是要注意的是, 该脚本会检查是否是在docker环境下, 所以需要将function source_apollo_base()
函数中check docker environment的if语句注释掉,具体为:function apollo_check_system_config() {
# check docker environment
# if [ ${MACHINE_ARCH} == "x86_64" ] && [ ${APOLLO_IN_DOCKER} != "true" ]; then
# echo -e "${RED}Must run $0 in dev docker or release docker${NO_COLOR}"
# exit 0
# fi
# check operating system
OP_SYSTEM=$(uname -s)
case $OP_SYSTEM in
"Linux")
echo "System check passed. Build continue ..."
# check system configuration
DEFAULT_MEM_SIZE="2.0"
MEM_SIZE=$(free | grep Mem | awk ‘{printf("%0.2f", $2 / 1024.0 / 1024.0)}‘)
if (( $(echo "$MEM_SIZE < $DEFAULT_MEM_SIZE" | bc -l) )); then
warning "System memory [${MEM_SIZE}G] is lower than minimum required memory size [2.0G]. Apollo build could fail."
fi
;;
"Darwin")
warning "Mac OS is not officially supported in the current version. Build could fail. We recommend using Ubuntu 14.04."
;;
*)
error "Unsupported system: ${OP_SYSTEM}."
error "Please use Linux, we recommend Ubuntu 14.04."
exit 1
;;
esac
}
./apollo.sh build_cpu
就可以愉快的编译了, 但是可能编译的时候会出现各种错误, 特别要关注那些错误提醒, 一般都是包没有安装完全, 将对应包放到对应目录下就可以了。sudo apt-get install freeglut3-dev
来安装glut。/usr/local/lib
中。sudo ld -l库名称 --verbose
进行查看是否有对应的库, 有时候库的版本太多也不行, 需要卸载到不需要的版本。标签:zip 14. sshfs min libpcap date echo 为什么 cppcheck
原文地址:https://www.cnblogs.com/longjiang-uestc/p/10126301.html