https://gcc.gnu.org/gcc-13/porting_to.html
Header dependency changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.
The following headers are used less widely in libstdc++ and may need to be included explicitly when compiling with GCC 13:
<string> (for std::string, std::to_string, std::stoi etc.)<system_error> (for std::error_code, std::error_category, std::system_error).<cstdint> (for std::int8_t, std::int32_t etc.)<cstdio> (for std::printf, std::fopen etc.)<cstdlib> (for std::strtol, std::malloc etc.)
I should add that I cannot replicate these issues when using my standalone dxvk-mingw-git PKGBUILD which uses more aggressive compiler flags and a different set of c/cxx-std-flags.
However, I see a different issue there with only the 32-bit build when using LTO (the 64-bit build is fine) which I haven't seen before with the older mingw-toolchain and the same flags:
[285/288] Linking target src/d3d11/d3d11.dll
FAILED: src/d3d11/d3d11.dll
i686-w64-mingw32-g++ -o src/d3d11/d3d11.dll src/d3d11/d3d11.dll.p/version.o src/d3d11/d3d11.dll.p/.._dxgi_dxgi_format.cpp.obj src/d3d11/ d3d11.dll.p/d3d11_annotation.cpp.obj src/d3d11/d3d11.dll.p/d3d11_blend.cpp.obj src/d3d11/d3d11.dll.p/d3d11_buffer.cpp.obj src/d3d11/d3d11.dll.p /d3d11_class_linkage.cpp.obj src/d3d11/d3d11.dll.p/d3d11_cmdlist.cpp.obj src/d3d11/d3d11.dll.p/d3d11_context.cpp.obj src/d3d11/d3d11.dll.p/d3d11_context_def.cpp. obj src/d3d11/d3d11.dll.p/d3d11_context_ext.cpp.obj src/d3d11/d3d11.dll.p/d3d11_context_imm.cpp.obj src/d3d11/d3d11.dll.p/d3d11_cuda.cpp.obj src/d3d11/ d3d11.dll.p/d3d11_depth_stencil.cpp.obj src/d3d11/d3d11.dll.p/d3d11_device.cpp.obj src/d3d11/d3d11.dll.p/d3d11_enums.cpp.obj src/d3d11/d3d11.dll.p /d3d11_features.cpp.obj src/d3d11/d3d11.dll.p/d3d11_fence.cpp.obj src/d3d11/d3d11.dll.p/d3d11_gdi.cpp.obj src/d3d11/d3d11.dll.p/d3d11_initializer.cpp. obj src/d3d11/d3d11.dll.p/d3d11_input_layout.cpp.obj src/d3d11/d3d11.dll.p/d3d11_interop.cpp.obj src/d3d11/d3d11.dll.p/d3d11_main.cpp.obj src/d3d11/ d3d11.dll.p/d3d11_on_12.cpp.obj src/d3d11/d3d11.dll.p/d3d11_options.cpp.obj src/d3d11/d3d11.dll.p/d3d11_query.cpp.obj src/d3d11/d3d11.dll.p /d3d11_rasterizer.cpp.obj src/d3d11/d3d11.dll.p/d3d11_resource.cpp.obj src/d3d11/d3d11.dll.p/d3d11_sampler.cpp.obj src/d3d11/d3d11.dll.p/d3d11_shader.cpp. obj src/d3d11/d3d11.dll.p/d3d11_state.cpp.obj src/d3d11/d3d11.dll.p/d3d11_state_object.cpp.obj src/d3d11/d3d11.dll.p/d3d11_swapchain.cpp.obj src/d3d11/ d3d11.dll.p/d3d11_texture.cpp.obj src/d3d11/d3d11.dll.p/d3d11_util.cpp.obj src/d3d11/d3d11.dll.p/d3d11_video.cpp.obj src/d3d11/d3d11.dll.p /d3d11_view_dsv.cpp.obj src/d3d11/d3d11.dll.p/d3d11_view_rtv.cpp.obj src/d3d11/d3d11.dll.p/d3d11_view_srv.cpp.obj src/d3d11/d3d11.dll.p/d3d11_view_uav. cpp. obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_blend.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_buffer.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_ depth_stencil.cpp .obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_device.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_input_layout.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_ d3d10_multithread. cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_query.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_rasterizer.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d 3d10_sampler .cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_texture.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_util.cpp.obj src/d3d11/d3d11.dll.p/.. _d3d10_d3d10_view_dsv.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_view_rtv.cpp.obj src/d3d11/d3d11.dll.p/.._d3d10_d3d10_view_srv.cpp.obj -Wl,-- allow-shlib-undefined - Wl,-O1 -shared ../../dxvk/src/d3d11/d3d11.def -Wl,--start-group -Wl,--out-implib=src/d3d11/d3d11.dll.a -static - static-libgcc -static-libstdc++ -Wl,--file-alignment=4096 -Wl,--enable-stdcall-fixup -Wl,--add-stdcall-alias -Wl,-O3,--as-needed,- Bsymbolic-functions,-flto=auto -march=native -mtune=native -maes src/dxgi/dxgi.dll.a src/dxbc/libdxbc.a src/dxvk/libdxvk.a src/util/libutil.a src/ spirv/libspirv.a src/wsi/libwsi.a subprojects/libdisplay-info/libdisplay-info.a src/vulkan/libvkcommon.a -pthread -lm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group
../../dxvk/src/d3d11/d3d11_buffer.cpp: In "CheckViewCompatibility" member function:
../../dxvk/src/d3d11/d3d11_buffer.cpp:206:3: Error: No register found to swap out
206 | }
| ^
../../dxvk/src/d3d11/d3d11_buffer.cpp:206:3: error: this is the command:
(insn 202 221 222 17 (parallel [
(set (reg:DI 154 [141])
(and:DI (not:DI (reg:DI 153))
(reg/v:DI 152 [orig:96 features ] [96])))
(clobber (reg:CC 17 flags))
]) "../../dxvk/src/d3d11/d3d11_buffer.cpp":294:40 467 {*andndi3_doubleword_bmi}
(expr_list:REG_DEAD (reg:DI 153)
(expr_list:REG_DEAD (reg/v:DI 152 [orig:96 features ] [96])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))))
That last one is a GCC internal compiler error (ICE). Update your GCC or report it to GCC maintainers.
@turol Yeah, probably a compiler bug. That was already with a very recent mingw-w64-gcc snapshot from May 5th.
Further experimentation shows that the newest proton-ge-custom from the AUR compiles just fine with GCC13/mingw-11. The issue I was seeing seems to be proton-cachyos specific, maybe due to an older committ they are targeting.
Compiling dxvk (b08665c8082f44f6243d00351896edab6c41eb6e) via the proton-cachyos PKGBUILD with GCC 13.1.1 and the corresponding new mingw-11 toolchain (which is not yet released on Arch) reveals the following build issues:
also:
There might be more lurking underneath. This is on the latest CachyOS with gcc-Version 13.1.1 20230505 (GCC). Another CachyOS user who used the older GCC 12.2 mingw-toolchain had no problems compiling that package though. I guess a breaking change in behavior in GCC 13 could be the culprit here (or the older dxvk revision used in that package).