Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: mex command failed to find mingw64 g++ even MW_MINGW64_LOC was defined #75

Closed
fangq opened this issue Oct 29, 2023 · 4 comments

Comments

@fangq
Copy link

fangq commented Oct 29, 2023

this seems to be a recent regression on setup-matlab (although I can't exclude the possibility that something in my script that has caused this, or github's windows-2019 runner).

previously, my github action script can build a mex file on windows without any issue using mingw64 g++ (by defining MW_MINGW64_LOC), see a successful build on Oct 7 (expand the section Build mcxlabcl for MATLAB)

https://github.com/fangq/mcxcl/actions/runs/6443229681/job/17494922687

however, I just made some changes in my C code without touching the github action script, mex failed with the following error:

Supported compiler not detected. You can install the freely available MinGW-w64 C/C++ compiler; visit https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-compiler. For more options, visit https://www.mathworks.com/support/compilers.

switching matlab from latest to R2022a did not solve this problem

https://github.com/fangq/mcxcl/actions/runs/6684861633/job/18162546536 (using latest)
https://github.com/fangq/mcxcl/actions/runs/6684966422/job/18162772877 (using R2022a)

from the log, you can see MW_MINGW64_LOC was defined the same way as it was before.

I am not sure if this is caused by github runner image changes, or this is related to matlab changes.
Please let me know if have any suggestions.

@fangq
Copy link
Author

fangq commented Oct 29, 2023

I further confirm this issue by rerunning one of the previously successful jobs without changing anything, yet, the resubmitted job failed with the same error:

here is the failed job log:
https://github.com/fangq/mmc/actions/runs/6356350750/job/18163174446

here is the previous successful job
https://github.com/fangq/mmc/actions/runs/6356350750/attempts/1

no change was made to the code.

@mcafaro
Copy link
Member

mcafaro commented Nov 9, 2023

I would not expect setup-matlab to be involved here. latest switched to R2023b in mid-September and the original successful build was run long after that (Oct 7th), so I would not expect that switch to be involved either.

Have you tried to confirm chocolatey is still installing mingw64 in the same location?

@mcafaro
Copy link
Member

mcafaro commented Nov 9, 2023

Looking at some of the changes to the windows-2019 GitHub runner README, it looks like Mingw-w64 was removed from the list of preinstalled software recently: actions/runner-images@2ffd260#diff-816219d3c9f30fcc1c40f88ca826c1662bf99eded781c1b419dd2dfb577ae227L75

That seems like a potential culprit. You may need to install it manually now.

@fangq
Copy link
Author

fangq commented Nov 10, 2023

thank you so much for noticing this package change in the log! after installing mingw64 on windows, the issue is gone.

much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants