-
Notifications
You must be signed in to change notification settings - Fork 533
MATLAB:mpath:PathAlterationNotSupported / Modifying the search path is not supported by MATLAB Compiler using MAtlab 2019b #3507
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
Comments
I'd like to add that upcoming versions of SPM12 will likely be built with R2021b (MCR v911). If so, downgrading to a previous versions of the MCR might not be possible. The only log term fix is ti get rid of |
Do y'all know what a fix would be? We can obviously remove the line, but we'd need to confirm that it doesn't break workflows. |
Keeping it breaks workflows when using recent versions of MCR which is required by Ubuntu 20.04 and later. I'd simply remove it. |
I understand that it is causing forward compatibility problems. Before removing it, we need to understand what problem it was solving and make sure the problem remains solved with the final change. At worst, we should be able to detect the Matlab version and drop it for more recent versions. |
We haven't found any problem it could solve. It looks like |
The tests we have done on our side seem to indicate that with the MCR, things work correctly by simply commenting out the addpath() command. I think it is useful when using MATLAB as we may want to define where SPM is located. I suggest as a fix to change here:
I have not tested this fix but if you wish we can test it with an MCR > R2018b? However, you are right to test on your side if this does not lead to a regression that we did not think of! |
Sorry for the typo! I just tested it. As expected, if we remove the following two lines from here:
This works well with MCR but not with MATLAB (if SPM was not already in the matlab path). By using :
everything works fine with MCR and MATLAB (even if SPM was not already in the MATLAB path). Tested with MCR_R2018b and MATLAB R2020b. |
Sounds great to me. Would you like to open a PR? |
As you like! I do it quickly. |
But I can put you as author of the code if you want to. Note the |
Oh great ! Thanks @DimitriPapadopoulos ! |
no no it's fine like this, I don't want to be an author! |
Uh oh!
There was an error while loading. Please reload this page.
It seems modifying the matlab path using addpath() is not likely to be supported at any point after MATLAB MCR_R2018b.
However, nipype use addpath() command in the matlab script generated .
So the easy fix is to stick with R2018b.
But it's a real problem not to be able to use newer MCRs in the future.
Can you remove the addpath() command when generating the script ? Or is there another way to use MCR after R2018b?
The text was updated successfully, but these errors were encountered: