0

我正在尝试在 macOS High Sierra 10.13.6 上编译Ardor (6.0.0) 的稳定版本,我已通过git clone https://github.com/boostorg/boost.git. 我已经设法解决了前几个依赖项,但现在我坚持通过 Ardor 检测libarchive。我还安装了最新版本的 Homebrew (2.3.0)。

当我运行sudo ./waf configure --boost-include=/usr/local/boost-1.73.0/include CXX=g++-9 CC=gcc-9编译 Ardour 时,输出如下:

Setting top to                           : /Users/kjesso/ardour/6.0.70-x86_64 
Setting out to                           : /Users/kjesso/ardour/6.0.70-x86_64/build 
Checking for 'gcc' (C compiler)          : gcc-9 
Checking for 'g++' (C++ compiler)        : g++-9 

Global Configuration 
 * Install prefix                                    : /usr/local 
 * Debuggable build                                  : True 
 * Build documentation                               : False 

Ardour Configuration 
 * Will build against private GTK dependency stack   : no 
 * Will use explicit linkage against libintl in /Users/kjesso/gtk/inst : yes 
 * Will build against private Ardour dependency stack : no 
No Carbon support available for this build

Checking for function 'dlopen' in dlfcn.h            : yes 
Checking for boost library >= 1.56                   : ok 
Checking for program 'pkg-config'                    : /usr/local/bin/pkg-config 
Checking for 'glib-2.0' >= 2.28                      : yes 
Checking for 'gthread-2.0' >= 2.2                    : yes 
Checking for 'glibmm-2.4' >= 2.32.0                  : yes 
Checking for 'sndfile' >= 1.0.18                     : yes 
Checking for 'giomm-2.4' >= 2.2                      : yes 
Checking for 'libcurl' >= 7.0.0                      : yes 
Checking for 'libarchive' >= 3.0.0                   : not found 
The configuration failed
(complete log in /Users/kjesso/ardour/6.0.70-x86_64/build/config.log)

这是 Ardor 的输出build/config.log

Checking for 'libarchive' >= 3.0.0
['/usr/local/bin/pkg-config', 'libarchive >= 3.0.0', '--cflags', '--libs', 'libarchive']
err: Package libarchive was not found in the pkg-config search path.
Perhaps you should add the directory containing `libarchive.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libarchive' found
Package libarchive was not found in the pkg-config search path.
Perhaps you should add the directory containing `libarchive.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libarchive' found

libarchive pkgconfig 目录确实包含以下libarchive.pc文件:

MacBookPro:ardour kjesso$ ls -al /usr/local/opt/libarchive/lib/pkgconfig
total 8
drwxr-xr-x  3 kjesso  staff  102  7 Jun 22:05 .
drwxr-xr-x  6 kjesso  staff  204 19 May 18:10 ..
-r--r--r--  1 kjesso  staff  378  7 Jun 22:05 libarchive.pc

我已经通过 homebrew 安装了最新版本的 libarchive 3.4.3,将 libarchive pkgconfig 路径添加到 PKG_CONFIG_PATH 环境变量以及来自 libarchive homebrew install 的其他说明:

libarchive 是仅限 keg 的,这意味着它没有符号链接到 /usr/local,因为 macOS 已经提供了这个软件,并且并行安装另一个版本可能会导致各种麻烦。

如果您需要在 PATH 运行中首先使用 libarchive: echo 'export PATH="/usr/local/opt/libarchive/bin:$PATH"' >> /Users/kjesso/.bash_profile

要让编译器找到 libarchive,您可能需要设置: export LDFLAGS="-L/usr/local/opt/libarchive/lib" export CPPFLAGS="-I/usr/local/opt/libarchive/include"

要让 pkg-config 找到 libarchive,您可能需要设置:export PKG_CONFIG_PATH="/usr/local/opt/libarchive/lib/pkgconfig"

PKG_CONFIG_PATH 环境变量的输出:

MacBookPro:ardour kjesso$ echo $PKG_CONFIG_PATH
/usr/local/opt/libarchive/lib/pkgconfig/

该路径/usr/local/opt/libarchive是一个符号链接/usr/local/Cellar/libarchive/3.4.3/

MacBookPro:6.0.70-x86_64 kjesso$ ls -al /usr/local/opt/libarchive
lrwxr-xr-x  1 kjesso  admin  26  7 Jun 22:05 /usr/local/opt/libarchive -> ../Cellar/libarchive/3.4.3

我在网上搜索过,但没有发现任何有用的东西。任何人都知道为什么 Ardor 没有检测到 libarchive 的最新版本 3.4.3?

4

0 回答 0