Boost

编译安装

  1. 先从官网下载源码:Boost 1.85.0
  2. 然后编译安装:
# 运行 bootstrap 脚本
# --prefix 指定安装路径,建议指定一个明确的路径以便后续删除或替换
./bootstrap.sh --prefix=/usr/local/boost_1_85_0

# 随后修改user-config.jam,添加
using python : 3.12 
  : /data/storage/Programs/miniconda3/envs/py312/bin/python3 
  : /data/storage/Programs/miniconda3/envs/py312/include/python3.12 
  : /data/storage/Programs/miniconda3/envs/py312/lib 
  ;

# 编译
# -a:Rebuild All
./b2 --user-config=user-config.jam -a \
    --with-python \
    --debug-configuration \
    python=3.12 \
    link=static,shared \
    threading=multi \
    -j4 \
    cxxflags="-fPIC"

# 安装
sudo ./b2 install --prefix=/usr/local/boost_1_85_0