Skip to content
Advertisement

Shogun fails to compile. Are these Shogun bugs?

I am trying to compile Shogun on Fedora 23 64bit, but it fails with the errors below. Version 4.0.0 have the same issue.

Can anyone tell me, if there errors are bugs in Shogun or something I have done wrong?

dnf -y install git gcc which gcc-c++ doxygen numpy make cmake wget tar bzip2

cd /tmp
wget http://www.hdfgroup.org/ftp/HDF5/current/src/CMake-hdf5-1.8.16.tar.gz
tar xzf CMake-hdf5-1.8.16.tar.gz
cd CMake-hdf5-1.8.16
./build-unix.sh
cp -a HDF5-1.8.16-Linux/HDF_Group/HDF5/1.8.16/* /usr/local

cd /tmp
wget http://download.mosek.com/stable/7.1.0.41/mosektoolslinux64x86.tar.bz2
tar xjf mosektoolslinux64x86.tar.bz2
mv mosek/7 /root/mosek
export PATH=/root/mosek/tools/platform/linux64x86/bin/:$PATH  
cp mosek.lic /root/mosek
cd /root/mosek/tools/platform/linux64x86/python/2/  
python setup.py install --user

dnf -y install swig git cmake ccache gdb Pkgconfig NLopt-devel NLopt lpsolve-devel lpsolve ColPack-cli ColPack ColPack-devel arprec-devel arprec libxml2 libxml2-devel bzip2 bzip2-devel snappy-devel snappy protobuf-devel protobuf glpk glpk-devel libcurl-devel libcurl lzo lzo-devel lapack lapack-devel python-devel atlas atlas-devel qd qd-devel 

cd /
git clone https://github.com/shogun-toolbox/shogun.git
cd /shogun/ && mkdir build && cd build
cmake -D BUNDLE_EIGEN=ON -D PythonModular=ON ..
make 

And here is the output with the errors.

[  0%] Built target Eigen3
[  1%] Built target class_list
[  1%] Built target ChunksProtobuf
[  2%] Built target HeadersProtobuf
[  2%] Built target ShogunVersionProtobuf
[  3%] Generating version header
[  3%] Built target version
[ 75%] Built target libshogun
[ 75%] Built target shogun
[ 75%] copying SWIG files
[ 75%] Built target python_modular_src
[ 75%] Built target python_doxy2swig
[ 75%] Built target _python_modular
[ 75%] Built target shogun-static
[ 75%] Linking CXX executable balanced_conditional_probability_tree
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dtrsm'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dgemm'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_sscal'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dgemv'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dasum'
../../../src/shogun/libshogun.so.17.1: undefined reference to `SZ_BufftoBuffDecompress'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dscal'
../../../src/shogun/libshogun.so.17.1: undefined reference to `SZ_encoder_enabled'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_daxpy'
../../../src/shogun/libshogun.so.17.1: undefined reference to `shogun::CPrimalMosekSOSVM::CPrimalMosekSOSVM()'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_saxpy'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_ddot'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dnrm2'
../../../src/shogun/libshogun.so.17.1: undefined reference to `shogun::CMosek::CMosek()'
../../../src/shogun/libshogun.so.17.1: undefined reference to `SZ_BufftoBuffCompress'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_sasum'
../../../src/shogun/libshogun.so.17.1: undefined reference to `cblas_dger'
collect2: error: ld returned 1 exit status
examples/undocumented/libshogun/CMakeFiles/balanced_conditional_probability_tree.dir/build.make:126: recipe for target 'examples/undocumented/libshogun/balanced_conditional_probability_tree' failed
make[2]: *** [examples/undocumented/libshogun/balanced_conditional_probability_tree] Error 1
CMakeFiles/Makefile2:811: recipe for target 'examples/undocumented/libshogun/CMakeFiles/balanced_conditional_probability_tree.dir/all' failed
make[1]: *** [examples/undocumented/libshogun/CMakeFiles/balanced_conditional_probability_tree.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
[root@2d55f69e8521 build]# 

Update

Here is the output from cmake

-- The C compiler identification is GNU 5.1.1
-- The CXX compiler identification is GNU 5.1.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CCache: /usr/bin/ccache  
-- Found SWIG: /usr/lib64/ccache/swig (found suitable version "3.0.7", minimum required is "2.0.4") 
-- Performing Test _HAS_CXX11_FLAG
-- Performing Test _HAS_CXX11_FLAG - Success
-- Checking C++11 support for "__func__"
-- Checking C++11 support for "__func__": works
-- Checking C++11 support for "atomic"
-- Checking C++11 support for "atomic": works
-- Checking C++11 support for "auto"
-- Checking C++11 support for "auto": works
-- Checking C++11 support for "auto_ret_type"
-- Checking C++11 support for "auto_ret_type": works
-- Checking C++11 support for "class_override_final"
-- Checking C++11 support for "class_override_final": not supported
-- Checking C++11 support for "constexpr"
-- Checking C++11 support for "constexpr": works
-- Checking C++11 support for "cstdint"
-- Checking C++11 support for "cstdint": works
-- Checking C++11 support for "decltype"
-- Checking C++11 support for "decltype": works
-- Checking C++11 support for "initializer_list"
-- Checking C++11 support for "initializer_list": works
-- Checking C++11 support for "lambda"
-- Checking C++11 support for "lambda": works
-- Checking C++11 support for "long_long"
-- Checking C++11 support for "long_long": works
-- Checking C++11 support for "nullptr"
-- Checking C++11 support for "nullptr": works
-- Checking C++11 support for "regex"
-- Checking C++11 support for "regex": works
-- Checking C++11 support for "rvalue-references"
-- Checking C++11 support for "rvalue-references": works
-- Checking C++11 support for "sizeof_member"
-- Checking C++11 support for "sizeof_member": works
-- Checking C++11 support for "static_assert"
-- Checking C++11 support for "static_assert": works
-- Checking C++11 support for "variadic_templates"
-- Checking C++11 support for "variadic_templates": works
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Using system's malloc
-- Looking for isfinite
-- Looking for isfinite - not found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for signgam
-- Looking for signgam - found
-- Looking for fdopen
-- Looking for fdopen - found
-- Looking for log2
-- Looking for log2 - found
-- Looking for powl
-- Looking for powl - found
-- Looking for lgammal
-- Looking for lgammal - found
-- Looking for sqrtl
-- Looking for sqrtl - found
-- Looking for finite
-- Looking for finite - found
-- Looking for isfinite
-- Looking for isfinite - not found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for isnan
-- Looking for isnan - found
-- Performing Test HAVE_STD_ISINF
-- Performing Test HAVE_STD_ISINF - Success
-- Performing Test HAVE_STD_ISFINITE
-- Performing Test HAVE_STD_ISFINITE - Success
-- Performing Test HAVE_STD_ISNAN
-- Performing Test HAVE_STD_ISNAN - Success
-- Looking for xmmintrin.h
-- Looking for xmmintrin.h - found
-- Looking for emmintrin.h
-- Looking for emmintrin.h - found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Found GDB: /usr/bin/gdb  
-- Could NOT find MOSEK (missing:  MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY) 
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Looking for clapack_dpotrf in /usr/lib64/liblapack.so
-- Looking for clapack_dpotrf in /usr/lib64/liblapack.so - not found
-- Could NOT find ATLAS (missing:  ATLAS_LIBRARIES) 
-- Found CBLAS: /lib64/libgslcblas.so  
-- Looking for cblas_dsyrk in /lib64/libgslcblas.so
-- Looking for cblas_dsyrk in /lib64/libgslcblas.so - found
-- Found GLPK: /lib64/libglpk.so  
-- Could NOT find CPLEX (missing:  CPLEX_LIBRARY CPLEX_INCLUDE_DIR) 
-- Could NOT find OPENCL (missing:  OPENCL_LIBRARY OPENCL_INCLUDE_DIR) 
-- Could NOT find ViennaCL (missing:  VIENNACL_INCLUDE_DIR OPENCL_INCLUDE_DIRS OPENCL_LIBRARIES) (Required is at least version "1.5.0")
-- checking for one of the modules 'libColPack>=1.0.9;ColPack>=1.0.9'
-- Found NLOPT: /usr/lib64/libnlopt_cxx.so  
-- Found LPSOLVE: /usr/lib64/liblpsolve55.so  
-- Found ColPack: /lib64/libColPack.so  
-- Found ARPREC: /lib64/libarprec.so  
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.10") 
-- Found PythonInterp: /usr/bin/python (found version "2.7.10") 
-- checking for one of the modules 'libjson>=0.11;json>=0.11;json-c>=0.11'
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.2") 
-- Found HDF5: /usr/local/lib/libhdf5.a (found version "1.8.16") 
-- Found CURL: /usr/lib64/libcurl.so (found version "7.43.0") 
-- Found ZLIB: /usr/local/lib/libz.a (found version "1.2.8") 
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6") 
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so
-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found
-- Looking for lzma_auto_decoder in /usr/lib64/liblzma.so
-- Looking for lzma_auto_decoder in /usr/lib64/liblzma.so - found
-- Looking for lzma_easy_encoder in /usr/lib64/liblzma.so
-- Looking for lzma_easy_encoder in /usr/lib64/liblzma.so - found
-- Looking for lzma_lzma_preset in /usr/lib64/liblzma.so
-- Looking for lzma_lzma_preset in /usr/lib64/liblzma.so - found
-- Found LibLZMA: /usr/include (found version "5.2.1") 
-- Found SNAPPY: /usr/lib64/libsnappy.so  
-- Lzo Library /usr/lib64/liblzo2.so
-- Lzo Include Found in /usr/include
-- Spinlock support found
-- Found PROTOBUF: /usr/lib64/libprotobuf.so  
-- Supported backend(s) for linear algebra NOT FOUND/NOT ENABLED
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found version "2.7.10") 
-- Found NumPy: version "1.9.2" /usr/lib64/python2.7/site-packages/numpy/core/include
-- ===================================================================================================================
-- Summary of Configuration Variables
-- 
-- The following OPTIONAL packages have been found:

 * CCache
 * GDB
 * OpenMP
 * BLAS
 * LAPACK
 * CBLAS
 * GLPK
 * NLopt
 * LpSolve
 * ColPack
 * ARPREC
 * Doxygen
 * LibXml2
 * HDF5
 * CURL
 * ZLIB
 * BZip2
 * LibLZMA
 * SNAPPY
 * LZO
 * Spinlock
 * Threads
 * Protobuf

-- The following REQUIRED packages have been found:

 * SWIG (required version >= 2.0.4)
 * PythonLibs
 * PythonInterp
 * NumPy

-- The following OPTIONAL packages have not been found:

 * Mosek
 * Atlas
 * CPLEX
 * ARPACK
 * ViennaCL (required version >= 1.5.0)

-- The following REQUIRED packages have not been found:

 * OpenCL

-- ===================================================================================================================
-- Enabled Integration
--   OpenCV Integration is OFF   - enable with -DOpenCV=ON
-- ===================================================================================================================
-- Enabled Interfaces
--   libshogun is ON
--   python modular is ON
--   octave modular is OFF   - enable with -DOctaveModular=ON
--   java modular is OFF     - enable with -DJavaModular=ON
--   perl modular is OFF     - enable with -DPerlModular=ON
--   ruby modular is OFF     - enable with -DRubyModular=ON
--   csharp modular is OFF   - enable with -DCSharpModular=ON
--   R modular is OFF        - enable with -DRModular=ON
--   lua modular is OFF      - enable with -DLuaModular=ON
-- 
-- Enabled legacy interfaces
--   cmdline static is OFF   - enable with -DCmdLineStatic=ON
--   python static is OFF    - enable with -DPythonStatic=ON
--   octave static is OFF    - enable with -DOctaveStatic=ON
--   matlab static is OFF    - enable with -DMatlabStatic=ON
--   R static is OFF         - enable with -DRStatic=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: /tmp/shogun/build

Advertisement

Answer


Fedora 23, shogun : # dnf install shogun-devel

Provides version 4.0.1-0.1.git20150808.779c3ad.fc23


If you want a “build experience” : The Fedora 23 source package : shogun-4.0.1-0.1.git20150808.779c3ad.fc23.src.rpm → → includes also “gmock-1.7.0.zip”.

Unpacking the source in /home/[name]/ : $ rpm -i shogun-4.0.1-0.1.git20150808.779c3ad.fc23.src.rpm

Building the packages : $ cd rpm*/SPECS/ && rpmbuild -bb shogun.spec


User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement