<p>I had the following error while compiling:</p>

<pre><code>In file included from src/mlpack/core/util/backtrace.cpp:22:0:
/usr/include/bfd.h:35:2: error: #error config.h must be included before this header
 #error config.h must be included before this header
  ^
src/mlpack/CMakeFiles/mlpack.dir/build.make:398: recipe for target 'src/mlpack/CMakeFiles/mlpack.dir/core/util/backtrace.cpp.o' failed
make[2]: *** [src/mlpack/CMakeFiles/mlpack.dir/core/util/backtrace.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:206: recipe for target 'src/mlpack/CMakeFiles/mlpack.dir/all' failed
make[1]: *** [src/mlpack/CMakeFiles/mlpack.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
</code></pre>

<p>I fixed it by adding to CMakeLists:</p>

<pre><code>add_definitions(-DPACKAGE)
add_definitions(-DPACKAGE_VERSION)
</code></pre>

<p>This will probably happen to everyone with a new enough binutils; fix from <a href="https://bbs.archlinux.org/viewtopic.php?pid=1430683#p1430683">https://bbs.archlinux.org/viewtopic.php?pid=1430683#p1430683</a></p>

<p>This could probably be fixed harmlessly by populating those defines with mlpack's info.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>You are receiving this because you are subscribed to this thread.<br>Reply to this email directly or view it on GitHub:<br><a href="https://github.com/mlpack/mlpack/issues/574">https://github.com/mlpack/mlpack/issues/574</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFKdP7t1tUBK17uRhl2MVBlnbD2Woks5pts8WgaJpZM4HxIQb.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/574"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>