protonscr

Compilation error native windows build using MSYS2 mingw64 toolchain

vkd3dclosed
HansKristian-Work/vkd3d-proton#1289 · opened 2022-11-11 by gitcchi · updated 2022-11-11 · 3 comments · github
Ggitcchi 2022-11-11 github

When compiling with mingw64 gcc I get the following error:

FAILED: libs/vkd3d/libvkd3d-proton.a.p/bundle.c.obj
"cc" "-Ilibs/vkd3d/libvkd3d-proton.a.p" "-Ilibs/vkd3d" "-I../libs/vkd3d" "-I../include/private" "-Iinclude" "-I../include" "-I../subprojects/Vulkan-Headers/include" "-I../subprojects/SPIRV-Headers/include" "-Ilibs/vkd3d-common/libvkd3d_common.a.p" "-I." "-fdiagnostics-color=always" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-Wextra" "-std=c11" "-O3" "-D_GNU_SOURCE" "-DPACKAGE_VERSION="2.7"" "-D_WIN32_WINNT=0x600" "-DVKD3D_BUILD_STANDALONE_D3D12" "-DVKD3D_NO_TRACE_MESSAGES" "-fvisibility=hidden" "-Wvla" "-Wno-format" "-Wno-missing-field-initializers" "-Wno-unused-parameter" "-Wdeclaration-after-statement" "-pthread" -MD -MQ libs/vkd3d/libvkd3d-proton.a.p/bundle.c.obj -MF "libs/vkd3d/libvkd3d-proton.a.p/bundle.c.obj.d" -o libs/vkd3d/libvkd3d-proton.a.p/bundle.c.obj "-c" ../libs/vkd3d/bundle.c
In file included from ../libs/vkd3d/vkd3d_private.h:33,
from ../libs/vkd3d/bundle.c:21:
./vkd3d_build.h:3:37: error: hexadecimal floating constants require an exponent
3 | static const uint64_t vkd3d_build = 0x2.7;
| ^~~~~

The build uses a standard configuration
meson --buildtype release --prefix /c/vkd3d build.64

For this I used this gcc
$ gcc --version
gcc.exe (Rev4, Built by MSYS2 project) 12.2.0

But the same thing happened with gcc 8.3.0 from Strawberry Perl

Mmbriar 2022-11-11 github

I think MSVC is the recommended way to build on windows, and also what's used in CI: https://github.com/HansKristian-Work/vkd3d-proton/blob/master/.github/workflows/test-build-windows.yml

HHansKristian-Work maintainer 2022-11-11 github

Git must be in PATH. We should probably detect this somehow in Meson rather than letting it derp out a default value like this.

Ggitcchi 2022-11-11 github

Ok thanks, both building with MSVC and MingW64 is working for me now.

Nothing extracted yet.