How can I install MinGW for use in a new version of MATLAB?

4 views (last 30 days)
Hello,
I want to ask some help for installing a C-language complier 'Mingw-w64', it has installed on a Matlab 2019b and work pretty well.
However, i moved to 2021a recently since a konw bug on matlab (the 'invoke' code for instrument control). the compiler was firstly installed automaticly for first time matlab launch. Then when I compile my previous code, it asked to instal the compiler that is shown installed in adds-on.
when I type 'mex -setup -v' in command window, it shows a 'Yes' for environement variable and a 'No' for the 'gcc.exe'. Thus i unstalled the compiler in addson and i wanted to reinstal the complier. However, this time download of the software is blocked.
Any one suffered a similar issue?
  2 Comments
K Hu
K Hu on 4 Oct 2021
Yes, all the installations were via the Add-Ons explorer for both 2019a and 2021a. The 2021a asked to update the packages at the first launch, and I saw all the add-ons of 2019a on the list. Besides other packages, only the 'Mingw-w64' can not be installed. I tried three different times, and it never worked.

Sign in to comment.

Answers (1)

Jesús Zambrano
Jesús Zambrano on 4 Oct 2021
Go to the Add-Ons explorer and type mingw64. Then, proceed with downloading and installing the compiler.
  3 Comments
Jesús Zambrano
Jesús Zambrano on 4 Oct 2021
Please try and click the link "MATLAN Answer" that shows in the Error message.
K Hu
K Hu on 5 Oct 2021
Hi, i had tried the solution mentioned in the forum and i got the install log file. Which shows that the problem is due to internet connection.
I want to ask to sent me the package to install the minGW-W64, since I can not desactivate the anti-virus program.
Regards,
Kejun
(oct. 04, 2021 15:12:18) ##################################################################
(oct. 04, 2021 15:12:18) #
(oct. 04, 2021 15:12:18) # Today's Date:
(oct. 04, 2021 15:12:18) Mon Oct 04 15:12:18 CEST 2021
(oct. 04, 2021 15:12:18)
(oct. 04, 2021 15:12:18) System Info
(oct. 04, 2021 15:12:18) OS: Windows 7 6.1
(oct. 04, 2021 15:12:18) Arch: amd64
(oct. 04, 2021 15:12:18) Data Model: 64
(oct. 04, 2021 15:12:18) Language: fr
(oct. 04, 2021 15:12:18) Java Vendor: Oracle Corporation
(oct. 04, 2021 15:12:18) Java Home: C:\Applications-FEMTO-ST\Matlab2021a-FEMTO-ST\sys\java\jre\win64\jre
(oct. 04, 2021 15:12:18) Java Version: 1.8.0_202
(oct. 04, 2021 15:12:18) Java VM Name: Java HotSpot(TM) 64-Bit Server VM
(oct. 04, 2021 15:12:18) Release Description: R2021a_Update_4
(oct. 04, 2021 15:12:18) Java Class Path: Skipped
(oct. 04, 2021 15:12:18) User Name: kejun.hu
(oct. 04, 2021 15:12:18) Current Directory: G:\Utilisateurs\kejun.hu\Documents\MATLAB
(oct. 04, 2021 15:12:18) Initializing session 2025c006-a41b-47e9-af8f-67939a0516a0
(oct. 04, 2021 15:12:18) isDesktopSupported: true
(oct. 04, 2021 15:12:18) In cacheParameters()
(oct. 04, 2021 15:12:18) QueryParams{inputfile='', matlabroot='C:\Applications-FEMTO-ST\Matlab2021a-FEMTO-ST', workflowType='ADDONSINSTALL', downloadfolder='', installfolder='C:\ProgramData\MATLAB\SupportPackages\R2021a', basecode=[ML_MINGW], entryPoint='AddOns', entryPointKey='721b7847-1816-48f6-aa6c-4629b232dde3', archiveLocation=''}
(oct. 04, 2021 15:12:18) MATLAB root: C:\Applications-FEMTO-ST\Matlab2021a-FEMTO-ST
(oct. 04, 2021 15:12:18) Download folder: G:\Utilisateurs\kejun.hu\AppData\Local\Temp\SupportPackages_R2021a4488045263441987607
(oct. 04, 2021 15:12:18) Installation folder: C:\ProgramData\MATLAB\SupportPackages\R2021a
(oct. 04, 2021 15:12:18) Current widget = MAIN, Next widget = VALIDATION
(oct. 04, 2021 15:12:23) Starting local product/component search in download directory
(oct. 04, 2021 15:12:23) Searching for archives...
(oct. 04, 2021 15:12:23) G:\Utilisateurs\kejun.hu\AppData\Local\Temp\ssi_dws_2180330130322280568\archives doesn't exist ... skipping.
(oct. 04, 2021 15:12:23) Reading G:\Utilisateurs\kejun.hu\AppData\Local\Temp\ssi_dws_2180330130322280568
(oct. 04, 2021 15:12:23) Assembling product list...
(oct. 04, 2021 15:12:23) 0 files found in G:\Utilisateurs\kejun.hu\AppData\Local\Temp\ssi_dws_2180330130322280568
(oct. 04, 2021 15:12:23) Archive search complete. 0 total files found.
(oct. 04, 2021 15:12:23) Completed local product/component search
(oct. 04, 2021 15:12:23) Retrieving product data
(oct. 04, 2021 15:13:47) java.lang.Exception: GetReleaseDataWS:
at com.mathworks.supportsoftwareinstaller.command.GetSSIReleaseDataCallable.call(GetSSIReleaseDataCallable.java:56)
at com.mathworks.supportsoftwareinstaller.command.GetSSIReleaseDataCallable.call(GetSSIReleaseDataCallable.java:16)
at com.mathworks.wizard.worker.WorkerImpl.doInBackground(WorkerImpl.java:24)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.mathworks.webservices.client.core.MathWorksClientException: unable to connect to host Connection timed out: connect
at com.mathworks.webservices.client.core.MathWorksWebServiceClient.executeRequest(MathWorksWebServiceClient.java:308)
at com.mathworks.webservices.client.core.MathWorksWebServiceClient.executeRequest(MathWorksWebServiceClient.java:89)
at com.mathworks.webservices.dws.client.ssi.SSIWSClientImpl.getReleaseData(SSIWSClientImpl.java:56)
at com.mathworks.supportsoftwareinstaller.command.GetSSIReleaseDataCallable.call(GetSSIReleaseDataCallable.java:52)
... 8 more
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
at sun.security.ssl.SSLSocketImpl.(SSLSocketImpl.java:471)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
at com.mathworks.webservices.client.core.http.HttpsProtocolSocketFactory.createSocket(HttpsProtocolSocketFactory.java:55)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at com.mathworks.webservices.client.core.http.MathWorksHttpClient.invoke(MathWorksHttpClient.java:158)
at com.mathworks.webservices.client.core.MathWorksWebServiceClient.executeRequest(MathWorksWebServiceClient.java:214)
... 11 more
(oct. 04, 2021 15:13:47) Error: The application could not connect to MathWorks.
For more information on resolving this issue, see this Support Article
(oct. 04, 2021 15:13:47) Exiting with status -2
(oct. 04, 2021 15:13:47) End - Unsuccessful.
(oct. 04, 2021 15:13:47) Download Error: There was a problem downloading the support package. To resolve this issue, see this MATLAB Answer
at com.mathworks.supportsoftwareinstaller.api.SupportSoftwareInstallerUtils.downloadProductDataByBaseCode(SupportSoftwareInstallerUtils.java:299)
at com.mathworks.supportsoftwareinstaller.services.ProductValidationService.installValidationWithOverrides(ProductValidationService.java:177)
at com.mathworks.supportsoftwareinstaller.services.ProductValidationService.installValidation(ProductValidationService.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mathworks.installservicehandler.JsonPassThroughResponseWrapper.getData(JsonPassThroughResponseWrapper.java:24)
at com.mathworks.installservicehandler.JsonPassThroughResponseWrapper.getData(JsonPassThroughResponseWrapper.java:10)
at com.mathworks.connector.cosg.impl.CosgServiceProvider.deliver(CosgServiceProvider.java:76)
at com.mathworks.connector.impl.ConnectorImpl.handle(ConnectorImpl.java:64)
at com.mathworks.connector.impl.ContextImpl.handle(ContextImpl.java:182)
at com.mathworks.connector.native_bridge.impl.NativeBridgeImpl.handle(NativeBridgeImpl.java:25)
at com.mathworks.connector.native_bridge.NativeBridge.fromNative(NativeBridge.java:23)
Caused by: java.lang.Exception: MW content: GetReleaseDataWS: com.mathworks.webservices.client.core.MathWorksClientException: unable to connect to host Connection timed out: connect
... 14 more
(oct. 04, 2021 15:14:35) java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.mathworks.supportsoftwareinstaller.udc.SSIUsageDataCollectorImpl.sendData(SSIUsageDataCollectorImpl.java:396)
at com.mathworks.supportsoftwareinstaller.servicebridge_impl.FinalizeServiceBridgeImpl.processDDUX(FinalizeServiceBridgeImpl.java:114)
at com.mathworks.supportsoftwareinstaller.servicebridge_impl.FinalizeServiceBridgeImpl.finalizeSession(FinalizeServiceBridgeImpl.java:35)
at com.mathworks.supportsoftwareinstaller.services.FinalizationService.finalizeSession(FinalizationService.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.mathworks.installservicehandler.JsonPassThroughResponseWrapper.getData(JsonPassThroughResponseWrapper.java:24)
at com.mathworks.installservicehandler.JsonPassThroughResponseWrapper.getData(JsonPassThroughResponseWrapper.java:10)
at com.mathworks.connector.cosg.impl.CosgServiceProvider.deliver(CosgServiceProvider.java:76)
at com.mathworks.connector.impl.ConnectorImpl.handle(ConnectorImpl.java:64)
at com.mathworks.connector.impl.ContextImpl.handle(ContextImpl.java:182)
at com.mathworks.connector.native_bridge.impl.NativeBridgeImpl.handle(NativeBridgeImpl.java:25)
at com.mathworks.connector.native_bridge.NativeBridge.fromNative(NativeBridge.java:23)

Sign in to comment.

Categories

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

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!