MacOS的莫哈韦:./configure脚本检查归档(AR)接口时失败

问题描述 投票:0回答:1

我建立了OpenFST包,它使用了autoconf之前运行./configure命令。对于ar接口检查时,脚本失败:

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... unknown
configure: error: could not determine ar interface

这似乎与this question,但我不明白如何使脚本中使用正确的MacOS的文件,这样的配置是可行的。

macos configure autoconf openfst
1个回答
2
投票

看里面的config.log,原来的问题涉及到使用了错误的ar和错误ranlib位于/opt/local/bin/而不是/usr/bin的人。

运行该解决的问题:

sudo mv /opt/local/bin/ranlib /opt/local/bin/ranlib-backup-2019-02-09
sudo mv /opt/local/bin/ar /opt/local/bin/ar-backup-2019-02-09

基于在此讨论的建议:https://github.com/commercialhaskell/stack/issues/4380

© www.soinside.com 2019 - 2024. All rights reserved.