"The support package is not compatible with your version of MATLAB or operating system." for installing minGW in R2022a

23 views (last 30 days)
With some help I got matlab installed in ubuntu. Works fine, however, I get the warning (words to the effect):
"You should install a C++ compiler to accelerate your matlab work"
during the install.
Ok, so I go into the add-on package, download the install script, run it per the docs, and I get
"The support package is not compatible with your version of MATLAB or operating system."
There is no workaround that I can see. I'm using the latest gcc 11.2.0 , compatible with ubuntu 22.04.
I can install minGW in this version of linux and it works. I just can't link it with matlab.
Is there any way to get the gcc 11.2 compiler working with Matlab?

Accepted Answer

Walter Roberson
Walter Roberson on 5 Sep 2022
Is there any way to get the gcc 11.2 compiler working with Matlab?
gcc is open source. You can grab the source and modify the code so that it lies about which version it is in response to the --version command line query, so that MATLAB will accept using it.
Whether there will be any problems caused by using it instead of gcc 10.x is a different question.

More Answers (2)

Biral Pradhan
Biral Pradhan on 1 Sep 2022
I understand you are using MATLAB on Ubuntu 22.04 and are trying to install a C++ compiler for your work. Since it is unclear which version of MATLAB you are using, kindly follow the documentation link below to find supported compilers.
For R2022a:
For R2021b and earlier:
I would recommend you to install a supported GCC compiler. Once done, kindly follow the documentation link below to change the default compiler to the supported version.

Jim Bosley
Jim Bosley on 6 Sep 2022
Thanks for the help, gentlemen. Ok, let me be more clear than I was.
  1. From matlab compiler page I understand that all I have to do to change the default compiler is to add that compiler to the system PATH variable. Since gcc is in /usr/bin, and /usr/bin is in my system PATH, I'm ok, correct?
  2. I ran the mex example succesfully using gcc 11.2 which was the default gcc version installed by the latest ubuntu (22.04, "Jammin' Jellyfish'). It seems to work whether I include GCC='/usr/bin/gcc' or GCC='/usr/bin/gcc-11' or indeed without any GCC flag.
  3. I assume that simbiology looks for the gcc program in /usr/bin/. If so, does it look for "gcc" or does it explicitly look for "gcc-10"? Ideally it would look for gcc-10, and then check the unversioned command (gcc) for version, and would use any more recent version but would throw a flag. "Your gcc compiler is a more recent version that the supported version. Proceed at your own risk".
  4. I could install a parallel version of gcc (10.x) but would rather not. Unless there's a strong reason to do so I suspect that I'll stand pat with 11.2 until something breaks.
Thanks for the help guys and gals.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!