boost交叉编译安装(aarch64)

在做rk3568开发,默认的文件系统中不带boost库,所以需要自己重新交叉编译boost

交叉编译在ubuntu18.04虚拟机中进行,事先需要安装交叉编译器aarch64-linux-gnu-gcc并下载boost_1_73_0.tar.gz

tar -zxvf boost_1_73_0.tar.gz解压源码文件

进入目录

cd boost_1_73_0

查看可选库

./bootstrap.sh --show-libraries

显示结果

root@ubuntu:/home/ireal/third/boost_1_73_0# ./bootstrap.sh --show-libraries

Building Boost.Build engine with toolset gcc... tools/build/src/engine/b2

The following Boost libraries have portions that require a separate build

and installation step. Any library not listed here can be used by including

the headers only.

The Boost libraries requiring separate building and installation are:

    - atomic

    - chrono

    - container

    - context

    - contract

    - coroutine

    - date_time

    - exception

    - fiber

    - filesystem

    - graph

    - graph_parallel

    - headers

    - iostreams

    - locale

    - log

    - math

    - mpi

    - nowide

    - program_options

    - python

    - random

    - regex

    - serialization

    - stacktrace

    - system

    - test

    - thread

    - timer

    - type_erasure

    - wave

配置交叉编译,选择filesystem,system,thread三个库,工具先选gcc

./bootstrap.sh --with-libraries=filesystem,system,thread --with-toolset=gcc

进行配置,成功如下图

之后再修改配置文件project-config.jam

if ! gcc in [ feature.values <toolset> ]

{

   using gcc : arm : /usr/local/arm64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc ;

}

编译

./b2

显示选择的库被编译,其他的不编译

成功如下图

安装

./b2 install --prefix=./aarch64_install

安装完成后在aarch64_install目录空中生产include和lib文件夹

在lib文件夹中有编译生成的库文件,filesystem,system,thread库均已完成

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值