sudo apet-get install make&cmake
g++版本需要7.3及以上
sudo apt-get install g++ # g++版本需要7.3及以上
tar -xzvf libzmq-4.3.4.tar.gz .
cd libzmq-4.3.4
./autogen.sh
./configure --prefix=/path/to/where/you/want --without-libsodium
make
make install
下载yaml安装包,可以在官网上下载,使用的yaml版本是yaml-cpp-yaml-cpp-0.7.0,安装包在硬盘中的/GRAND/externalTools/目录下
解压:
tar -xzvf yaml-cpp-yaml-cpp-0.7.0.tar.gz
cd yaml-cpp-yaml-cpp-0.7.0
mkdir build
add_definitions(-w) // 忽略dummy错误
link_directories( /home/grand/pc_installed/lib ) // 指定外部链接库
cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/grand/pc_installed -DBUILD_SHARED_LIBS=ON ..
// -DCMAKE_INSTALL_PREFIX=/path/to/where/you/want 指定安装目录
// 或者在CMake文件中添加 SET(CMAKE_INSTALL_PREFIX < install_path >), 要加在 PROJECT(< project_name>) 之后。
// -DBUILD_SHARED_LIBS=ON 开启动态链接库编译,默认关闭
make -j8
sudo make install
sudo ldconfig
yaml环境搭建完毕sudo apt-get install libboost-all-dev
locate boost_thread
set(BOOST_LIBRARYDIR /usr/lib) # 假设boost所在位置为/usr/lib/x86_64-linux-gnu/libboost_thread.a
find_package(Boost REQUIRED COMPONENTS thread)
vi /home/xuxing/externalTools/DBH/yaml-cpp-release-0.5.0/include/yaml-cpp/node/detail/iterator.h
#include <boost/next_prior.hpp> // boost所在头文件
scp /tools/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/lib64/libstdc++.so.6.0.24 root@192.168.10.2:/lib/
scp /tools/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/lib64/libgcc_s.so.1 root@192.168.10.2:/lib/
ssh root@<arm-host>
cd /lib
ln -s libstdc++.so.6.0.24 libstdc++.so.6
ln -s libstdc++.so.6 libstdc++.so
ln -s libgcc_s.so.1 libgcc_s.so
详情见step_for_cpp.txt,内容如下:
1. scp /tools/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/lib64/libstdc++.so.6.0.24 root@192.168.61.xx:/lib/
2. scp /tools/Xilinx/SDK/2018.3/gnu/aarch64/lin/aarch64-linux/aarch64-linux-gnu/lib64/libgcc_s.so.1 root@192.168.61.xx:/lib/
3. ssh root@<arm-host>
4. cd /lib/
5. ln -s libstdc++.so.6.0.24 libstdc++.so.6
6. ln -s libstdc++.so.6 libstdc++.so
7. ln -s libgcc_s.so.1 libgcc_s.so
那么需要进行以下步骤:
1. rm ./build-arm/CMakeCache.txt
2. rm ./build-x86_64/CMakeCache.txt
3. vi CMakeLists.txt # 修改 set(EXTERNAL_DIR_ARM /home/duanbh/arm_a_installed) 与 set(EXTERNAL_DIR_PC /home/duanbh/pc_installed) 至 /home/user
4. vi ./package.sh # 修改 EXTERNAL_DIR_PC=/home/grand/pc_installed 与 EXTERNAL_DIR_ARM=/home/grand/arm_a_installed 至 /home/user
5. vi env.sh # 修改所有/home/grand 至 /home/user
完成完整步骤,
如有其他问题,仍会继续更新。