[mlpack-git] [mlpack/mlpack] Error while compiling mlpack code in Ubuntu 16.04 (#785)

Kapil Gupta notifications at github.com
Thu Sep 15 00:42:24 EDT 2016


I installed mlpack in `Ubuntu 16.04` using the command : `sudo apt-get install mlpack-dev`.
The installation had, in its dependencies , mlpack2 too. Now I have some mlpack code that throws this error:
```
CMakeFiles/hmm.dir/source/main.cpp.o: In function `__static_initialization_and_destruction_0(int, int)':
/usr/include/mlpack/core/util/cli_deleter.hpp:35: undefined reference to `mlpack::util::CLIDeleter::CLIDeleter()'
/usr/include/mlpack/core/util/cli_deleter.hpp:35: undefined reference to `mlpack::util::CLIDeleter::~CLIDeleter()'
CMakeFiles/hmm.dir/source/main.cpp.o: In function `boost::program_options::error_with_option_name::~error_with_option_name()':
/usr/include/boost/program_options/errors.hpp:119: undefined reference to `vtable for boost::program_options::error_with_option_name'
CMakeFiles/hmm.dir/source/main.cpp.o: In function `boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
/usr/include/boost/program_options/errors.hpp:373: undefined reference to `boost::program_options::validation_error::get_template[abi:cxx11](boost::program_options::validation_error::kind_t)'

```
The `ldconfig -p | grep mlpack`  command gives this output:
```
	libmlpack.so.2 (libc6,x86-64) => /usr/local/lib/libmlpack.so.2
	libmlpack.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libmlpack.so.2
	libmlpack.so (libc6,x86-64) => /usr/local/lib/libmlpack.so
	libmlpack.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libmlpack.so
```
I dont know how to fix this error. Could it be because linker is getting confused with multiple libmlpack .so files? If yes, how do I fix it ? If not, what could it be?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/785
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160914/d3af98f8/attachment.html>


More information about the mlpack-git mailing list