Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error Ubuntu 16.04 #4225

Closed
grig-guz opened this issue Apr 3, 2018 · 3 comments
Closed

Compilation error Ubuntu 16.04 #4225

grig-guz opened this issue Apr 3, 2018 · 3 comments

Comments

@grig-guz
Copy link
Contributor

grig-guz commented Apr 3, 2018

I get the following error (Ubuntu 16.04)

[  2%] Linking CXX executable ../../bin/shogun-unit-test
../../src/shogun/libshogun.so.18.0: error: undefined reference to 'google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))'
../../src/shogun/libshogun.so.18.0: error: undefined reference to 'google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)'
../../src/shogun/libshogun.so.18.0: error: undefined reference to 'google::protobuf::Message::GetTypeName[abi:cxx11]() const'
../../src/shogun/libshogun.so.18.0: error: undefined reference to 'google::protobuf::Message::InitializationErrorString[abi:cxx11]() const'
CMakeFiles/shogun-unit-test.dir/io/MLDataHDF5File_unittest.cc.o:MLDataHDF5File_unittest.cc:function MLDataHDF5File_read_matrix_Test::TestBody(): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
collect2: error: ld returned 1 exit status
tests/unit/CMakeFiles/shogun-unit-test.dir/build.make:6987: recipe for target 'bin/shogun-unit-test' failed
make[2]: *** [bin/shogun-unit-test] Error 1
CMakeFiles/Makefile2:505: recipe for target 'tests/unit/CMakeFiles/shogun-unit-test.dir/all' failed
make[1]: *** [tests/unit/CMakeFiles/shogun-unit-test.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

How to fix that?

@grig-guz grig-guz changed the title Compilation error Compilation error Ubuntu 16.04 Apr 3, 2018
@grig-guz
Copy link
Contributor Author

grig-guz commented Apr 3, 2018

#3988 helped, successfully compiled after using -DENABLE_PROTOBUF=Offwith cmake.
Without this, I tried to reinstall protobuf, but still got the same error. How to fix it?

@karlnapf
Copy link
Member

karlnapf commented Apr 3, 2018

your protobuf setup is broken. You will need to investigate whether the library is in your dynamic linker path. The error is a standard error, so pls ask google. It could also be that shoguns cmake setup has to be fixed, in which case we can reopen this issue. Let me know

@karlnapf karlnapf closed this as completed Apr 3, 2018
@grig-guz
Copy link
Contributor Author

grig-guz commented Apr 3, 2018

@karlnapf the problem was indeed my protobuf setup, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants