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

조회 수: 15 (최근 30일)
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?

채택된 답변

Walter Roberson
Walter Roberson 2022년 9월 5일
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.

추가 답변 (2개)

Biral Pradhan
Biral Pradhan 2022년 9월 1일
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 2022년 9월 6일
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.
  댓글 수: 2
Walter Roberson
Walter Roberson 2022년 9월 6일
The toolchain invokes the compiler executable with --version to get back the compiler version, and compares that to the list of supported versions.
Jim Bosley
Jim Bosley 2022년 9월 7일
Thanks Walter. It sounds like I have to install gcc 10.x. Much appreciated.
Jim

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by