leedm777 / homebrew-asterisk

Homebrew tap for building an Asterisk dev environment
50 stars 27 forks source link

[Sierra 10.12.5] make[1] fails on install #27

Closed Shugabuga closed 6 years ago

Shugabuga commented 6 years ago

I try to install Asterisk via Homebrew after following the instructions in the README and I get the below error:

brew install asterisk results in:

==> Installing asterisk from leedm777/asterisk
==> Downloading http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-14.6.0.tar.gz
Already downloaded: /Users/HeyItsShuga/Library/Caches/Homebrew/asterisk-14.6.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/asterisk/14.6.0 --sysconfdir=/usr/local/etc --localstatedir=/usr/local/var --datadir=/usr/local/Cellar/asterisk/14.6.0/share/asterisk --docdir=/usr/local/
==> make menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect menuselect/menuselect menuselect-tree menuselect.makeopts
Last 15 lines from /Users/HeyItsShuga/Library/Logs/Homebrew/asterisk/02.make:
CC="cc" CXX="g++-7" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" gmenuselect
CC="cc" CXX="g++-7" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" menuselect
gcc-7  -g -D_GNU_SOURCE -Wall -I/Volumes/Shuga's-Passport/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2   -c -o menuselect.o menuselect.c
make[1]: Nothing to be done for `nmenuselect'.
make[1]: Nothing to be done for `gmenuselect'.
gcc-7  -g -D_GNU_SOURCE -Wall -I/Volumes/Shuga's-Passport/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2   -c -o menuselect.o menuselect.c
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [menuselect.o] Error 2
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [menuselect.o] Error 2
make: *** [menuselect/menuselect] Error 2
make: *** Waiting for unfinished jobs....
make: *** [menuselect/cmenuselect] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/leedm777/homebrew-asterisk/issues

These open issues may also help:
Error: leedm777/asterisk/asterisk 14-devel did not build https://github.com/leedm777/homebrew-asterisk/issues/25
Asterisk crashes when homebrew is installed somewhere other than `/usr/local` https://github.com/leedm777/homebrew-asterisk/issues/20

Error: You have MacPorts or Fink installed:
  /opt/local/bin/port

This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.

  sudo mv /opt/local ~/macports

Any help would be appreciated.

Note that it also doesn't compile regularly.

Running macOS Sierra 10.12.5 build 16F73.

leedm777 commented 6 years ago

@Shugabuga That's an odd one. Can you rebuild using HOMEBREW_MAKE_JOBS=1 brew install asterisk --verbose, and put that output in a gist/ghostbin/pastebin/wherever?

Shugabuga commented 6 years ago

Here's the output.

Have a feeling it's either a missing dependency not accounted for or an issue with Asterisk itself, as I think I got a similar issue when manually compiling.

Here is where I think the issue occurred:

configure: Package configured for: 
configure: OS type  : darwin16.6.0
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : apple : darwin16.6.0 :
configure: host-cpu:vendor:os: x86_64 : apple : darwin16.6.0 :
==> make menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect menuselect/menuselect menuselect-tree menuselect.makeopts
CC="cc" CXX="g++-7" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" cmenuselect
gcc-7  -g -D_GNU_SOURCE -Wall -I/Volumes/Shuga's-Passport/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2   -c -o menuselect.o menuselect.c
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [menuselect.o] Error 2
make: *** [menuselect/cmenuselect] Error 2
leedm777 commented 6 years ago

Oh, I see it now. Your volume name has a single quote in it. /Volumes/Shuga's-Passport

When bash sees the single-quote, it thinks you're quoting a string and fails when the command ends without the end quote. Generally speaking, paths with quotes (or spaces, for that matter) are really problematic for Bash scripts to deal with properly.

If you're lucky, you might be able to use some symlink trickery to get it to work. But I highly recommend renaming the volume so that the name is only alphanumerics, dashes, or underscores.

Shugabuga commented 6 years ago

Can confirm this was the issue, renaming drive, updating Xcode path, then installing did work.