You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多
文档控制台
免费开始使用

MSYS2环境下Waf配置Ardour时无法检测到已安装Boost库的问题求助

MSYS2环境下Waf配置Ardour时无法检测到已安装Boost库的问题求助

大家好,我在全新安装的MSYS2环境里,尝试编译Ardour(数字音频工作站)时遇到了Boost库检测失败的问题,想请教下各位怎么解决这个状况。

我的操作步骤如下:

  1. 安装MSYS2:从官网下载安装包完成安装,打开默认的UCRT 64-bit shell
  2. 安装依赖工具与库:在shell里执行了以下命令安装git、clang、waf和Boost:
pacman -S git mingw-w64-ucrt-x86_64-clang
pacman -S $(pacman -Ss .*waf.* | grep ucrt | awk '{print $1}')
pacman -S $(pacman -Ss .*boost.* | grep ucrt | awk '{print $1}')

成功安装的包及版本为:

  • git 2.50.1-1
  • mingw-w64-ucrt-x86_64-clang-20.1.8-1
  • mingw-w64-ucrt-x86_64-waf-2.1.5-1
  • mingw-w64-ucrt-x86_64-boost-1.88.0-2
  • mingw-w64-ucrt-x86_64-boost-libs-1.88.0-2
  1. 克隆Ardour源码
git clone git://git.ardour.org/ardour/ardour.git
  1. 运行Waf配置检查依赖
cd ardour
./waf configure

但执行后Waf返回配置失败,核心错误是检测Boost库版本>=1.68时不通过,完整输出如下:

Ardour Configuration
* Will build against private GTK dependency stack : no
* Will rely on libintl built into libc : yes
* Will build against private Ardour dependency stack : no
Checking for function 'dlopen' in dlfcn.h : yes
Checking for boost library >= 1.68 : no
The configuration failed (complete log in D:/usr/local/msys64/home/amwin/ardour/build/config.log)

查看配置日志config.log,里面的关键错误信息是:

err: ../test.cpp:1:10: fatal error: boost/version.hpp: No such file or directory
1 | #include <boost/version.hpp>
  |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

奇怪的是,我用locate version.hpp命令能找到该文件明明存在于/ucrt64/include/boost/version.hpp路径下。而且我也尝试过用Ardour的tarball压缩包代替git克隆的源码,结果遇到了完全一样的问题。

我怀疑是不是Waf默认的库搜索路径不包含MSYS2的UCRT64目录?但我不太想随便移动Boost库或者修改Waf的配置,因为这并不是官方文档里要求的操作——我理解Waf应该和CMake一样,能自动检测到系统中已安装的依赖库才对。

有没有朋友遇到过类似的问题,或者知道这个状况的解决办法?


内容来源于stack exchange

火山引擎 最新活动