<p>I tested this on Linux, it works great when I make the necessary change to CMakeLists.txt.  I tried to compile on OS X and I get this:</p>

<pre><code>[2%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/backtrace.cpp.o
clang: warning: argument unused during compilation: '-rdynamic'
In file included from /Users/ryan_curtin/src/mlpack-kirizaki/src/mlpack/core/util/backtrace.cpp:22:
/opt/local/include/bfd.h:35:2: error: config.h must be included before this header
#error config.h must be included before this header
 ^
1 error generated.
</code></pre>

<p>I think that this has been tested on OS X and is known to not work, so maybe we disable HAS_BFD_DL in the CMake configuration if we are on OS X?  Either way we should be sure that compilation works out-of-the-box on OS X.</p>

<p>Also there is the warning from clang that -rdynamic is unsupported; maybe different handling is necessary there?<br>
<a href="http://stackoverflow.com/questions/21279036/what-is-clangs-equivalent-to-rdynamic-gcc-flag/21279573#21279573">http://stackoverflow.com/questions/21279036/what-is-clangs-equivalent-to-rdynamic-gcc-flag/21279573#21279573</a><br>
That one will be a little bit weird because apparently the flag is different on OS X!</p>

<p>I haven't been able to actually test with clang because of a Debian bug that affects the system I was testing on:<br>
<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797917">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797917</a></p>

<p>It would also be cool to test this on FreeBSD but my FreeBSD box is not running right now... :(</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/535#issuecomment-191940409">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFPrfTOXm0LRyfKKDXJgWG1Whqfj1ks5ppz8_gaJpZM4Hm7uJ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/535#issuecomment-191940409"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>