Building the Sparse Bundle Adjustment (SBA) library on OS X
I'm trying to build slam_karto
from source, which in turn needs open_karto
and sparse_bundle_adjustment
The sparse_bundle_adjustment catkin package has 3 dependencies of interest: liblapack-dev
, libblas-dev
, and suitesparse
OS X comes with (some version of) the first two.
I then tried three different ways of installing SuiteSparse:
- This catkin wrapper: https://github.com/ethz-asl/suitesparse It seemed to work. But then when I tried to build SBA the linker complained that
ld: library not found for -lcholmod
- Installing SuiteSparse from source http://faculty.cse.tamu.edu/davis/sui... Got lost in dependencies.
clang: error: no such file or directory: '[...]/SuiteSparse/lib/libmetis.dylib'
- Realizing it's available via Homebrew,
brew install suite-sparse
This got memetis
, the dependency above, and installed SuiteSparse. But then, when I tried to compile SBA:fatal error: 'suitesparse/cs.h' file not found
I commented out that#include "suitesparse/cs.h"
just to see if it can find other headers. It cannot:fatal error: 'suitesparse/cholmod.h' file not found
However, these headers are indeed under:/usr/local/Cellar/suite-sparse/4.5.1/include
and the seem to be symlinked from/usr/loca/include
, e.g.,cs.h -> ../Cellar/suite-sparse/4.5.1/include/cs.h
Has anyone been able to build SBA (and SLAM Karto in general) on OS X? Please let me know if you need more information. Thanks in advance!