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 while linking CXX shared library libshogun.so #4393
Comments
I met the same problem, the error info is: Scanning dependencies of target libshogun how to solve it ? |
Hi @luoagnes I think enable_if_t is from c++14, can you try explicitly adding cmake flag -DCMAKE_CXX_FLAGS=-std=c++14 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is now being closed due to a lack of activity. Feel free to reopen it. |
I pulled shogun from github. In Fedora28
Followed the instruction here http://shogun.ml/install#manual
I used the following cmake command
(14:15 admanero@Yoga2Pro-Fedora28 build) > 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 or modify the *.cmake files (in PERL case) to help the cmake get the right locations for library requirements. 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 libshogun
[ 85%] Linking CXX shared library libshogun.so
[ 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
The text was updated successfully, but these errors were encountered: