title: How do I install Asterisk on Mavericks?
body: <p>I'm trying to install Asterisk on my Macbook Pro (Intel Core i5) running Mavericks. Ideally I want to install version 1.8, because that's what's running on the server, but 11.7 is fine too.</p>
  
  <p>After googling around I've tried many permutations of configure flags, but that strategy is not getting me anywhere.</p>
  
  <p>I have Xcode 5.0.2. and the command line tools installed, as well as gcc-4.8 via Homebrew:</p>
  
  <pre><code>brew tap homebrew/versions
  brew install homebrew/versions/gcc48
  </code></pre>
  
  <p>Based on what I saw in <a href="https://github.com/mbrevda/homebrew/blob/fae04a6f9eb58f7a9a388b261289f7f27b43c909/Library/Formula/asterisk10.rb" rel="nofollow">this homebrew formula</a> I tried replacing <code>OPTIMIZE=-O6</code> with <code>OPTIMIZE=-Os</code>. This seems to have the same effect as <code>CFLAGS=-mtune=generic</code>, namely preventing this error:</p>
  
  <pre><code>Generating embedded module rules ...
    [CC] chan_agent.c -&gt; chan_agent.o
     error: invalid value '6' in '-O6'
  </code></pre>
  
  <p>The other option I'm using is <code>--without-netsnmp</code> as suggested <a href="http://johntdyer.com/blog/2012/04/14/installing-asterisk-10-dot-3-on-osx-lion/" rel="nofollow">here</a> because that module was throwing errors during the make process as well.</p>
  
  <p>I also tried using the option , <code>--host=x86_64-darwin</code>. I tried both with the default compiler and with <code>CC=gcc-4.8</code>.</p>
  
  <p>I tried both <code>make</code> and <code>make -j 4</code>, as suggested <a href="http://johntdyer.com/blog/2012/04/14/installing-asterisk-10-dot-3-on-osx-lion/" rel="nofollow">here</a>.</p>
  
  <p>Two examples of output (using version 11.7):</p>
  
  <pre><code>./configure --host=x86_64-darwin CC=gcc-4.8 CFLAGS=-mtune=generic
  make -j 4
  ...
  [CC] enum.c -&gt; enum.o
  enum.c: In function 'blr_txt':
  enum.c:225:41: error: 'C_IN' undeclared (first use in this function)
  ret = ast_search_dns(&amp;context, domain, C_IN, T_TXT, txt_callback);
  </code></pre>
  
  <p>Using Os instead of O6</p>
  
  <pre><code>./configure  --without-netsnmp
  make
  ...
  duplicate symbol _ast_tech_to_upper in:
  chan_iax2.o
  iax2-provision.o
  duplicate symbol _ast_rq_is_int in:
  chan_iax2.o
  iax2-provision.o
  ld: 90 duplicate symbols for architecture x86_64
  </code></pre>
  
  <p>I'll either need actually understand what's going on or a "magic" solution.</p>