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

Error during linking CXX shared library libshogun.so #3977

Closed
woopeer opened this issue Sep 8, 2017 · 3 comments
Closed

Error during linking CXX shared library libshogun.so #3977

woopeer opened this issue Sep 8, 2017 · 3 comments

Comments

@woopeer
Copy link

woopeer commented Sep 8, 2017

Try to manually compile shogun
git clone https://github.com/shogun-toolbox/shogun.git
Due to network problem, git submodule update --init command failed, so i manually git clone debian and gpl directories
Followed the instruction here Shogun install

After make, here are errors
[ 69%] Linking CXX shared library libshogun.so
/usr/bin/ld.gold:error:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'main'
/usr/bin/ld.gold:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold:error:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_compiler'
/usr/bin/ld.gold:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold:error:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_platform'
/usr/bin/ld.gold:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold:error:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_arch'
/usr/bin/ld.gold:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold:error:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_language_dialect_default'
/usr/bin/ld.gold:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold:error:CMakeFiles/libshogun.dir/CMakeFiles/feature_tests.c.o: multiple definition of 'main'
/usr/bin/ld.gold:CMakeFiles/libshogun.dir/CMakeFiles/3.9.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
collect2: error: ld returned 1 exit status
src/shogun/CMakeFiles/shogun.dir/build.make:1479: recipe for target 'src/shogun/libshogun.so.18.0' failed
make[2]: *** [src/shogun/libshogun.so.18.0] Error 1
CMakeFiles/Makefile2:264: recipe for target 'src/shogun/CMakeFiles/shogun.dir/all' failed
make[1]: *** [src/shogun/CMakeFiles/shogun.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

uname -a output:
Linux 4.9.0-kali4-amd64 #1 SMP Debian 4.9.30-2kali1 (2017-06-22) x86_64 GNU/Linux
GNU Make 4.1
cmake version 3.9.0

@vigsterkr
Copy link
Member

mmm... it's a bit weird..i mean if there was a network error you could retry to do git submodule update --init, but even in that case the error you've pasted is a bit weird... are you using Debian GNU/Linux 9.1 (stretch)?

@Jingwenchenhdu
Copy link

When i try to manually compile shogun, i meet the same problems with you, so i want to ask you that are you already solve this problem now? If you already solve this problem, could you tell me how to solve?

@woopeer woopeer closed this as completed Jul 12, 2018
@admanero
Copy link

I have pretty much the same issue. In Fedora 28 I run the following cmake command from the build directory.

cmake -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 -DPYTHON_PACKAGES_PATH=/usr/local/lib/python3.6/site-packages/ -DINTERFACE_PYTHON=ON -DINTERFACE_OCTAVE=ON -DLICENSE_GPL_SHOGUN=OFF -DUSE_SVMLIGHT=OFF -DOpenCV=ON ..

during make there were errors because cmake had not found the correct path to some of the libraries. I manually edited the CMakeCache.txt file to point out to the right location for some of the libraries. And then I've encountered this error which has left me puzzled.
Doing make clean and doing git submodule update --init doesn' t solve this issue. Any indication on how to get pass this hurdle would be much appreciated. Thanks for reading.

(14:17 admanero@Yoga2Pro-Fedora28 shogun) > make -j 4
...
[ 85%] Built target meta_examples
/usr/bin/ld.gold: error: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'main'
/usr/bin/ld.gold: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold: error: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_compiler'
/usr/bin/ld.gold: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold: error: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_platform'
/usr/bin/ld.gold: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold: error: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_arch'
/usr/bin/ld.gold: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold: error: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdC/CMakeCCompilerId.c.o: multiple definition of 'info_language_dialect_default'
/usr/bin/ld.gold: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold: error: CMakeFiles/libshogun.dir/CMakeFiles/feature_tests.c.o: multiple definition of 'main'
/usr/bin/ld.gold: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
/usr/bin/ld.gold: error: CMakeFiles/libshogun.dir/CMakeFiles/hdf5/cmake_hdf5_test.c.o: multiple definition of 'main'
/usr/bin/ld.gold: CMakeFiles/libshogun.dir/CMakeFiles/3.11.0/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: previous definition here
collect2: error: ld returned 1 exit status
make[2]: *** [src/shogun/CMakeFiles/shogun.dir/build.make:1416: src/shogun/libshogun.so.18.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:96: src/shogun/CMakeFiles/shogun.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

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

4 participants