matlab-actions / setup-matlab

Set up your GitHub Actions workflow with a specific version of MATLAB.
BSD 3-Clause "New" or "Revised" License
76 stars 10 forks source link

Allow to specify user defined installation path #21

Open singhbal-baljinder opened 3 years ago

singhbal-baljinder commented 3 years ago

Hello! I would like to know if it is possible to install MATLAB in a user defined path in the runner. If not, it would be a great enhancement :).

Thanks!

mcafaro commented 3 years ago

Hi @singhbal-baljinder,

You cannot currently specify the installation path of MATLAB in the setup-matlab action, but it is certainly something we could consider. Is there a particular reason the default installation path is an issue?

Best, Mark

singhbal-baljinder commented 3 years ago

@mcafaro Sorry for the late reply. While setting up MATLAB I had an issue with libstdc++.so.6: https://it.mathworks.com/matlabcentral/answers/329796-issue-with-libstdc-so-6

One of the way to solve it is to rename <matlabroot>/sys/os/glnxa64/libstdc++.so.6 to <matlabroot>/sys/os/glnxa64/libstdc++.so.6.old but I had some problems doing so on the Github Host so knowing where MATLAB is installed could help. I finally solved this issue by setting LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.

mcafaro commented 3 years ago

@singhbal-baljinder Got it. Thanks for the clarification. The MATLAB root folder is read-only on GitHub hosted agents, which would explain why you were unable to rename the library. MATLAB is currently installed under /usr/local/MATLAB.

Simon-Stone commented 2 years ago

@mcafaro Sorry for the late reply. While setting up MATLAB I had an issue with libstdc++.so.6: https://it.mathworks.com/matlabcentral/answers/329796-issue-with-libstdc-so-6

One of the way to solve it is to rename <matlabroot>/sys/os/glnxa64/libstdc++.so.6 to <matlabroot>/sys/os/glnxa64/libstdc++.so.6.old but I had some problems doing so on the Github Host so knowing where MATLAB is installed could help. I finally solved this issue by setting LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6.

I had the exact same issue regarding libstdc++.so.6 and came here to ask for write permissions. I have tried setting LD_PRELOAD in a step preceding the run-command action but MATLAB appears to ignore it. I have also tried to run setenv('LD_LIBRARY_PATH', '/usr/lib/x86_64-linux-gnu/libstdc++.so.6') in the script I am trying to run, but no success.

Could you tell me what exactly your steps are to set up your MATLAB workflow? @singhbal-baljinder

singhbal-baljinder commented 2 years ago

Could you tell me what exactly your steps are to set up your MATLAB workflow? @singhbal-baljinder

@nullpunktTUD In my ubuntu-latest CI I am changing LD_PRELOAD through the GITHUB_ENV variable: https://github.com/robotology/urdf2casadi-matlab/blob/5ca4507ba8ae98489ebdc3cf96eb585389f75576/.github/workflows/matlab_ci.yml#L57

Simon-Stone commented 2 years ago

Thank you so much for the quick response, @singhbal-baljinder ! This solved my problem.