1

我正在尝试构建一个 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 安装?如果是这样 - 我该如何解决?

这就是我现在所掌握的。我会继续挖掘,当我了解更多时,我会更新这个。

4

1 回答 1

11

我有同样的问题,首先我运行brew doctor. 它显示了一堆损坏的符号链接,并建议这样做brew prune。在此 libssh2 和 Objective-git 编译后没有任何问题。

于 2014-11-05T01:41:39.013 回答