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 creating examples (C++) #4419

Closed
2 tasks done
HaoZeke opened this issue Nov 22, 2018 · 10 comments
Closed
2 tasks done

Error creating examples (C++) #4419

HaoZeke opened this issue Nov 22, 2018 · 10 comments

Comments

@HaoZeke
Copy link

HaoZeke commented Nov 22, 2018

Bug Report

  • No similar issues exist
  • Replicated on similar systems

Description

I am not able to build shogun with the examples. Without the examples it builds alright.

Configuration

-- dir='/home/haozeke/Git/Github/machineLearning/shogun/src'
-- dir='/home/haozeke/Git/Github/machineLearning/shogun/build/src'
-- dir='/home/haozeke/Git/Github/machineLearning/shogun/src/gpl'
-- Using system's malloc
-- Could NOT find ViennaCL (missing: VIENNACL_INCLUDE_DIR VIENNACL_ENCODED_VERSION) (Required is at least version "1.5.0")
-- Could NOT find TFLogger (missing: TFLogger_DIR)
-- Could NOT find CPLEX (missing: CPLEX_LIBRARY CPLEX_INCLUDE_DIR) 
-- Found Arpack : /usr/lib/libarpack.so
-- Could NOT find MOSEK (missing: MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY MOSEK_LIBRARIES) 
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Lzo Library /usr/lib/liblzo2.so
-- Lzo Include Found in /usr/include
-- Could NOT find ColPack (missing: COLPACK_LIBRARIES COLPACK_LIBRARY_DIR COLPACK_INCLUDE_DIR) 
-- Could NOT find ARPREC (missing: ARPREC_LIBRARIES ARPREC_INCLUDE_DIR) 
-- Linker: GNU gold
-- ===================================================================================================================
-- Summary of Configuration Variables
-- The following OPTIONAL packages have been found:

 * CCache
 * GDB
 * Doxygen (required version >= 1.8.6)
 * OpenMP
 * CxaDemangle
 * rxcpp
 * BLAS
 * GLPK
 * ARPACK
 * Threads
 * Protobuf
 * JSON (required version >= 0.11)
 * LibXml2
 * HDF5
 * CURL
 * ZLIB
 * BZip2
 * LibLZMA
 * SNAPPY
 * LZO
 * NLopt
 * LpSolve
 * Sphinx
 * Pandoc

-- The following REQUIRED packages have been found:

 * PythonInterp

-- The following OPTIONAL packages have not been found:

 * ViennaCL (required version >= 1.5.0)
 * TFLogger (required version >= 0.1.0)
 * CPLEX
 * Mosek
 * ColPack
 * ARPREC

-- ===================================================================================================================
-- Integrations
--   OpenCV Integration is OFF 	 enable with -DOpenCV=ON
-- ===================================================================================================================
-- Interfaces
--   Python is OFF 		 enable with -DINTERFACE_PYTHON=ON
--   Octave is OFF 		 enable with -DINTERFACE_OCTAVE=ON
--   Java is OFF 		 enable with -DINTERFACE_JAVA=ON
--   Perl is OFF 		 enable with -DINTERFACE_PERL=ON
--   Ruby is OFF 		 enable with -DINTERFACE_RUBY=ON
--   C# is OFF 			 enable with -DINTERFACE_CSHARP=ON
--   R is OFF 			 enable with -DINTERFACE_R=ON
--   Lua is OFF 		 enable with -DINTERFACE_LUA=ON
--   Scala is OFF 		 enable with -DINTERFACE_SCALA=ON
--   CoreML is OFF 		 enable with -DINTERFACE_COREML=ON
-- ===================================================================================================================
-- To compile shogun type
--   make
-- 
-- To install shogun to /usr/local type
--   make install
-- 
-- or to install to a custom directory
--   make install DESTDIR=/my/special/path
--   (or rerun cmake with -DCMAKE_INSTALL_PREFIX=/my/special/path) to just change the prefix
-- ===================================================================================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/haozeke/Git/Github/machineLearning/shogun/build

Error

Scanning dependencies of target cpp-evaluation-cross_validation_support_vector_machine
[ 83%] Building CXX object examples/meta/cpp/CMakeFiles/cpp-evaluation-cross_validation_support_vector_machine.dir/evaluation/cross_validation_support_vector_machine.cpp.o
[ 83%] Linking CXX executable evaluation/cpp-evaluation-cross_validation_support_vector_machine
/usr/bin/ld: ../../../src/shogun/libshogun.so.18.0: undefined reference to `void shogun::LinalgBackendEigen::eigen_solver_symmetric_impl<double>(shogun::SGMatrix<double> const&, shogun::SGVector<double>&, shogun::SGMatrix<double>&, int) const'
/usr/bin/ld: ../../../src/shogun/libshogun.so.18.0: undefined reference to `void shogun::LinalgBackendEigen::eigen_solver_symmetric_impl<float>(shogun::SGMatrix<float> const&, shogun::SGVector<float>&, shogun::SGMatrix<float>&, int) const'
/usr/bin/ld: ../../../src/shogun/libshogun.so.18.0: undefined reference to `void shogun::LinalgBackendEigen::eigen_solver_symmetric_impl<long double>(shogun::SGMatrix<long double> const&, shogun::SGVector<long double>&, shogun::SGMatrix<long double>&, int) const'
/usr/bin/ld: ../../../src/shogun/libshogun.so.18.0: undefined reference to `void shogun::LinalgBackendEigen::eigen_solver_symmetric_impl<std::complex<double> >(shogun::SGMatrix<std::complex<double> > const&, shogun::SGVector<std::complex<double> >&, shogun::SGMatrix<std::complex<double> >&, int) const'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/meta/cpp/CMakeFiles/cpp-evaluation-cross_validation_support_vector_machine.dir/build.make:93: examples/meta/cpp/evaluation/cpp-evaluation-cross_validation_support_vector_machine] Error 1
make[1]: *** [CMakeFiles/Makefile2:3816: examples/meta/cpp/CMakeFiles/cpp-evaluation-cross_validation_support_vector_machine.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

System Details

Architecture and OS

image

Shogun

Git version at:

 * b5345f577 (HEAD -> develop, origin/develop, origin/HEAD) SG_ADD refactor (#4417)

Eigen

Strangely I already have eigen installed as well...
image

@HaoZeke HaoZeke mentioned this issue Nov 22, 2018
2 tasks
@gf712
Copy link
Member

gf712 commented Nov 22, 2018

Hey, I think I have seen that error before in a build when compiling with gcc 8. Which compiler are you using?

@gf712
Copy link
Member

gf712 commented Nov 22, 2018

From your other issue you seem to be using gcc-8. Could you try compiling with gcc-7 or lower? I am not sure what causes this issue though..

@karlnapf
Copy link
Member

I saw this error before with an outdated build folder. If you start form scratch, it still happens?

@HaoZeke
Copy link
Author

HaoZeke commented Nov 23, 2018

@gf712, I am indeed using gcc8

gcc -v          
Using built-in specs.                 COLLECT_GCC=gcc                       COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/lto-wrapper      Target: x86_64-pc-linux-gnu           Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enableConfigured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto                       Thread model: posix
gcc version 8.2.1 20180831 (GCC)

I will test with a lower version.

@karlnapf, unfortunately I have replicated this on 2 machines (one shown here and the other described in #4420) with clean builds (deleting the whole folder)

@karlnapf
Copy link
Member

We would have to dig a bit to replicate this error. I remember seeing it on some of our builds, but I dont know how or whether it was resolved. I think @vigsterkr might know more

@avramidis
Copy link
Contributor

Please see #4506 and let me know what you think.

@avramidis
Copy link
Contributor

@karlnapf I believe this issue was solved with #4506

@karlnapf
Copy link
Member

karlnapf commented Feb 5, 2019

@HaoZeke can you confirm?

@karlnapf
Copy link
Member

karlnapf commented Feb 5, 2019

@avramidis awesome! :)

@HaoZeke
Copy link
Author

HaoZeke commented Feb 6, 2019

Yup this is now fixed! Thanks @karlnapf and @avramidis!

@HaoZeke HaoZeke closed this as completed Feb 6, 2019
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