<p>As detailed here:<br>
<a href="http://arma.sourceforge.net/docs.html#uword">http://arma.sourceforge.net/docs.html#uword</a></p>

<p>Armadillo uses 64 bit word length by default when using a c++11 capable compiler. When used with mlpack this leads to errors such as</p>

<pre><code>error: arma::memory::acquire(): out of memory

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
</code></pre>

<p>I've tried uncommenting the relevant line in include/armadillo_bits/config.hpp, and using -DARMA_64BIT_WORD when running cmake with mlpack. However when I link this version of mlpack my application immediately segfaults:</p>

<pre><code>Program received signal SIGSEGV, Segmentation fault.
0x00007ffff791f905 in long double boost::math::lanczos::lanczos17m64::lanczos_sum_expG_scaled&lt;long double&gt;(long double const&amp;) ()
from /nfs/users/nfs_j/jl11/installations/pangwas/mlpack/build_64/lib/libmlpack.so.1
(gdb) bt
#0  0x00007ffff791f905 in long double boost::math::lanczos::lanczos17m64::lanczos_sum_expG_scaled&lt;long double&gt;(long double const&amp;) ()
from /nfs/users/nfs_j/jl11/installations/pangwas/mlpack/build_64/lib/libmlpack.so.1
#1  0x00007ffff791133f in _GLOBAL__sub_I_discrete_distribution.cpp () from /nfs/users/nfs_j/jl11/installations/pangwas/mlpack/build_64/lib/libmlpack.so.1
#2  0x00007ffff7de9306 in ?? () from /lib64/ld-linux-x86-64.so.2
</code></pre>

<p>Could you provide advice on how to compile and link mlpack correctly when using the newer versions of Armadillo?</p>

<p>Thanks!</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/issues/431">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFGVCITbuP7SLBNx88OwEkFKvLDXKks5n_SWMgaJpZM4EAT5C.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/issues/431"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>