<p>Hi guys,<br>
I am trying to build mlpack under mac Marvericks over the weekend. So far I failed again and again. </p>

<p>(Again, I am sorry the quote text does not appear as I expected. I try few wikitags I learned, but non of them work for me... Sorry.)</p>

<ol>
<li><p>The library is built successfully with compiler c++ (in fact, clang, clang++), but gives a weird error in passing arguments in logistic regression, see here <a href="https://github.com/mlpack/mlpack/issues/428#issuecomment-111815633" class="issue-link" title="segmentation fault with LogisticRegression API">#428 (comment)</a></p></li>
<li><p>I suspected it  was the issue of the compiler c++ that does not understand the arma::vec constructor by reference. Therefore I tried to build mlpack with gcc and g++, with all versions I have (g++-5.1, g++-mp-5, g++-mp-4.8, g++-mp-4.9), but they failed to recognise boost symbols. For example:</p></li>
</ol>

<p>My armadillo is the 5.200.1.</p>

<p> </p>

<p>CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ cmake -D BOOST_LIBRARYDIR=/opt/local/lib/ BOOST_INCLUDEDIR=/opt/local/include Boost_USE_MULTITHREAD=OFF ../ <br>
-- Armadillo libraries: /usr/lib/libarmadillo.dylib<br>
CMake Warning at CMakeLists.txt:88 (message):<br>
  This is a 64-bit system, but Armadillo was compiled without 64-bit index<br>
  support.  Consider recompiling Armadillo with ARMA_64BIT_WORD to enable<br>
  64-bit indices (large matrix support).  MLPACK will still work without<br>
  ARMA_64BIT_WORD defined, but will not scale to matrices with more than 4<br>
  billion elements.</p>

<p>-- Boost version: 1.58.0<br>
-- Found the following Boost libraries:<br>
--   program_options<br>
--   unit_test_framework<br>
--   random<br>
CMake Warning (dev) at src/mlpack/CMakeLists.txt:78 (add_custom_target):<br>
  Policy CMP0037 is not set: Target names should not be reserved and should<br>
  match a validity pattern.  Run "cmake --help-policy CMP0037" for policy<br>
  details.  Use the cmake_policy command to set the policy and suppress this<br>
  warning.</p>

<p>The target name "test" is reserved or not valid for certain CMake features,<br>
  such as generator expressions, and may result in undefined behavior.<br>
This warning is for project developers.  Use -Wno-dev to suppress it.</p>

<p>CMake Warning at CMakeLists.txt:292 (message):<br>
  txt2man not found; man pages will not be generated.</p>

<p>-- Configuring done<br>
CMake Warning (dev):<br>
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake<br>
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to<br>
  set the policy and suppress this warning.</p>

<p>MACOSX_RPATH is not specified for the following targets:</p>

<p>mlpack</p>

<p>This warning is for project developers.  Use -Wno-dev to suppress it.</p>

<p>-- Generating done<br>
-- Build files have been written to: /Volumes/SHome/Developer/lib/mlpack-1.0.12/build<br>
</p>

<p>The errors is (second make)</p>

<p></p>

<p>$ make<br>
Moving header files to include/mlpack/<br>
[  0%] Built target mlpack_headers<br>
Linking CXX shared library ../../lib/libmlpack.dylib<br>
Undefined symbols for architecture x86_64:<br>
  "boost::program_options::to_internal(std::__cxx11::basic_string, std::allocator &gt; const&amp;)", referenced from:<br>
      boost::program_options::basic_command_line_parser::basic_command_line_parser(int, char const* const<em>) in cli.cpp.o<br>
  "boost::program_options::basic_parsed_options boost::program_options::parse_config_file(std::basic_istream &gt;&amp;, boost::program_options::options_description const&amp;, bool)", referenced from:<br>
      mlpack::CLI::ParseStream(std::basic_istream &gt;&amp;) in cli.cpp.o<br>
  "boost::program_options::options_description::options_description(std::__cxx11::basic_string, std::allocator &gt; const&amp;, unsigned int, unsigned int)", referenced from:<br>
      mlpack::CLI::CLI()  in cli.cpp.o<br>
      mlpack::CLI::CLI(std::__cxx11::basic_string, std::allocator &gt; const&amp;) in cli.cpp.o<br>
      mlpack::CLI::CLI(std::__cxx11::basic_string, std::allocator &gt; const&amp;) in cli.cpp.o<br>
  "boost::program_options::arg[abi:cxx11]", referenced from:<br>
      boost::program_options::typed_value, std::allocator &gt;, char&gt;::name() const in cli.cpp.o<br>
  "boost::program_options::detail::cmdline::set_additional_parser(boost::function1, std::allocator &gt;, std::__cxx11::basic_string, std::allocator &gt; &gt;, std::__cxx11::basic_string, std::allocator &gt; const&amp;&gt;)", referenced from:<br>
      boost::program_options::basic_command_line_parser::extra_parser(boost::function1, std::allocator &gt;, std::__cxx11::basic_string, std::allocator &gt; &gt;, std::__cxx11::basic_string, std::allocator &gt; const&amp;&gt;) in cli.cpp.o<br>
  "boost::program_options::detail::cmdline::cmdline(std::vector, std::allocator &gt;, std::allocator, std::allocator &gt; &gt; &gt; const&amp;)", referenced from:<br>
      boost::program_options::basic_command_line_parser::basic_command_line_parser(int, char const</em> const<em>) in cli.cpp.o<br>
  "boost::program_options::validate(boost::any&amp;, std::vector, std::allocator &gt;, std::allocator, std::allocator &gt; &gt; &gt; const&amp;, std::__cxx11::basic_string, std::allocator &gt;</em>, int)", referenced from:<br>
      boost::program_options::typed_value, std::allocator &gt;, char&gt;::xparse(boost::any&amp;, std::vector, std::allocator &gt;, std::allocator, std::allocator &gt; &gt; &gt; const&amp;) const in cli.cpp.o<br>
  "boost::program_options::abstract_variables_map::operator const", referenced from:<br>
      mlpack::CLI::UpdateGmap()     in cli.cpp.o<br>
  "boost::program_options::value_semantic_codecvt_helper::parse(boost::any&amp;, std::vector, std::allocator &gt;, std::allocator, std::allocator &gt; &gt; &gt; const&amp;, bool) const", referenced from:<br>
      vtable for boost::program_options::typed_value, std::allocator &gt;, char&gt; in cli.cpp.o<br>
ld: symbol(s) not found for architecture x86_64<br>
collect2: error: ld returned 1 exit status<br>
make[2]: *** [lib/libmlpack.1.0.dylib] Error 1<br>
make[1]: *** [src/mlpack/CMakeFiles/mlpack.dir/all] Error 2<br>
make: *** [all] Error 2</p>

<p></p>

<p>I have no idea what else to try. If you can give me some hint, it would be great. I am very grateful.</p>

<p>PS: Thanhk you for your project. I really like the name mlpack, perhaps because  I am also a fan of lapack.</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/442">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFM6zEVsUfkqcX54rfPZ7LHuEqFFCks5oTccwgaJpZM4FCvAM.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/442"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>