libwow64fex.dll FTBS with llvm-mingw Used toolchain: [llvm-mingw-20240518-ucrt-ubuntu-20.04-aarch64](https://github.com/mstorsjo/llvm-mingw/releases/tag/20240518) How I tried to build: ``` mkdir build_pe cd build_pe export PATH=/path/to/llvm-mingw/bin:$PATH cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain_mingw.cmake -DENABLE_JEMALLOC=0 -DENABLE_JEMALLOC_GLIBC_ALLOC=0 -DMINGW_TRIPLE=aarch64-w64-mingw32 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=False -DENABLE_ASSERTIONS=False .. make -j$(nproc) wow64fex ``` Problems: > /path/to/fex/Source/Windows/Common/CRT/String.cpp:169:21: error: redefinition of '_sscanf_l' > 169 | DLLEXPORT_FUNC(int, _sscanf_l, (const char* buffer, const char* format, _locale_t locale, ...)) { > | ^ > /path/to/llvm-mingw-20240518-ucrt-ubuntu-20.04-aarch64/aarch64-w64-mingw32/include/sec_api/stdio_s.h:160:27: note: previous definition is here > 160 | __mingw_ovr int __cdecl _sscanf_l(const char *_Src, const char *_Format, _locale_t _Locale, ...) > | ^ > /path/to/fex/Source/Windows/Common/CRT/String.cpp:177:39: error: functions that differ only in their return type cannot be overloaded > 177 | DLLEXPORT_FUNC(const unsigned short*, __pctype_func, (void)) { > | ~~~~~~~~~~~~~~~ ^ > /path/to/fex/Source/Windows/Common/CRT/../Priv.h:62:7: note: expanded from macro 'DLLEXPORT_FUNC' > 62 | Ret Name Args; \ > | ~~~ ^ > /path/to/llvm-mingw-20240518-ucrt-ubuntu-20.04-aarch64/aarch64-w64-mingw32/include/ctype.h:29:27: note: previous declaration is here > 29 | _CRTIMP unsigned short* __pctype_func(void); > | ~~~~~~~~~~~~~~~ ^ > /path/to/fex/Source/Windows/Common/CRT/String.cpp:177:1: error: cannot initialize a variable of type 'const unsigned short *(*)()' with an lvalue of type 'unsigned short *()': different return type ('const unsigned short *' vs 'unsigned short *') > 177 | DLLEXPORT_FUNC(const unsigned short*, __pctype_func, (void)) { > | ^ ~~~~~~~~~~~~~ > /path/to/fex/Source/Windows/Common/CRT/../Priv.h:63:8: note: expanded from macro 'DLLEXPORT_FUNC' > 63 | Ret(*__imp_##Name) Args = Name; \ > | ^ ~~~~ > :199:1: note: expanded from here > 199 | __imp___pctype_func > | ^ ... and > > /path/to/fex/Source/Windows/Common/CRT/IO.cpp:281:5: error: redefinition of 'fseeko64' > 281 | int fseeko64(FILE* File, _off64_t Offset, int Origin) { > | ^ > /path/to/llvm-mingw-20240518-ucrt-ubuntu-20.04-aarch64/aarch64-w64-mingw32/include/stdio.h:667:19: note: previous definition is here > 667 | __mingw_ovr int fseeko64(FILE *_File, _off64_t _Offset, int _Origin) { > | ^ > /path/to/fex/Source/Windows/Common/CRT/IO.cpp:286:5: error: redefinition of 'fseeko' > 286 | int fseeko(FILE* File, _off_t Offset, int Origin) { > | ^ > /path/to/llvm-mingw-20240518-ucrt-ubuntu-20.04-aarch64/aarch64-w64-mingw32/include/stdio.h:664:19: note: previous definition is here > 664 | __mingw_ovr int fseeko(FILE *_File, _off_t _Offset, int _Origin) { > | ^ > /path/to/fex/Source/Windows/Common/CRT/IO.cpp:294:10: error: redefinition of 'ftello64' > 294 | _off64_t ftello64(FILE* File) { > | ^ > /path/to/llvm-mingw-20240518-ucrt-ubuntu-20.04-aarch64/aarch64-w64-mingw32/include/stdio.h:673:24: note: previous definition is here > 673 | __mingw_ovr _off64_t ftello64(FILE *_File) { > | ^ > /path/to/fex/Source/Windows/Common/CRT/IO.cpp:300:8: error: redefinition of 'ftello' > 300 | _off_t ftello(FILE* File) { > | ^ > /path/to/llvm-mingw-20240518-ucrt-ubuntu-20.04-aarch64/aarch64-w64-mingw32/include/stdio.h:670:22: note: previous definition is here > 670 | __mingw_ovr _off_t ftello(FILE *_File) { > | ^ > 4 errors generated. >