[asterisk-dev] off topic: OS/X: Where's the GCC?
Olle E. Johansson
oej at edvina.net
Tue Oct 1 11:01:22 CDT 2013
1 okt 2013 kl. 17:33 skrev "David M. Lee" <dlee at digium.com>:
> On Oct 1, 2013, at 8:02 AM, Olle E. Johansson <oej at edvina.net> wrote:
>
>> Just re-installed my Macbook after switching hard disk drive and motherboard. GCC now seems to be an alias for clang and I can't compile Asterisk anymore...
>>
>> I don't remember if I ever did anything else - but I must have gotten a proper GCC somewhere from. What's the easiest way to re-install an Asterisk-compatible GCC?
>
> With Xcode 4.x and earlier, GCC was a GCC frontend to LLVM, so it actually worked for compiling Asterisk. Looks like that's changed for Xcode 5. Now gcc is just an alias for clang (which seems like a very wrong headed thing to do, IMO).
>
> GCC 4.8 from Homebrew works great for 12 and trunk. There are a couple of issues compiling 1.8 and 11, though. I bet apple-gcc42 will work, but I haven't had a chance to try it.
>
> I'm a bit crammed for time now, but post-Astricon I may be able to look into back porting fixes in 12 to get 1.8 and 11 compiling on OS X again.
>
> For 12 and trunk, here are the homebrew packages I install (from memory; might be missing a few):
>
> brew tap leedm777/asterisk
> brew tap homebrew/versions
> brew install pjsip iksemel unixodbc srtp gcc48 sqlite openssl speex
>
> To configure Asterisk:
>
> CC=gcc-4.8 CXX=g++-4.8 ./configure --with-ssl=/usr/local/opt/openssl --with-sqlite3=/usr/local/opt/sqlite --without-netsnmp --with-unixodbc=/usr/local/opt/unixodbc --without-gtk2
>
> Personally, I also add --prefix=/opt/Asterisk so that Asterisk doesn't get muddled with either system or homebrew managed stuff.
>
> Inline stuff causes warnings with homebrew's GCC, so disable that via menuselect:
>
> menuselect/menuselect --enable DISABLE_INLINE menuselect.makeopts
David,
I owe you one. This was great!!!
As I mainly work with 1.8 I will focus on getting that to work first.
I hate having to have a Linux virtual machine in order to do development.
See you at Astricon!
/O
More information about the asterisk-dev
mailing list