Hi,
~/gtsam/build$ make clean
~/gtsam/build$ cmake .. -DGTSAM_INSTALL_MATLAB_TOOLBOX=ON
-- GTSAM_POSE3_EXPMAP=ON, enabling GTSAM_ROT3_EXPMAP as well
-- Found Eigen version: 3.3.7
...
-- pybind11 v2.6.0 dev1
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Matlab (missing: Matlab_INCLUDE_DIRS Matlab_MEX_LIBRARY
Matlab_MEX_EXTENSION Matlab_ROOT_DIR Matlab_MX_LIBRARY MEX_COMPILER) (found
version "NOTFOUND")
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.16/Modules/FindMatlab.cmake:1802 (find_package_handle_standard_args)
wrap/cmake/MatlabWrap.cmake:10 (find_package)
wrap/cmake/MatlabWrap.cmake:67 (find_and_configure_matlab)
matlab/CMakeLists.txt:68 (matlab_wrap)
With some googling that was resolved (perhaps incorrectly?) with
~/gtsam/build$ export LD_LIBRARY_PATH=/usr/local/MATLAB/R2021a/bin/glnxa64:/usr/local/MATLAB/R2021a/sys/os/glnxa64:$LD_LIBRARY_PATH
~/gtsam/build$ cmake .. -DGTSAM_INSTALL_MATLAB_TOOLBOX=ON
cmake: /usr/local/MATLAB/R2021a/bin/glnxa64/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by cmake)
There were a few more "version not found" errors initially but removing the libstdc++ files as suggested in the instructions removed those. I think the further "Adding the toolbox to your MATLAB path" instructions are only useful once you've built with MATLAB, though I may be wrong there. My goal with all of this is to be able to run the examples in gtsam/matlab/gtsam_examples.
Thanks!
Eric