libffi ASM error(s) while building with MSVC 2013
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\ml.EXE" "/Fo" "src/x86_win64_intel_S.obj" "/c" "src/x86_win64_intel_S.i"
Assembling: src/x86_win64_intel_S.i
src/x86_win64_intel_S.i(965) : error A2071:initializer magnitude too large for specified size
src/x86_win64_intel_S.i(965) : error A2013:.MODEL must precede this directive
src/x86_win64_intel_S.i(975) : error A2071:initializer magnitude too large for specified size
src/x86_win64_intel_S.i(975) : error A2034:must be in segment block
src/x86_win64_intel_S.i(979) : error A2071:initializer magnitude too large for specified size
(...etc...)
subprocess.CalledProcessError: Command 'ninja install' returned non-zero exit status 1.
Error: libffi build failed
Anyone tried to actually build with MSVC 2013, does it still work?
@Zueuk I have not, are you still getting an error if you use MSVC 2019 instead?
Everything is fine with 2017 and 2019
@nacho and @guruDanny67 maybe we should just drop support for MSVC 2013, and eventually add MSVC 2022. What do you think?
I thought there is something wrong with my VS2013 install, so I redownloaded & reinstalled it from the "VS Community 2013 with update 5" ISO.
Did not get asm errors after that, there were a bunch of C errors in libtiff and fontconfig, fixable by #define inline __inline and #define snprintf _snprintf, but then
[1/207] Compiling C++ object src/harfbuzz.dll.p/hb-buffer-serialize.cc.obj
FAILED: src/harfbuzz.dll.p/hb-buffer-serialize.cc.obj
"cl" "-Isrc\harfbuzz.dll.p" "-Isrc" "-I..\src" "-I." "-I.." "-IC:/gtk-build/gtk/x64/release/bin/../include/freetype2" "-IC:/gtk-build/gtk/x64/release/bin/../include" "-IC:/gtk-build/gtk/x64/release/bin/../include/libpng16" "-IC:/gtk-build/gtk/x64/release/bin/../include/glib-2.0" "-IC:/gtk-build/gtk/x64/release/bin/../lib/glib-2.0/include" "/MD" "/nologo" "/showIncludes" "/W2" "/EHsc" "/GR-" "/O2" "/Zi" "/wd4018" "/wd4146" "/wd4244" "/wd4305" "/EHs-" "/EHc-" "-DHAVE_CONFIG_H" "-DHB_DLL_EXPORT" "/Fdsrc\harfbuzz.dll.p\hb-buffer-serialize.cc.pdb" /Fosrc/harfbuzz.dll.p/hb-buffer-serialize.cc.obj "/c" ../src/hb-buffer-serialize.cc
cl : Command line warning D9025 : overriding '/EHs' with '/EHs-'
cl : Command line warning D9025 : overriding '/EHc' with '/EHc-'
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(50) : error C2146: syntax error : missing ';' before identifier 'T'
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(50) : see reference to class template instantiation 'hb_integral_constant<T,v>' being compiled
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(50) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(90) : error C2146: syntax error : missing ';' before identifier 'T'
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(90) : error C2238: unexpected token(s) preceding ';'
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(100) : error C2143: syntax error : missing ';' before '<end Parse>'
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(100) : error C2988: unrecognizable template declaration/definition
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(100) : error C2059: syntax error : '<end Parse>'
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(101) : error C2143: syntax error : missing ';' before '}'
c:\gtk-build\build\x64\release\harfbuzz\src\hb-meta.hh(101) : error C2238: unexpected token(s) preceding ';'
All these lines have constexpr in there, and it seems to me that MSVC2013 even "with update 5" does not support it.
Perhaps there is a way to use an older version of this library with MSVC 2013?
@Zueuk Is there a reason why you need to build with a 9 year old version of MSVC? I am trying to figure out if there is a use case for this or we should drop support for these really old versions.
There was (is?) a remote possibility that our project will have to be built on MSVC 2013 for some legacy reasons.