-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Cannot compile retroarch on msys2 ucrt64. #17367
Comments
Could you please attach full build log and also the generated |
I see the code and oh
It appears _WIN32_WINNT not being set despite being in win11 :) config.mk and config.h
looking at it closely HAVE_NVDA should also be 0, I do not own any nvidia hardware, it's an intel iGPU... inside a VM without GPU passthrough. (Yes, I have not configured the prefix yet, just checking if it compiles.) Edit: I see now WIN32_WINNT=0x0A00 is defined for QT6 but not for everything else? huh. Ah right, you asked a full build.log, I'll generate one, but spoiler alert, it's pretty much warning-free except that part, but I'll have to generate another one. Edit: here it is build.log
|
It is added globally for C++ compiler, but not for the C compiler. Do you have a |
not that I know of.. CC is empty, also, strange I tried harcoding the version in $CFLAGS, and I seem to get the same error. But I can't seem to get the compilation flags with Edit: it was V=1
Edit: it seems the NT define is a red herring, I get the same error despite it being clearly defined. I understand it gets undefined and redefined along the way.
I added a secret pragma message to find out, and it gets rewritten to 0x0600 audio/common/mmdevice_common_inline.h:#define _WIN32_WINNT 0x0600
Well, I guess when using msys2, it defaults to 0x0600, but in that case you should do that before loading the windows.h |
Sorry to bother you, but does compilation succeed with make clean
./configure --disable-qt
make -j$(nproc) |
Also please tell why you are using the ucrt64 shell instead of mingw64? In mingw64 should probably compile without errors |
mingw64 is "deprecated", ucrt64 uses the ucrt64 which comes from windows 8.1. I will try with mingw64, but I don't expect much difference, let me try. Further links: |
Trying mingw64 on win11 with latest msys2: (
qt was disabled. |
Alright diff --git a/audio/common/mmdevice_common_inline.h b/audio/common/mmdevice_common_inline.h
index 255fdf5c9d..4ac8176c88 100644
--- a/audio/common/mmdevice_common_inline.h
+++ b/audio/common/mmdevice_common_inline.h
@@ -20,10 +20,6 @@
/* Fix for MSYS2 increasing _WIN32_WINNT to 0x0603*/
#if defined(__MINGW32__) || defined(__MINGW64__)
-#ifdef _WIN32_WINNT
-#undef _WIN32_WINNT
-#endif
-#define _WIN32_WINNT 0x0600
#define WIN32_LEAN_AND_MEAN
#else
typedef enum EDataFlow EDataFlow; I managed to make it compile!.. I think the problem was: msys2 updated to a newer version of windows, but mingw had a bug where it didnt implement the new windows 8.1 API but it provided the old API, this was a mismatch between mingw, and MSVC, a bug in mingw, and this was a monkeypatch to make it compile, it seems the bug was alerady fixed on mingw, and you can target higuer windows versions in mingw. This isn't needed anymore. In case you wanted a binary compatible binary for compatibility with windows 7 compiled with windows 11, you'd have to define the NT target before in your configuration, not hardcode it in the headers. Edit: both mingw64 and ucrt64 compile, ucrt64 has a linking problem however that mingw doesn't have This reminds me of a manifest issue. I'll try to solve it Solved: |
## Description Before there was no clear way of running msys2, and even if there was, there is no guarantee of it working, well I fixed it, and added a CI, so that we can always know if it works. Furthermore I added 2 targets more: UCRT64 and CLANG64, yes, compilation with clang64 means we can also compile with clang for windows on arm :D, plus clang has better error messages overall, anyway. ## Related Issues libretro#17367 ## Reviewers Anyone, it's my first PR here.
Is there an existing issue for this?
Description
Retro arch gets a syntax error because of new headers of mingw.
Expected behavior
It should compile.
Steps to reproduce the bug
install deps, git clone, configure, make.
Version/Commit
839b765
Bisect Results
No response
Check in the nightly version
I don't know
Platform & operating system
Windows 11
Affected Cores
No response
Environment information
MINGW64_NT-10.0-22631 windows 3.5.4-0bc1222b.x86_64 2024-12-05 09:27 UTC x86_64 Msys
Relevant log output
Details
My assumption is that this wasn't defined in mingw yet, or that the mingw declarations changed, but I am not sure.
The text was updated successfully, but these errors were encountered: