Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libffi ASM error(s) while building with MSVC 2013 #462

Open
Zueuk opened this issue Nov 18, 2021 · 8 comments
Open

libffi ASM error(s) while building with MSVC 2013 #462

Zueuk opened this issue Nov 18, 2021 · 8 comments

Comments

@Zueuk
Copy link

Zueuk commented Nov 18, 2021

"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
@Zueuk Zueuk changed the title libffi build error with MSVS2013 libffi ASM error(s) while building with MSVC 2013 Nov 19, 2021
@Zueuk
Copy link
Author

Zueuk commented Nov 19, 2021

Anyone tried to actually build with MSVC 2013, does it still work?

@danyeaw
Copy link
Member

danyeaw commented Nov 26, 2021

@Zueuk I have not, are you still getting an error if you use MSVC 2019 instead?

@Zueuk
Copy link
Author

Zueuk commented Nov 27, 2021

Everything is fine with 2017 and 2019

@danyeaw
Copy link
Member

danyeaw commented Nov 27, 2021

@nacho and @guruDanny67 maybe we should just drop support for MSVC 2013, and eventually add MSVC 2022. What do you think?

@Zueuk
Copy link
Author

Zueuk commented Nov 28, 2021

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.

@Zueuk
Copy link
Author

Zueuk commented Dec 3, 2021

Perhaps there is a way to use an older version of this library with MSVC 2013?

@danyeaw
Copy link
Member

danyeaw commented Jan 13, 2022

@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.

@Zueuk
Copy link
Author

Zueuk commented Jan 13, 2022

There was (is?) a remote possibility that our project will have to be built on MSVC 2013 for some legacy reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants