I'm trying to build on linux with linuxbrew on 14.04, and it seems I'm missing one library I need to link, but I'm not sure what it should be, since the table of found libraries seems to be ok. Some of these functions seem to be implemented in netlib, but I'm not sure that's the right thing to add.
Key part of cmake command
cmake .. -DBLAS_LIBRARIES_DIR=~/.linuxbrew/lib -DLAPACK_LIBRARIES_DIR=~/.linuxbrew/lib -DLibrt_LIBRARIES=~/.linuxbrew/lib/librt.so; make VERBOSE=1
linker error
[ 14%] Linking CXX shared library ../../../../../../lib/libceres.so
cd /home/hbr/robonetracker/build/thirdparty/camodocal/src/ceres-solver/internal/ceres && /home/hbr/.linuxbrew/Cellar/cmake/3.3.2/bin/cmake -E cmake_link_script CMakeFiles/ceres.dir/link.txt --verbose=1
/home/hbr/.linuxbrew/bin/c++ -fPIC -Wall -Wno-deprecated -fPIC -finline-limit=400 -fpermissive -mfpmath=sse -msse4.1 -std=c++11 -fopenmp -DCMAKE_BUILD_TYPE=Release -DNDEBUG -O2 -O3 -ftree-vectorize -ftree-vectorizer-verbose=0 -march=native -Wl,--no-undefined -shared -Wl,-soname,libceres.so -o ../../../../../../lib/libceres.so CMakeFiles/ceres.dir/array_utils.cc.o CMakeFiles/ceres.dir/blas.cc.o CMakeFiles/ceres.dir/block_evaluate_preparer.cc.o CMakeFiles/ceres.dir/block_jacobi_preconditioner.cc.o CMakeFiles/ceres.dir/block_jacobian_writer.cc.o CMakeFiles/ceres.dir/block_random_access_crs_matrix.cc.o CMakeFiles/ceres.dir/block_random_access_dense_matrix.cc.o CMakeFiles/ceres.dir/block_random_access_matrix.cc.o CMakeFiles/ceres.dir/block_random_access_sparse_matrix.cc.o CMakeFiles/ceres.dir/block_sparse_matrix.cc.o CMakeFiles/ceres.dir/block_structure.cc.o CMakeFiles/ceres.dir/c_api.cc.o CMakeFiles/ceres.dir/canonical_views_clustering.cc.o CMakeFiles/ceres.dir/cgnr_solver.cc.o CMakeFiles/ceres.dir/compressed_col_sparse_matrix_utils.cc.o CMakeFiles/ceres.dir/compressed_row_jacobian_writer.cc.o CMakeFiles/ceres.dir/compressed_row_sparse_matrix.cc.o CMakeFiles/ceres.dir/conditioned_cost_function.cc.o CMakeFiles/ceres.dir/conjugate_gradients_solver.cc.o CMakeFiles/ceres.dir/coordinate_descent_minimizer.cc.o CMakeFiles/ceres.dir/corrector.cc.o CMakeFiles/ceres.dir/covariance.cc.o CMakeFiles/ceres.dir/covariance_impl.cc.o CMakeFiles/ceres.dir/cxsparse.cc.o CMakeFiles/ceres.dir/dense_normal_cholesky_solver.cc.o CMakeFiles/ceres.dir/dense_qr_solver.cc.o CMakeFiles/ceres.dir/dense_sparse_matrix.cc.o CMakeFiles/ceres.dir/detect_structure.cc.o CMakeFiles/ceres.dir/dogleg_strategy.cc.o CMakeFiles/ceres.dir/evaluator.cc.o CMakeFiles/ceres.dir/file.cc.o CMakeFiles/ceres.dir/gradient_checking_cost_function.cc.o CMakeFiles/ceres.dir/implicit_schur_complement.cc.o CMakeFiles/ceres.dir/incomplete_lq_factorization.cc.o CMakeFiles/ceres.dir/iterative_schur_complement_solver.cc.o CMakeFiles/ceres.dir/levenberg_marquardt_strategy.cc.o CMakeFiles/ceres.dir/lapack.cc.o CMakeFiles/ceres.dir/line_search.cc.o CMakeFiles/ceres.dir/line_search_direction.cc.o CMakeFiles/ceres.dir/line_search_minimizer.cc.o CMakeFiles/ceres.dir/linear_least_squares_problems.cc.o CMakeFiles/ceres.dir/linear_operator.cc.o CMakeFiles/ceres.dir/linear_solver.cc.o CMakeFiles/ceres.dir/local_parameterization.cc.o CMakeFiles/ceres.dir/loss_function.cc.o CMakeFiles/ceres.dir/low_rank_inverse_hessian.cc.o CMakeFiles/ceres.dir/minimizer.cc.o CMakeFiles/ceres.dir/normal_prior.cc.o CMakeFiles/ceres.dir/parameter_block_ordering.cc.o CMakeFiles/ceres.dir/partitioned_matrix_view.cc.o CMakeFiles/ceres.dir/polynomial.cc.o CMakeFiles/ceres.dir/preconditioner.cc.o CMakeFiles/ceres.dir/problem.cc.o CMakeFiles/ceres.dir/problem_impl.cc.o CMakeFiles/ceres.dir/program.cc.o CMakeFiles/ceres.dir/residual_block.cc.o CMakeFiles/ceres.dir/residual_block_utils.cc.o CMakeFiles/ceres.dir/runtime_numeric_diff_cost_function.cc.o CMakeFiles/ceres.dir/schur_complement_solver.cc.o CMakeFiles/ceres.dir/schur_eliminator.cc.o CMakeFiles/ceres.dir/schur_jacobi_preconditioner.cc.o CMakeFiles/ceres.dir/scratch_evaluate_preparer.cc.o CMakeFiles/ceres.dir/solver.cc.o CMakeFiles/ceres.dir/solver_impl.cc.o CMakeFiles/ceres.dir/sparse_matrix.cc.o CMakeFiles/ceres.dir/sparse_normal_cholesky_solver.cc.o CMakeFiles/ceres.dir/split.cc.o CMakeFiles/ceres.dir/stringprintf.cc.o CMakeFiles/ceres.dir/suitesparse.cc.o CMakeFiles/ceres.dir/triplet_sparse_matrix.cc.o CMakeFiles/ceres.dir/trust_region_minimizer.cc.o CMakeFiles/ceres.dir/trust_region_strategy.cc.o CMakeFiles/ceres.dir/types.cc.o CMakeFiles/ceres.dir/visibility.cc.o CMakeFiles/ceres.dir/visibility_based_preconditioner.cc.o CMakeFiles/ceres.dir/wall_time.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_d_d_d.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_3_4.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_4_4_2.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_3_3.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_4_4_d.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_3_d.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_3_9.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_4_4_3.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_4_d.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_2_2.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_4_4.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_2_d.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_4_4_4.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_4_3.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_2_3.cc.o CMakeFiles/ceres.dir/generated/schur_eliminator_2_2_4.cc.o -L/home/hbr/robonetracker/build/lib -lglog -Wl,-Bstatic -lspqr -lcholmod -lccolamd -lcamd -lcolamd -lamd -lsuitesparseconfig -lcxsparse -Wl,-Bdynamic -lgomp -lgflags -lpthread -lglog -ldl -lnsl -lm -lpthread -lrt -Wl,-Bstatic -lcholmod -lamd -lcamd -lcolamd -lccolamd -lldl -lspqr -lsuitesparseconfig -lcxsparse -Wl,-Bdynamic -ltbb -ltbbmalloc -lglog -Wl,-Bstatic -lcholmod -lccolamd -lcamd -lcolamd -lamd -Wl,-Bdynamic -lgomp -lgflags -lpthread -ldl -lnsl -lm -lrt -Wl,-Bstatic -lldl -Wl,-Bdynamic -ltbb -ltbbmalloc -Wl,-rpath,/home/hbr/robonetracker/build/lib
CMakeFiles/ceres.dir/blas.cc.o: In function `ceres::internal::BLAS::SymmetricRankKUpdate(int, int, double const*, bool, double, double, double*)':
blas.cc:(.text+0x62): undefined reference to `dsyrk_'
CMakeFiles/ceres.dir/lapack.cc.o: In function `ceres::internal::LAPACK::SolveInPlaceUsingCholesky(int, double const*, double*)':
lapack.cc:(.text+0x4c): undefined reference to `dpotrf_'
lapack.cc:(.text+0xd8): undefined reference to `dpotrs_'
CMakeFiles/ceres.dir/lapack.cc.o: In function `ceres::internal::LAPACK::SolveUsingQR(int, int, double const*, int, double*, double*)':
lapack.cc:(.text+0x1b6): undefined reference to `dgels_'
CMakeFiles/ceres.dir/lapack.cc.o: In function `ceres::internal::LAPACK::EstimateWorkSizeForQR(int, int)':
lapack.cc:(.text+0x22a): undefined reference to `dgels_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_maxcolnorm.o): In function `double spqr_maxcolnorm<double>(cholmod_sparse_struct*, cholmod_common_struct*)':
spqr_maxcolnorm.cpp:(.text._Z15spqr_maxcolnormIdEdP21cholmod_sparse_structP21cholmod_common_struct[_Z15spqr_maxcolnormIdEdP21cholmod_sparse_structP21cholmod_common_struct]+0xd0): undefined reference to `dnrm2_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_maxcolnorm.o): In function `double spqr_maxcolnorm<std::complex<double> >(cholmod_sparse_struct*, cholmod_common_struct*)':
spqr_maxcolnorm.cpp:(.text._Z15spqr_maxcolnormISt7complexIdEEdP21cholmod_sparse_structP21cholmod_common_struct[_Z15spqr_maxcolnormISt7complexIdEEdP21cholmod_sparse_structP21cholmod_common_struct]+0xd4): undefined reference to `dznrm2_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_front.o): In function `long spqr_front<double>(long, long, long, double, long, long, double*, long*, char*, double*, double*, double*, double*, cholmod_common_struct*)':
spqr_front.cpp:(.text._Z10spqr_frontIdElllldllPT_PlPcS1_S1_PdS4_P21cholmod_common_struct[_Z10spqr_frontIdElllldllPT_PlPcS1_S1_PdS4_P21cholmod_common_struct]+0x2f9): undefined reference to `dlarfg_'
spqr_front.cpp:(.text._Z10spqr_frontIdElllldllPT_PlPcS1_S1_PdS4_P21cholmod_common_struct[_Z10spqr_frontIdElllldllPT_PlPcS1_S1_PdS4_P21cholmod_common_struct]+0x52c): undefined reference to `dlarf_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_front.o): In function `long spqr_front<std::complex<double> >(long, long, long, double, long, long, std::complex<double>*, long*, char*, std::complex<double>*, std::complex<double>*, double*, double*, cholmod_common_struct*)':
spqr_front.cpp:(.text._Z10spqr_frontISt7complexIdEElllldllPT_PlPcS3_S3_PdS6_P21cholmod_common_struct[_Z10spqr_frontISt7complexIdEElllldllPT_PlPcS3_S3_PdS6_P21cholmod_common_struct]+0x337): undefined reference to `zlarfg_'
spqr_front.cpp:(.text._Z10spqr_frontISt7complexIdEElllldllPT_PlPcS3_S3_PdS6_P21cholmod_common_struct[_Z10spqr_frontISt7complexIdEElllldllPT_PlPcS3_S3_PdS6_P21cholmod_common_struct]+0x5eb): undefined reference to `zlarf_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_larftb.o): In function `spqr_private_larft(char, char, long, long, double*, long, double*, double*, long, cholmod_common_struct*)':
spqr_larftb.cpp:(.text._Z18spqr_private_larftccllPdlS_S_lP21cholmod_common_struct[_Z18spqr_private_larftccllPdlS_S_lP21cholmod_common_struct]+0x87): undefined reference to `dlarft_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_larftb.o): In function `spqr_private_larft(char, char, long, long, std::complex<double>*, long, std::complex<double>*, std::complex<double>*, long, cholmod_common_struct*)':
spqr_larftb.cpp:(.text._Z18spqr_private_larftccllPSt7complexIdElS1_S1_lP21cholmod_common_struct[_Z18spqr_private_larftccllPSt7complexIdElS1_S1_lP21cholmod_common_struct]+0x87): undefined reference to `zlarft_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_larftb.o): In function `spqr_private_larfb(char, char, char, char, long, long, long, double*, long, double*, long, double*, long, double*, long, cholmod_common_struct*)':
spqr_larftb.cpp:(.text._Z18spqr_private_larfbcccclllPdlS_lS_lS_lP21cholmod_common_struct[_Z18spqr_private_larfbcccclllPdlS_lS_lS_lP21cholmod_common_struct]+0xfb): undefined reference to `dlarfb_'
/home/hbr/.linuxbrew/lib/libspqr.a(spqr_larftb.o): In function `spqr_private_larfb(char, char, char, char, long, long, long, std::complex<double>*, long, std::complex<double>*, long, std::complex<double>*, long, std::complex<double>*, long, cholmod_common_struct*)':
spqr_larftb.cpp:(.text._Z18spqr_private_larfbcccclllPSt7complexIdElS1_lS1_lS1_lP21cholmod_common_struct[_Z18spqr_private_larfbcccclllPSt7complexIdElS1_lS1_lS1_lP21cholmod_common_struct]+0x106): undefined reference to `zlarfb_'
/home/hbr/.linuxbrew/lib/libcholmod.a(cholmod_super_numeric.o): In function `r_cholmod_super_numeric.isra.18':
cholmod_super_numeric.c:(.text.unlikely+0x77c): undefined reference to `dsyrk_'
cholmod_super_numeric.c:(.text.unlikely+0x84a): undefined reference to `dgemm_'
cholmod_super_numeric.c:(.text.unlikely+0xab9): undefined reference to `dpotrf_'
cholmod_super_numeric.c:(.text.unlikely+0xc48): undefined reference to `dtrsm_'
/home/hbr/.linuxbrew/lib/libcholmod.a(cholmod_super_numeric.o): In function `c_cholmod_super_numeric.isra.19':
cholmod_super_numeric.c:(.text.unlikely+0x147c): undefined reference to `zherk_'
cholmod_super_numeric.c:(.text.unlikely+0x1550): undefined reference to `zgemm_'
cholmod_super_numeric.c:(.text.unlikely+0x17c0): undefined reference to `zpotrf_'
cholmod_super_numeric.c:(.text.unlikely+0x195f): undefined reference to `ztrsm_'
/home/hbr/.linuxbrew/lib/libcholmod.a(cholmod_super_numeric.o): In function `z_cholmod_super_numeric.isra.20':
cholmod_super_numeric.c:(.text.unlikely+0x21f7): undefined reference to `zherk_'
cholmod_super_numeric.c:(.text.unlikely+0x22cb): undefined reference to `zgemm_'
cholmod_super_numeric.c:(.text.unlikely+0x253f): undefined reference to `zpotrf_'
cholmod_super_numeric.c:(.text.unlikely+0x26de): undefined reference to `ztrsm_'
/home/hbr/.linuxbrew/lib/libcholmod.a(cholmod_super_solve.o): In function `cholmod_super_lsolve':
cholmod_super_solve.c:(.text+0x410): undefined reference to `dtrsv_'
cholmod_super_solve.c:(.text+0x49a): undefined reference to `dgemv_'
cholmod_super_solve.c:(.text+0x562): undefined reference to `dtrsm_'
cholmod_super_solve.c:(.text+0x6e0): undefined reference to `dgemm_'
cholmod_super_solve.c:(.text+0x8f1): undefined reference to `ztrsv_'
cholmod_super_solve.c:(.text+0x97f): undefined reference to `zgemv_'
cholmod_super_solve.c:(.text+0xa6a): undefined reference to `ztrsm_'
cholmod_super_solve.c:(.text+0xbfd): undefined reference to `zgemm_'
/home/hbr/.linuxbrew/lib/libcholmod.a(cholmod_super_solve.o): In function `cholmod_super_ltsolve':
cholmod_super_solve.c:(.text+0x1081): undefined reference to `dgemv_'
cholmod_super_solve.c:(.text+0x10e6): undefined reference to `dtrsv_'
cholmod_super_solve.c:(.text+0x1284): undefined reference to `dgemm_'
cholmod_super_solve.c:(.text+0x1318): undefined reference to `dtrsm_'
cholmod_super_solve.c:(.text+0x14da): undefined reference to `zgemv_'
cholmod_super_solve.c:(.text+0x1544): undefined reference to `ztrsv_'
cholmod_super_solve.c:(.text+0x16f7): undefined reference to `zgemm_'
cholmod_super_solve.c:(.text+0x1794): undefined reference to `ztrsm_'
collect2: error: ld returned 1 exit status
thirdparty/camodocal/src/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/build.make:2500: recipe for target 'lib/libceres.so' failed
make[2]: *** [lib/libceres.so] Error 1
make[2]: Leaving directory '/home/hbr/robonetracker/build'
CMakeFiles/Makefile2:1915: recipe for target 'thirdparty/camodocal/src/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/all' failed
make[1]: *** [thirdparty/camodocal/src/ceres-solver/internal/ceres/CMakeFiles/ceres.dir/all] Error 2
make[1]: Leaving directory '/home/hbr/robonetracker/build'
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
I'm trying to build on linux with linuxbrew on 14.04, and it seems I'm missing one library I need to link, but I'm not sure what it should be, since the table of found libraries seems to be ok. Some of these functions seem to be implemented in netlib, but I'm not sure that's the right thing to add.
Key part of cmake command
linker error