<p>Ok, here's some more information about what I've done.<br>
Firstly I have removed any currently existing versions of armadillo or mlpack anywhere on the system (which is Ubuntu 12.04)</p>

<p>I install arma 5.000.0 with</p>

<pre><code>cmake -DCMAKE_CXX_COMPILER_ID=Intel -DCMAKE_CXX_COMPILER=icpc -DCMAKE_CXX_FLAGS=-O3 .
make
make install DESTDIR=~/software
</code></pre>

<p>I used your update to CMakeLists.txt as referenced above, then installed mlpack with</p>

<pre><code>cmake -DCMAKE_INSTALL_PREFIX:PATH=~/software -DBOOST_ROOT=~/software ../
make
make install
</code></pre>

<p>which didn't warn about 64 bit words not being used</p>

<p>I then compile my application with</p>

<pre><code>g++ -Wall -g -O0 -std=c++11 -I${HOME}/software/include -I/usr/include/libxml2 -c -o app.o app.cpp
</code></pre>

<p>and link with</p>

<pre><code>g++ -Wall -g -O0 -std=c++11 -I${HOME}/software/include -I/usr/include/libxml2 app.o -L${HOME}/software/lib -lmlpack -larmadillo -lboost_program_options -lblas -llapack -lm -o app
</code></pre>

<p>however I still get a conflict due to word length</p>

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

terminate called after throwing an instance of 'std::bad_alloc'
what():  std::bad_alloc

Program received signal SIGABRT, Aborted.
0x00007ffff57300d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6

(gdb) bt
#0  0x00007ffff57300d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff573383b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff602b2d5 in __gnu_cxx::__verbose_terminate_handler () at ../../.././libstdc++-v3/libsupc++/vterminate.cc:95
#3  0x00007ffff6029336 in __cxxabiv1::__terminate (handler=&lt;optimised out&gt;) at ../../.././libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x00007ffff6029381 in std::terminate () at ../../.././libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x00007ffff6029598 in __cxxabiv1::__cxa_throw (obj=0x7fffec000940, tinfo=0x6bf600 &lt;typeinfo for std::bad_alloc@@GLIBCXX_3.4&gt;,
dest=0x416260 &lt;std::bad_alloc::~bad_alloc()@plt&gt;) at ../../.././libstdc++-v3/libsupc++/eh_throw.cc:87
#6  0x0000000000418ca4 in arma::arma_stop_bad_alloc&lt;char [39]&gt; (x=...) at ~/software/include/armadillo_bits/debug.hpp:138
#7  0x000000000041a829 in arma::arma_check_bad_alloc&lt;char [39]&gt; (state=true, x=...) at ~/software/include/armadillo_bits/debug.hpp:378
#8  0x000000000041a63d in arma::memory::acquire&lt;double&gt; (n_elem=8589934596) at ~/software/include/armadillo_bits/memory.hpp:94
#9  0x000000000041a525 in arma::Mat&lt;double&gt;::init_warm (this=0x7fffffffab20, in_n_rows=4294967298, in_n_cols=2)
at ~/software/include/armadillo_bits/Mat_meat.hpp:311
#10 0x000000000042d4bf in arma::Mat&lt;double&gt;::set_size (this=0x7fffffffab20, in_rows=4294967298, in_cols=2)
at ~/software/include/armadillo_bits/Mat_meat.hpp:5638
#11 0x000000000047503d in mlpack::optimization::L_BFGS&lt;mlpack::regression::LogisticRegressionFunction&gt;::L_BFGS (this=0x7fffffffab10, function=...,
numBasis=5, maxIterations=0, armijoConstant=0.0001, wolfe=0.90000000000000002, minGradientNorm=1e-10, maxLineSearchTrials=50,
minStep=9.9999999999999995e-21, maxStep=1e+20) at ~/software/include/mlpack/core/optimizers/lbfgs/lbfgs_impl.hpp:63
#12 0x00000000004744a2 in mlpack::regression::LogisticRegression&lt;mlpack::optimization::L_BFGS&gt;::LogisticRegression (this=0x7fffffffb330, predictors=...,
responses=..., lambda=0) at ~/software/include/mlpack/methods/logistic_regression/logistic_regression_impl.hpp:33
</code></pre>

<p>This happens regardless of whether I have #define ARMA_64BIT_WORD in armadillo_bits/config.hpp commented or uncommented</p>

<p>I should note the identical process worked fine with armadillo.4.650</p>

<p>Inspecting the libraries</p>

<pre><code>ldd app

libmlpack.so.1 =&gt; ~/software/lib/libmlpack.so.1 (0x00007f3ff4a18000)
libarmadillo.so.5 =&gt; ~/software/lib/libarmadillo.so.5 (0x00007f3ff4813000)
libboost_program_options.so.1.57.0 =&gt; ~/software/lib/libboost_program_options.so.1.57.0 (0x00007f3ff45a3000)
libblas.so.3gf =&gt; /usr/lib/libblas.so.3gf (0x00007f3ff403a000)
liblapack.so.3gf =&gt; /usr/lib/liblapack.so.3gf (0x00007f3ff341d000)
libstdc++.so.6 =&gt; /software/gcc-4.9.1/lib64/libstdc++.so.6 (0x00007f3ff3112000)
libm.so.6 =&gt; /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3ff2e16000)
libgcc_s.so.1 =&gt; /software/gcc-4.9.1/lib64/libgcc_s.so.1 (0x00007f3ff2c00000)
libc.so.6 =&gt; /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3ff2840000)
libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3ff2623000)
libboost_unit_test_framework.so.1.57.0 =&gt; ~/software/lib/libboost_unit_test_framework.so.1.57.0 (0x00007f3ff237c000)
libboost_random.so.1.57.0 =&gt; ~/software/lib/libboost_random.so.1.57.0 (0x00007f3ff2176000)
libxml2.so.2 =&gt; /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f3ff1e1a000)
librt.so.1 =&gt; /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3ff1c12000)
libmkl_rt.so =&gt; /software/intel-tools-2015/composer_xe_2015.0.090/mkl/lib/intel64/libmkl_rt.so (0x00007f3ff169b000)
libimf.so =&gt; /software/intel-tools-2015/composer_xe_2015.0.090/compiler/lib/intel64/libimf.so (0x00007f3ff11e1000)
libsvml.so =&gt; /software/intel-tools-2015/composer_xe_2015.0.090/compiler/lib/intel64/libsvml.so (0x00007f3ff0592000)
libirng.so =&gt; /software/intel-tools-2015/composer_xe_2015.0.090/compiler/lib/intel64/libirng.so (0x00007f3ff038a000)
libintlc.so.5 =&gt; /software/intel-tools-2015/composer_xe_2015.0.090/compiler/lib/intel64/libintlc.so.5 (0x00007f3ff0130000)
libdl.so.2 =&gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3feff2c000)
libgfortran.so.3 =&gt; /software/gcc-4.9.1/lib64/libgfortran.so.3 (0x00007f3fefc0f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3ff4f40000)
libboost_system.so.1.57.0 =&gt; ~/software/lib/libboost_system.so.1.57.0 (0x00007f3fefa0c000)
libquadmath.so.0 =&gt; /software/gcc-4.9.1/lib/../lib64/libquadmath.so.0 (0x00007f3fef7ce000)
</code></pre>

<p>My above ld error I think was caused by compiling mlpack against a different boost from the one that was then loaded (which I've now fixed)</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#issuecomment-93289657">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLDXL8shTvsopvHxK3ybLEGQ5BB8ks5n_isVgaJpZM4EAT5C.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#issuecomment-93289657"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>