ubuntu 20.04 安装 gtsam

安装依赖

Boost >= 1.43 (Ubuntu: sudo apt-get install libboost-all-dev)
CMake >= 3.0 (Ubuntu: sudo apt-get install cmake)
A modern compiler, i.e., at least gcc 4.7.3 on Linux.
​

安装 TBB

 sudo apt-get install libtbb-dev
​

安装MKL

官网参考链接

sample:

要安装英特尔® 性能库之一的特定版本

sudo apt-get install intel-mkl-2018.2-046

要安装适用于 Python* 的英特尔® 分发版的特定语言版本:

sudo apt-get install intelpython3

下载gtsam

cd ~
git clone https://bitbucket.org/gtborg/gtsam.git
​

编译

cd ~/gtsam
mkdir build
cd build
cmake ..
make check   #可选的,运行单元测试
sudo  make install
​

修改cmakelist

Q1:cmake .. 编译中出现的错误

CMake Error at wrap/CMakeLists.txt:29 (target_link_libraries):
  The "debug" argument must be followed by a library.

解决方法

找到wrap/CMakeLists 文件 把以下内容注释或者删除

  debug
    ${Boost_FILESYSTEM_LIBRARY_DEBUG}
    ${Boost_SYSTEM_LIBRARY_DEBUG}
    ${Boost_THREAD_LIBRARY_DEBUG}

Q2 cmake .. 编译中出现的错误

CMake Error at gtsam/CMakeLists.txt:105 (target_link_libraries):
  The "debug" argument must be followed by a library.

解决方法

注释或删掉gtsam/CMakeLists文件中的俩处代码

  debug
    ${Boost_SERIALIZATION_LIBRARY_DEBUG}
    ${Boost_SYSTEM_LIBRARY_DEBUG}
    ${Boost_FILESYSTEM_LIBRARY_DEBUG}
    ${Boost_THREAD_LIBRARY_DEBUG}
    ${Boost_DATE_TIME_LIBRARY_DEBUG}
    ${Boost_REGEX_LIBRARY_DEBUG}
        debug
          ${Boost_TIMER_LIBRARY_DEBUG}
          ${Boost_CHRONO_LIBRARY_DEBUG}

你可能感兴趣的:(工具,ubuntu,单元测试)