-
Notifications
You must be signed in to change notification settings - Fork 28
[Libretro] Build errors on Windows with Mingw64 #46
Comments
Thank you for reporting the errors. I'll try to fix the ones related to my commits. I think adding a default label to the switch statement should fix them. |
Perfect, thanks a lot! Once these compilation issues are addressed, my plan is to contribute with a few improvements on the libretro side (namely an update to the core options, with sublabel and translation support) and then pull the latest code downstream, so that the libretro mirror is also brought up-to-date. Looking forward to it. |
Hi Ryunam. I think I fixed the problems in my commits. The other one in Core/SSGAudio.h is added by @Perkka2 in this commit https://github.com/Perkka2/Mesen/commit/fdee47855aaee9a9e3ac2c95bdadaac82888532c#diff-c46f082694231ba998e7aa27838959b91b0ab758ef5dd75aad1c5aeb1b6ed315 |
Thank you for working on this, much appreciated! Which specific repository and/or branch should I check to see your fixes? |
The fix is commit: |
I intend to take a look at this later this week. I dont know how to test compile though since i’m not getting the issues on my setup. |
This looks like the compiler used does not support fold-expressions. @Ryunam, can you enable this feature on your compiler? Or @Perkka2, can you rewrite that line without using fold-expressions? |
Unfortunately I don’t think it’s possible to use any different compiler or internal option for this particular case, or at the very least I lack the knowledge that would be needed to explore other options. The build environment I am using is simply the one suggested in the official documentation for compiling both RetroArch and all Libretro cores on Windows, ie an MSYS2 / Mingw64 installation. See here for further reference: https://docs.libretro.com/development/retroarch/compilation/windows/ So perhaps we would have to see if something can be changed in the Makefile, but again, I’m not nearly expert enough to meddle in the Makefile code… |
@Ryunam Can you try changing line 328 in Libretro/Makefile from |
Hi, sorry for not responding earlier! Other stuff got in the way and I couldn't resume work on this until now. Unfortunately, even after applying the change that @mkwong98 suggested, I am getting tons of errors that do not show up when building from the libretro mirror here: https://github.com/libretro/Mesen
The most notable errors that I could spot - or at least, the errors that seem to be entirely absent when building from the libretro repository - are the following:
A lot of these problems seem to be related to the |
I think line 171 in EPSMAudio.h is not correctly handling _inputBuffer. ArrayInfo is for array and not for std:array. Maybe change it to |
|
How about this? I think the cause of the error is that ArrayInfo is expecting an array and not a std::array. Passing a pointer to a std::array means it is being treated as an object inside an array. When Snapshotable.h uses memset on each item in the array, the compiler finds a std::array and it gives this warning: I guess VS does not stop on this warning and Mingw64 does and I think this warning needs to be fixed. |
Ok it works well on windows atleast, though the original solution did too without any warnings. added a pull request with this update |
https://github.com/NovaSquirrel/Mesen-X/releases/tag/1.0.0 fails to build on Linux with:
|
This seems rather unrelated to the specific build error. But you're building libretro and not mesen itself i persume |
@Perkka2 well it looks like the same |
I have no idea of how to correctly setup Mingw64 to build this, have tried a bit but cant really get it to even do a decent try. I dont know what more to do currently. |
I've opened a new issue #62 |
I have Mingw64 working on my PC. There is another error with InputEntry. Initialization within the struct definition makes the struct non-trivial which still causes problems with memset. Remove those will fix that problem. And the undefined reference errors is caused by new cpp files not added to Makefile.common. Those are emu2149.cpp, ym3438.cpp and opll.cpp. I'll post a pull request to fix those. |
@mkwong98 Awesome! |
the best option here is either to wait for official mingw64 to release updated gcc or just switch over to an environment that supports latest gcc, like Arch. im on Arch so cross-compiling is not an issue. BUT i had to use this on github CI to build a windows target that required std=c++17: btw, this is a duplicate of #95 |
Hi, thank you first and foremost for continuing to work on this emulator. I am currently trying to compile a libretro core of the latest code from this repository as well as the one created by @mkwong98, using the makefile contained in the
libretro
folder with Mingw64 on Windows 10 x64.Unfortunately, when attempting to build the libretro version in either repo, the compiler throws out several errors and ultimately aborts the process. A few examples of the errors I am getting:
To the best of my knowledge, most errors seem to be related to either the audio updates that have been implemented recently or something to do with the system model identification, but unfortunately I lack the expertise needed to resolve this issue. Any help or suggestion in this regard will be much appreciated!
For further reference, the same build process works fine by either using SourMesen's original repo, or the libretro version (which is essentially a mirror of Sour's work) found here: https://github.com/libretro/Mesen
The text was updated successfully, but these errors were encountered: