leedm777 / homebrew-asterisk

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

Asterisk not getting installed on OS X Yosemite Version 10.10.3 (14D136) #16

Closed simsolTech closed 8 years ago

simsolTech commented 9 years ago

==> Installing asterisk from leedm777/homebrew-asterisk couldn't understand kern.osversion `14.3.0' ==> Downloading http://downloads.asterisk.org/pub/telephony/asterisk/releases/as Already downloaded: /Library/Caches/Homebrew/asterisk-13.3.0.tar.gz ==> Patching patching file Makefile ==> ./configure --prefix=/usr/local/Cellar/asterisk/13.3.0 --sysconfdir=/usr/loc ==> make menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect me ==> menuselect/menuselect --enable DISABLE_INLINE menuselect.makeopts ==> menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts ==> make all NOISY_BUILD=yes gcc-4.2 -o app_waitforsilence.so -D_THREAD_SAFE -L/usr/local/lib -Wl,-rpath,/usr/local/Cellar/asterisk/13.3.0/lib -bundle -mmacosx-version-min=10.6 -Wl,-undefined,dynamic_lookup /usr/lib/bundle1.o app_waitforsilence.o
gcc-4.2 -o app_waituntil.so -D_THREAD_SAFE -L/usr/local/lib -Wl,-rpath,/usr/local/Cellar/asterisk/13.3.0/lib -bundle -mmacosx-version-min=10.6 -Wl,-undefined,dynamic_lookup /usr/lib/bundle1.o app_waituntil.o
gcc-4.2 -o app_while.so -D_THREAD_SAFE -L/usr/local/lib -Wl,-rpath,/usr/local/Cellar/asterisk/13.3.0/lib -bundle -mmacosx-version-min=10.6 -Wl,-undefined,dynamic_lookup /usr/lib/bundle1.o app_while.o
gcc-4.2 -o app_zapateller.so -D_THREAD_SAFE -L/usr/local/lib -Wl,-rpath,/usr/local/Cellar/asterisk/13.3.0/lib -bundle -mmacosx-version-min=10.6 -Wl,-undefined,dynamic_lookup /usr/lib/bundle1.o app_zapateller.o
gcc-4.2 -o chan_sip.so -D_THREAD_SAFE -L/usr/local/lib -Wl,-rpath,/usr/local/Cellar/asterisk/13.3.0/lib -bundle -mmacosx-version-min=10.6 -Wl,-undefined,dynamic_lookup /usr/lib/bundle1.o chan_sip.o sip/config_parser.o sip/dialplan_functions.o sip/reqresp_parser.o sip/route.o sip/security_events.o sip/utils.o

This is the error I got while installing on OS X Yosemite READ THIS: https://git.io/brew-troubleshooting If reporting this issue please do so at (not Homebrew/homebrew): https://github.com/leedm777/homebrew-

simsolTech commented 9 years ago

it seems the culprit is 'gcc-4.2 compilation command'. I am getting the following error on the console on issuing 'gcc-4.2' command. ----couldn't understand kern.osversion `14.3.0'--

simsolTech commented 9 years ago

I have been able to resolve the issue which seems to be because of non-compatibility of the default C libraries in MAC OS X Yosemite. The Solution:

  1. Installed brew gcc
  2. Provided C and CXX flags in the asterisk.rb
  3. Then everything worked fine.
  4. I am submitting my file. Not very confident on how to submit the patch. You may review the same and see if these variable can be parametrized and if so, update accordingly.
leedm777 commented 9 years ago

@simsolTech That's all really odd. Setting C and CXX shouldn't be necessary, since it has the fails_with statements. And brew GCC should have been installed because of the depends_on 'gcc' => :build statement.

I just updated Asterisk to 13.3.2, which includes clang support. I may try switching to that and see if we get better results.

simsolTech commented 9 years ago

The issue I feel is that Yosemite comes with a default gcc compiler and there is some conflict. It was spawning errors, when i used gcc-4.9.

Therefore, had to specifically use "path/to/Cellar/gcc/ver/bin/x86_64-apple-darwin14.3.0-gcc-4.9".

Also, apart from the following directories i.e., /usr/local/Cellar/asterisk/13.3.2/etc/asterisk & /usr/local/Cellar/asterisk/13.3.2/var/run/asterisk

i had to create /usr/local/Cellar/asterisk/13.3.2/var/lib/asterisk/keys

Please note that path of installation has asterisk/version - You may want to incorporate this into the README.

leedm777 commented 8 years ago

I've run an install on a fresh OS X machine without these problems. I've fixed all the issues I know of with missing config files and directories.

If you want to give it another go, let me know if you have any problems.