我正在尝试构建一个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
完整记录在这里
进一步挖掘,似乎所有文件/usr/local/share/aclocal
都是自己的符号链接.这是有意的,还是这会导致我的问题?
而且,当我跑步时,which aclocal
我会指出/usr/local/bin/aclocal
.这是否意味着XCode或某些shell脚本试图使用错误的aclocal安装?如果是这样 - 我该如何解决?
这就是我现在所拥有的.我将继续挖掘,随着我的了解,我将更新此内容.
我有同样的问题,首先我跑brew doctor
.它显示了一堆破碎的符号链接,它建议这样做brew prune
.之后这个libssh2和objective-git编译没有任何问题.