Thank you for your input on how I can resolve this issue.
I have narrowed down my problem to cmake being unable to find LAPACK and as a result Disabling SuiteSparse. I added the option -DLAPACK_LIBRARIES=<path for liblapack.a> to cmake. Then cmake could find LAPACK and enabled SuiteSparse. But in the make step, liblapack.a is said to have undefined references. The details are below. In attempts to fix LAPACK issues last week, I had installed Lapack 3.5.0 from source (from
netlib.org), after have installed libatlas-base-dev. Should I uninstall that ?
I guess I messed up the order in which these libraries need to be installed.
I have installed the libraries as below:
sudo apt-get install -qq libatlas-base-dev libeigen3-dev gfortran libsuitesparse-dev
[Even tried a sudo apt-get --reinstall install <library>]
Output of : cmake ../ceres-solver-1.8.0
-------------------------------------------------------
-- 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
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - not found
-- Did not find LAPACK library, disabling LAPACK support.
-- Found BLAS library: /usr/lib/libf77blas.so;/usr/lib/libatlas.so
-- Disabling SuiteSparse as use of LAPACK has been disabled, turn ON LAPACK to enable (optional) building with SuiteSparse.
-- Building without SuiteSparse.
-----------------------------------------------------------
Output of : make -j3
-----------------------------------------------------------
Linking CXX static library ../../lib/libtest_util.a
[ 64%] Built target test_util
Linking CXX executable ../bin/bundle_adjuster
/usr/bin/ld: /usr/local/atlas/lib/liblapack.a(ATL_dlarft.o): undefined reference to symbol 'cblas_ddot'
/usr/lib/libcblas.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [bin/bundle_adjuster] Error 1
make[1]: *** [examples/CMakeFiles/bundle_adjuster.dir/all] Error 2
make: *** [all] Error 2
-------------------------------------------------------------