Jordan Foreman
Jordan Foreman

Reputation: 3888

XCode Build Failure - aclocal [/share] files missing

I'm trying to build an XCode project, and am getting the following error when trying to build:

...
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)

Taking a look at build-libssh2.log I see the following:

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

Digging a little further, it would seem that all of the files in /usr/local/share/aclocal are symlinks to themselves. Is that intended, or is this causing my problems?

Also, when I run which aclocal I get pointed to /usr/local/bin/aclocal. Does this mean that XCode or some shell script is trying to use the wrong aclocal install? If so - how do I fix that?

That's about as far as I've got right now. I'm going to keep digging, and I'll update this as I learn more.

Upvotes: 1

Views: 1861

Answers (1)

Dmitry
Dmitry

Reputation: 2887

I had the same issue and first I run brew doctor. It showed bunch of broken symlinks and it suggested to do brew prune. After this libssh2 and objective-git compiled without any issues.

Upvotes: 11

Related Questions