-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation of MATLAB toolbox fails for non-default MATLAB paths (Unix only) #126
Comments
Sorry in case this bug is better to be be posted in the google group instead. But as I did not have access over there i was afraid of forgetting to report the problem otherwise. |
Or you could just update the CMake Prefix Path before running export CMAKE_PREFIX_PATH=/mnt/MatlabR20DDs/extern:$CMAKE_PREFIX_PATH https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/Useful-Variables |
This is pretty much a custom case for you and can be easily fixed with some cmake cleverness, rather than a GTSAM bug. I vote to close this. |
Thanks @VGab and @varunagrawal ! I think we should not close it yet. At the very least we should see whether Varun’s suggestion works, and then we should add it into docs and on the website. but, actually, i’m not in love with doing this via |
Looking at So, would
be the shell equivalent (let's pretend this is Linux for a moment)? I'm awful at following CMake rabbit holes ... |
Thanks for denoting this @mikesheffler. I was not aware of that as the MATLAB ROOT variable is not shown by default in cmake -DMEX_COMMAND=/usr/MatlabR20DDs/bin/mex \
-DMATLAB_ROOT=/mnt/MatlabR20DDs \
-DGTSAM_INSTALL_MATLAB_TOOLBOX=ON .. circumvents the nonsense I claimed above and does resolve this "issue". I support @varunagrawal's claim that this issue is more of a rare and custom case problem and can be closed, but in order to make this problem visible to all users, one could add
in line 576-582 at the top-level CMakeLists.txt. I think this is not worth a pull request and leave it up to you if this should be added or not. Edit note: |
Think we should print MEX compiler and MATLAB path as @VGab suggested, as this is also what OpenCV does. I will prepare a PR shortly. |
The CMake printing was added by #393. |
0ab10c359 Fix pyparsing version and replace `create_symlinks` with `copy_directory` (#128) 230a3c967 Merge pull request #127 from borglab/feature/template-instantiator cc7d9a8b4 breakdown template instantiator into smaller submodules 59536220a Merge pull request #126 from borglab/feature/instantiation-tests 7ee715ecc add type info to template_instantiator b367ed93d tests for InstantiationHelper e41cfd50e tests for InstantiatedGlobalFunction 1837982a7 tests for InstantiatedClass a7e3678a3 tests for InstantiatedStaticMethod da06c53f7 tests for InstantiatedMethod c645c143c tests for InstantiatedConstructor b8a046267 tests for InstantiatedDeclaration af80c9d04 finish all tests for namespace level instantiation d6085c37a add tests for high level template instantiation f7ae91346 add docs and utility method d90abb52b Merge pull request #125 from borglab/feature/templated-static 58cdab20d clean up 247cea727 add helper for multilevel instantiation 761f588e4 update tests 81e5d5d19 update pybind wrapper to use new way 96d1575d8 streamlined way of instantiating template for class methods 1e4e88799 add to_cpp method for Method 485d43138 add the test fixtures 8cb943635 support instantiation of static method templates 84ef6679b add template to static method parser git-subtree-dir: wrap git-subtree-split: 0ab10c359a6528def20eddc60aced74a04250419
While compiling GTSAM and the dedicated matlab toolbox a few hours ago, I encountered the issue that
mex.h
could not have been found.While this bug stems from a customized problem at my PC, the quick bug fix may be of help for others or can be added as an additional options to the CMake files in a future release
Description
I followed the instructions on the installation page as well as the dedicated readme in the matlab sections. Nonethless, the compilation terminated as seen below
Steps to reproduce
The problem in here lies presumably in my custom setup, where MATLAB is not installed in the standard unix location, i.e.
/usr/local/MatlabRelease/
, but mounted from a network share within a lab environment.So in order to reproduce this error,
Environment
The problem occurred on
Additional information
quick and dirty fix
The compilation was successfully run after adding the Matlab c-headers directly into the CMakeLists.txt file in line 401 and 424
Preferably one could introduce a new option to the CMakeLists, but I assumed this to be a very specific and rare error, thus preferring to pinpoint to the quick fix above.
The text was updated successfully, but these errors were encountered: