XCode构建失败 - 缺少aclocal [/ share]文件

时间:2014-08-06 03:13:35

标签: xcode automake libssh2 objective-git

我正在尝试构建一个XCode项目,并在尝试构建时遇到以下错误:

...
Building for x86_64 i386 armv7 armv7s arm64
Building libssh2 for iphonesimulator7.1 x86_64
Please stand by...
/Users/jordanforeman/dev/ios/MyProject/objective-git/External/libssh2-ios/bin/iphonesimulator7.1-x86_64.sdk/build-libssh2.log
Command /bin/sh failed with exit code 1

** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Run\ Script /Users/jordanforeman/Library/Developer/Xcode/DerivedData/MyProject-azifgvrunekkgmagzghrrvpdathe/Build/Intermediates/ObjectiveGitFramework.build/Debug-iphoneos/libssh2-iOS.build/Script-6A3C609117D5963700382DFF.sh
(1 failure)

看一下build-libssh2.log我看到以下内容:

aclocal: error: aclocal: file '/usr/local/share/aclocal/pkg.m4' does not exist
autoheader: error: AC_CONFIG_HEADERS not found in configure.ac
cp: src/libssh2_config.h.in: No such file or directory
configure.ac:5: error: possibly undefined macro: AM_CONFIG_HEADER
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

...

tests/Makefile.am:11: error: SSHD does not appear in AM_CONDITIONAL
parallel-tests: installing './test-driver'
/usr/local/Cellar/automake/1.14.1/share/automake-1.14/am/check2.am: error: am__EXEEXT does not appear in AM_CONDITIONAL

full log here

进一步挖掘,似乎/usr/local/share/aclocal中的所有文件都是自己的符号链接。这是有意的,还是这会导致我的问题?

此外,当我运行which aclocal时,我会指向/usr/local/bin/aclocal。这是否意味着XCode或某些shell脚本试图使用错误的aclocal安装?如果是这样 - 我该如何解决这个问题?

就我现在所做的而言。我要继续挖掘,随着我的了解,我会更新这个。

1 个答案:

答案 0 :(得分:11)

我有同样的问题,首先我运行brew doctor。它显示了一堆破碎的符号链接,它建议brew prune。在此之后编译libssh2和objective-git没有任何问题。