<p>In <a href="https://github.com/mlpack/mlpack/pull/535#discussion_r54936738">CMakeLists.txt</a>:</p>
<pre style='color:#555'>&gt; @@ -66,6 +66,17 @@ if(DEBUG)
&gt;    add_definitions(-DDEBUG)
&gt;    set(CMAKE_CXX_FLAGS &quot;${CMAKE_CXX_FLAGS} -g -O0 -ftemplate-backtrace-limit=0&quot;)
&gt;    set(CMAKE_C_FLAGS &quot;${CMAKE_C_FLAGS} -std=c99 -g -O0&quot;)
&gt; +  # mlpack uses it&#39;s own mlpack::backtrace class based on Binary File Descriptor
&gt; +  # &lt;bfd.h&gt; and linux Dynamic Loader &lt;libdl.h&gt; and more portable version in future
&gt; +  find_package(Bfd)
&gt; +  find_package(LibDL)
&gt; +  if(LIBBFD_FOUND AND LIBDL_FOUND)
&gt; +    include_directories(${LIBBFD_INCLUDE_DIRS})
&gt; +    include_directories(${LIBDL_INCLUDE_DIRS})
&gt; +    add_definitions(-DHAS_BFD_DL)
</pre>
<p>I think you need to add <code>set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")</code> here; if I didn't do this, then if an assert or fatal error was thrown in any of the mlpack programs (like <code>mlpack_allknn</code>), it wouldn't give a backtrace but would tell me that I needed to compile with -rdynamic.</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/files#r54936738">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFArYnF1V-cKX4se-_zqtUF-L39H5ks5ppzsHgaJpZM4Hm7uJ.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/files#r54936738"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>