Fixing WSL errors while generating Linux compatible FMU using FMU Builder

10 views (last 30 days)
I am trying to generate a Linux compatible FMU using FMU Builder for a Simulink model. The windows version of the FMU is generated withour any errors and it works well. But while generating a Linux compatible FMU, I get an error. I have attached a screenshot of the error below.
I have WSL2 installed on my system (5.15.167.4-microsoft-standard-WSL2).
How do I fix this error?
  13 Comments
Swastik Sarkar
Swastik Sarkar on 25 Jun 2025
Please check the contents of the following directory to see if there is any wsl distro.
Additionally please check if you have the permission to write to this folder
fullfile(matlabshared.supportpkg.getSupportPackageRoot(),'toolbox','shared','simulink','fmubuilder')
Ashwin
Ashwin on 27 Jun 2025
I checked the directory and found the distro. But apparently, it was not installed properly (just the distro, not FMU-Builder toolbox). So, I took the assistance of Mathworks support to manually install the distro in the same file path using command prompt. Then I was able to generate the Fmu.

Sign in to comment.

Accepted Answer

Ashwin
Ashwin on 27 Jun 2025
The issue was caused by FMU-Builder distro (The WSL distro that comes packaged with FMU Builder toolbox) not getting installed properly. Uninstalling and reinstalling FMU Builder did not fix the issue (I am using FMU Builder Version 24.2.2, maybe this isa glitch in this version itself).
The workaround to the issue is to go to the file path: C/ProgramData/Matlab/SupportPackages/"MatlabVersion"/toolbox/shared/simulink/fmubuilder
and check if the distro folder is available there. If its not, then you need to create a folder called InstallDir and manually install the distro in that file path. This will fix the issue.

More Answers (0)

Categories

Find more on Simulink Environment Customization in Help Center and File Exchange

Products


Release

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!