Emulator Issues #13515
closedDolphin does not build with Minizip-ng 4.0.4.
0%
Description
Dolphin does not build with Minizip-ng 4.0.4.
https://github.com/dolphin-emu/dolphin/commit/a5d06fde4b597d93750ba29bc2db83401fe431f7
Changed the last parameter to unzLocateFile() from 0 to NULL.
https://github.com/zlib-ng/minizip-ng/commit/6c5f265a55f1a12a7a016cd2962feff91cff5d2e
MZ_COMPAT_VERSION is not defined. unzFileNameCase is an int.
#if !defined(MZ_COMPAT_VERSION) || MZ_COMPAT_VERSION < 110
ZEXPORT int unzLocateFile(unzFile file, const char *filename, unzFileNameCase filename_case);
#else
ZEXPORT int unzLocateFile(unzFile file, const char* filename, unzFileNameComparer filename_compare_func);
#endif
/home/ports/pobj/dolphin-5.0.0.20230722/dolphin-5.0.0.20230722/Source/Core/UICommon/ResourcePack/ResourcePack.cpp:39:7: error: no matching function for call to 'unzLocateFile'
if (unzLocateFile(file, "manifest.json", nullptr) == UNZ_END_OF_LIST_OF_FILE)
^~~~~~~~~~~~~
/usr/local/include/minizip/mz_compat.h:364:17: note: candidate function not viable: no known conversion from 'std::nullptr_t' to 'unzFileNameCase' (aka 'int') for 3rd argument
ZEXPORT int unzLocateFile(unzFile file, const char *filename, unzFileNameCase filename_case);
^
/home/ports/pobj/dolphin-5.0.0.20230722/dolphin-5.0.0.20230722/Source/Core/UICommon/ResourcePack/ResourcePack.cpp:66:7: error: no matching function for call to 'unzLocateFile'
if (unzLocateFile(file, "logo.png", nullptr) != UNZ_END_OF_LIST_OF_FILE)
^~~~~~~~~~~~~
/usr/local/include/minizip/mz_compat.h:364:17: note: candidate function not viable: no known conversion from 'std::nullptr_t' to 'unzFileNameCase' (aka 'int') for 3rd argument
ZEXPORT int unzLocateFile(unzFile file, const char *filename, unzFileNameCase filename_case);
^
2 errors generated.
Updated by Billiard26 9 months ago
- Related to Emulator Issues #13169: Compilation error on Fedora Linux - minizip vs minizip-ng added
Updated by Billiard26 9 months ago
Changing the last argument to 0
is a bit of a hacky fix, imo. Zero just happens to work for both versions of the function since C++ is so weakly-typed in this situation.
It looks like the proper fix is to #define
MZ_COMPAT_VERSION appropriately to always use the pointer version of the function.
Updated by brad 9 months ago
Billiard26 wrote in #note-3:
Changing the last argument to
0
is a bit of a hacky fix, imo. Zero just happens to work for both versions of the function since C++ is so weakly-typed in this situation.It looks like the proper fix is to
#define
MZ_COMPAT_VERSION appropriately to always use the pointer version of the function.
Oh I'm definitely not trying to imply it is the proper and most appropriate fix. Just something to get it to build for now.
I filed the bug report to try to have a more appropriate fix.
Updated by Billiard26 8 months ago
- Status changed from New to Fixed
- Fixed in set to 5.0-21443