fhanau / Efficient-Compression-Tool

Fast and effective C++ file optimizer
Apache License 2.0
596 stars 41 forks source link

Building on Visual Studio 2022 broken #99

Closed Dola-Shuvi closed 2 years ago

Dola-Shuvi commented 2 years ago

Version 0.9.1 was possible to compile very smoothly using Visual Studio. Release 0.9.2 is basically impossible to compile due to the sheer number of errors that occur in the build process.

CMake ..\src ``` -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19044. -- The CXX compiler identification is MSVC 19.33.31629.0 -- The C compiler identification is MSVC 19.33.31629.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE -- The ASM compiler identification is MSVC -- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe -- Performing Test HAVE_LD_VERSION_SCRIPT -- Performing Test HAVE_LD_VERSION_SCRIPT - Failed -- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT -- Performing Test HAVE_SOLARIS_LD_VERSION_SCRIPT - Failed CMake Warning (dev) at mozjpeg/CMakeLists.txt:12 (project): Policy CMP0048 is not set: project() command manages VERSION variables. Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy command to set the policy and suppress this warning. The following variable(s) would be set to empty: PROJECT_VERSION PROJECT_VERSION_MAJOR PROJECT_VERSION_MINOR PROJECT_VERSION_PATCH This warning is for project developers. Use -Wno-dev to suppress it. -- CMAKE_BUILD_TYPE = Release -- VERSION = 4.1.1, BUILD = 20220815 -- 64-bit build (x86_64) -- CMAKE_INSTALL_PREFIX = C:/Program Files (x86)/ect CMake Warning (dev) at mozjpeg/cmakescripts/GNUInstallDirs.cmake:175 (elseif): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning. Quoted variables like "var" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): mozjpeg/cmakescripts/GNUInstallDirs.cmake:233 (GNUInstallDirs_set_install_dir) mozjpeg/CMakeLists.txt:151 (include) This warning is for project developers. Use -Wno-dev to suppress it. -- CMAKE_INSTALL_BINDIR = bin (C:/Program Files (x86)/ect/bin) -- CMAKE_INSTALL_DATAROOTDIR = share (C:/Program Files (x86)/ect/share) -- CMAKE_INSTALL_DOCDIR = share/doc/ect (C:/Program Files (x86)/ect/share/doc/ect) -- CMAKE_INSTALL_INCLUDEDIR = include (C:/Program Files (x86)/ect/include) -- CMAKE_INSTALL_LIBDIR = lib (C:/Program Files (x86)/ect/lib) -- Shared libraries disabled (ENABLE_SHARED = 0) -- Static libraries enabled (ENABLE_STATIC = 1) -- 12-bit JPEG support disabled (WITH_12BIT = 0) -- Arithmetic decoding support disabled (WITH_ARITH_DEC = 0) -- Arithmetic encoding support disabled (WITH_ARITH_ENC = 0) -- TurboJPEG API library disabled (WITH_TURBOJPEG = 0) -- TurboJPEG Java wrapper disabled (WITH_JAVA = 0) -- In-memory source/destination managers enabled (WITH_MEM_SRCDST = 1) -- Emulating libjpeg API/ABI v6.2 (WITH_JPEG7 = 0, WITH_JPEG8 = 0) -- libjpeg API shared library version = 62.3.0 -- Compiler flags = /DWIN32 /D_WINDOWS /W3 -Wall -Wno-sign-compare -Wno-unused -Wno-unused-parameter /MT /O2 /Ob2 /DNDEBUG -- Linker flags = /machine:x64 /INCREMENTAL:NO -- Looking for sys/types.h -- Looking for sys/types.h - not found -- Looking for stdint.h -- Looking for stdint.h - not found -- Looking for stddef.h -- Looking for stddef.h - not found -- Check size of size_t -- Check size of size_t - failed -- Check size of unsigned long -- Check size of unsigned long - failed -- Looking for include file intrin.h -- Looking for include file intrin.h - not found -- Performing Test INLINE_WORKS -- Performing Test INLINE_WORKS - Failed CMake Error at mozjpeg/CMakeLists.txt:464 (message): Could not determine how to inline functions. ```
CMakeError.log ``` Determining if the include file pthread.h exists failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_2b5c3.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_2b5c3.dir\Debug\\" /Fd"cmTC_2b5c3.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_2b5c3.vcxproj] Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '--version' cl : Command line error D8003 : missing source filename Checking whether the ASM compiler is Clang using "--version" did not match "(clang version)": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '--version' cl : Command line error D8003 : missing source filename Checking whether the ASM compiler is AppleClang using "--version" did not match "(Apple LLVM version)": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '--version' cl : Command line error D8003 : missing source filename Checking whether the ASM compiler is ARMClang using "--version" did not match "armclang": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '--version' cl : Command line error D8003 : missing source filename Checking whether the ASM compiler is HP using "-V" did not match "HP C": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line error D8004 : '/V' requires an argument Checking whether the ASM compiler is Intel using "--version" did not match "(ICC)": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '--version' cl : Command line error D8003 : missing source filename Checking whether the ASM compiler is IntelLLVM using "--version" did not match "(Intel[^ ]+oneAPI)": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '--version' cl : Command line error D8003 : missing source filename Checking whether the ASM compiler is SunPro using "-V" did not match "Sun C": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line error D8004 : '/V' requires an argument Checking whether the ASM compiler is XL using "-qversion" did not match "XL C": Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '-qversion' cl : Command line error D8003 : missing source filename Performing C SOURCE FILE Test HAVE_LD_VERSION_SCRIPT failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_69440.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D HAVE_LD_VERSION_SCRIPT /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_69440.dir\Debug\\" /Fd"cmTC_69440.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-null-pointer-subtraction "-Wl,--version-script='C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/optipng/libpng/conftest.map'" "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\src.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_69440.vcxproj] Source file was: void sym(void) {} void sym2(void) {} int main(void) {return 0;} Performing C SOURCE FILE Test HAVE_SOLARIS_LD_VERSION_SCRIPT failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_6fb84.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D HAVE_SOLARIS_LD_VERSION_SCRIPT /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_6fb84.dir\Debug\\" /Fd"cmTC_6fb84.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-null-pointer-subtraction -Wl,-M -Wl,C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/optipng/libpng/conftest.map "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\src.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_6fb84.vcxproj] Source file was: void sym(void) {} void sym2(void) {} int main(void) {return 0;} Determining if the include file sys/types.h exists failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_52aa5.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_52aa5.dir\Debug\\" /Fd"cmTC_52aa5.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_52aa5.vcxproj] Determining if the include file stdint.h exists failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_81769.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_81769.dir\Debug\\" /Fd"cmTC_81769.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_81769.vcxproj] Determining if the include file stddef.h exists failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_3d298.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_3d298.dir\Debug\\" /Fd"cmTC_3d298.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_3d298.vcxproj] Determining size of size_t failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_b5385.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_b5385.dir\Debug\\" /Fd"cmTC_b5385.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CheckTypeSize\SIZE_T.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_b5385.vcxproj] C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CheckTypeSize/SIZE_T.c: #undef KEY #if defined(__i386) # define KEY '_','_','i','3','8','6' #elif defined(__x86_64) # define KEY '_','_','x','8','6','_','6','4' #elif defined(__PPC64__) # define KEY '_','_','P','P','C','6','4','_','_' #elif defined(__ppc64__) # define KEY '_','_','p','p','c','6','4','_','_' #elif defined(__PPC__) # define KEY '_','_','P','P','C','_','_' #elif defined(__ppc__) # define KEY '_','_','p','p','c','_','_' #elif defined(__aarch64__) # define KEY '_','_','a','a','r','c','h','6','4','_','_' #elif defined(__ARM_ARCH_7A__) # define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_' #elif defined(__ARM_ARCH_7S__) # define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_' #endif #define SIZE (sizeof(size_t)) static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']', #ifdef KEY ' ','k','e','y','[', KEY, ']', #endif '\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_size[argc]; (void)argv; return require; } Determining size of unsigned long failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_f9e2f.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_f9e2f.dir\Debug\\" /Fd"cmTC_f9e2f.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CheckTypeSize\UNSIGNED_LONG.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_f9e2f.vcxproj] C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CheckTypeSize/UNSIGNED_LONG.c: #undef KEY #if defined(__i386) # define KEY '_','_','i','3','8','6' #elif defined(__x86_64) # define KEY '_','_','x','8','6','_','6','4' #elif defined(__PPC64__) # define KEY '_','_','P','P','C','6','4','_','_' #elif defined(__ppc64__) # define KEY '_','_','p','p','c','6','4','_','_' #elif defined(__PPC__) # define KEY '_','_','P','P','C','_','_' #elif defined(__ppc__) # define KEY '_','_','p','p','c','_','_' #elif defined(__aarch64__) # define KEY '_','_','a','a','r','c','h','6','4','_','_' #elif defined(__ARM_ARCH_7A__) # define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_' #elif defined(__ARM_ARCH_7S__) # define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_' #endif #define SIZE (sizeof(unsigned long)) static char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[', ('0' + ((SIZE / 10000)%10)), ('0' + ((SIZE / 1000)%10)), ('0' + ((SIZE / 100)%10)), ('0' + ((SIZE / 10)%10)), ('0' + (SIZE % 10)), ']', #ifdef KEY ' ','k','e','y','[', KEY, ']', #endif '\0'}; #ifdef __CLASSIC_C__ int main(argc, argv) int argc; char *argv[]; #else int main(int argc, char *argv[]) #endif { int require = 0; require += info_size[argc]; (void)argv; return require; } Determining if files intrin.h exist failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_e7259.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_e7259.dir\Debug\\" /Fd"cmTC_e7259.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CheckIncludeFiles\HAVE_INTRIN_H.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_e7259.vcxproj] Source: /* */ #include int main(void){return 0;} Performing C SOURCE FILE Test INLINE_WORKS failed with the following output: Change Dir: C:/Users/xxxxx/source/repos/Efficient-Compression-Tool-master/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_16422.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:m && MSBuild version 17.3.0+f67e3d35e for .NET Framework Microsoft (R) C/C++ Optimizing Compiler Version 19.33.31629 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /Zi /Wall /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D INLINE_WORKS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_16422.dir\Debug\\" /Fd"cmTC_16422.dir\Debug\vc143.pdb" /external:W4 /Gd /TC /errorReport:queue -Wno-sign-compare -Wno-unused -Wno-unused-parameter "C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\src.c" cl : command line error D8021: invalid numeric argument '/Wno-sign-compare' [C:\Users\xxxxx\source\repos\Efficient-Compression-Tool-master\build\CMakeFiles\CMakeTmp\cmTC_16422.vcxproj] Source file was: __forceinline static int foo(void) { return 0; } int main(void) { return foo(); } ```

As you can see from the logs, the switches used to supress warnings cause the build to fail. Once those are removed configuring finishes properly. I have pinpointed this issue to commit 5f654b0b9d20ae13240d8da5fa2a2ca6dcd232f2. Building after this causes a lot of errors in ZLib. I have tracked these down to commit 22f937c653c40abb8579a6feba5c2ce8f1295f8f.

Sadly the CMake --build . output is too large to paste here so it is attached as a file. cmake build.log

I'm not sure how you managed to build a Win64 release under these conditions but it would be amazing if these issues were fixed in the future.

krishty commented 2 years ago

100 has the required CMake fixes.

@fhanau the fix is not invasive, but please check anyway that I didn’t break any Clang/GCC/MinGW settings! I only have MSVC for testing here.

I'm not sure how you managed to build a Win64 release under these conditions

With MinGW instead of Visual Studio, I presume.

Dola-Shuvi commented 2 years ago

Can confirm that #100 fixes the build process for VS. Building with GCC seems fine aswell.

fhanau commented 2 years ago

I merged #100, thank you.