Skip to content
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

Several downstream projects require manual modifications for each new MATLAB release #1044

Closed
1 of 3 tasks
traversaro opened this issue Feb 25, 2022 · 7 comments
Closed
1 of 3 tasks

Comments

@traversaro
Copy link
Member

traversaro commented Feb 25, 2022

As @lrapetti recently experienced, we currently vendor CMake's FindMatlab.cmake file in several repos:

Whenever a new Matlab version comes out, each one of this repo need a modification and a release, to ensure that macOS users with new Matlab versions do not have problems. To avoid that, we should stop vendoring those files, and this is possible by doing the following:

In the meanwhile, this issue provide a quick remainder for all the places that we need to update whenever a new version of Matlab is released.

@traversaro
Copy link
Member Author

MATLAB R2022a (9.12) was released, that means that we need to bump all the local copies of FindMatlab, see https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7086 for the change to propagate. On the good news, the process for integrating the necessary changes in upstream CMake is ongoing:

@traversaro
Copy link
Member Author

Final PR to integrate the required functionality in MATLAB upstream was submitted: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7139 . Hopefully we will be able to release this as part of CMake 3.24 .

@traversaro
Copy link
Member Author

Final PR to integrate the required functionality in MATLAB upstream was submitted: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7139 . Hopefully we will be able to release this as part of CMake 3.24 .

The PR was merged. As soon as CMake 3.24 is released and packaged by conda-forge, we can drop the local FindMatlab.cmake files, avoiding the need to have local modifications every time a new MATLAB version is released.

@traversaro
Copy link
Member Author

traversaro commented Jan 16, 2024

Installing robotology-superbuild on @DanielePucci's Apple Silicon Laptop, we found that trying to compile against MATLAB R2023b CMake was not able to find it, even if we added the matlab executable directory to the PATH. Deleting the local FindMatlab in the projects (and in some cases deleting the build directory) CMake was able to find MATLAB without problems. It is not clear why this is the case (as in CI CMake is able to find MATLAB without problems), but as the local FindMatlab's are not required and CMake 3.24 (see previous was message) was released and we need to delete them anyhow, we can just remove them and be happy.

traversaro added a commit to robotology/yarp-matlab-bindings that referenced this issue Jan 16, 2024
traversaro added a commit to ami-iit/osqp-matlab-cmake-buildsystem that referenced this issue Jan 16, 2024
traversaro added a commit to ami-iit/casadi-matlab-bindings that referenced this issue Jan 16, 2024
traversaro added a commit to robotology/idyntree that referenced this issue Jan 16, 2024
As all the required custom logic was merged in CMake 3.24, see robotology/robotology-superbuild#1044 (comment) .
traversaro added a commit to robotology/blockfactory that referenced this issue Jan 16, 2024
As all the required custom logic was merged in CMake 3.24, see robotology/robotology-superbuild#1044 (comment) .
traversaro added a commit to robotology/idyntree that referenced this issue Jan 21, 2024
* Remove vendored FindMatlab.cmake

As all the required custom logic was merged in CMake 3.24, see robotology/robotology-superbuild#1044 (comment) .

* Fix configuration with CMake < 3.24

* Fix CMake < 3.24 configuration
traversaro added a commit to robotology/blockfactory that referenced this issue Jan 21, 2024
* Delete vendored FindMatlab.cmake

As all the required custom logic was merged in CMake 3.24, see robotology/robotology-superbuild#1044 (comment) .

* Only pass NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES to matlab_add_mex in CMake >= 3.24
@traversaro
Copy link
Member Author

Last missing PR: robotology/yarp-matlab-bindings#102 .

@traversaro
Copy link
Member Author

We should have fixed this, let's do a quick round of releases to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant