protonscr

compiling error dxvk

dxvkclosed build
doitsujin/dxvk#1833 · opened 2020-11-24 by oliver1974 · updated 2021-06-22 · 8 comments · github
1 matching comments, n / p to jump
Ooliver1974 2020-11-24 github

Today I clone dxvk and try to compile it, but I get the error:
error: 'IDXGIFactory7' was not declared in this scope

Before that, I cloned dxvk on October 8th. I was able to compile these without any problems.

@terra:~/Daten/Programme/dxvk/dxvk> ./package-release.sh master ../dxvk_build_20201120 --no-package
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
The Meson build system
Version: 0.56.0
Source dir: /home/krueckel/Daten/Programme/dxvk/dxvk
Build dir: /home/krueckel/Daten/Programme/dxvk/dxvk_build_20201120/dxvk-master/build.64
Build type: cross build
Project name: dxvk
Project version: v1.7.2
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 9.2.0 "x86_64-w64-mingw32-gcc (SUSE Linux) 9.2.0")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.33.1
C++ compiler for the host machine: x86_64-w64-mingw32-g++ (gcc 9.2.0 "x86_64-w64-mingw32-g++ (SUSE Linux) 9.2.0")
C++ linker for the host machine: x86_64-w64-mingw32-g++ ld.bfd 2.33.1
C compiler for the build machine: ccache cc (gcc 10.2.1 "cc (SUSE Linux) 10.2.1 20201028 [revision a78cd759754c92cecbf235ac9b447dcdff6c6e2f]")
C linker for the build machine: cc ld.bfd 2.35.0.20200915-1
C++ compiler for the build machine: ccache c++ (gcc 10.2.1 "c++ (SUSE Linux) 10.2.1 20201028 [revision a78cd759754c92cecbf235ac9b447dcdff6c6e2f]")
C++ linker for the build machine: c++ ld.bfd 2.35.0.20200915-1
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Program x86_64-w64-mingw32-windres found: YES (/usr/bin/x86_64-w64-mingw32-windres)
Library vulkan-1 found: YES
Library d3d9 found: YES
Library d3d11 found: YES
Library dxgi found: YES
Library d3dcompiler_43 found: YES
Library d3dcompiler_47 found: YES
Program glslangValidator found: YES (/usr/bin/glslangValidator)
Run-time dependency threads found: YES
Dependency threads found: YES unknown (cached)
Build targets in project: 13

Found ninja-1.10.1 at /usr/bin/ninja
[5/265] Generating 'src/dxvk/libdxvk.a.p/dxvk_blit_frag_1d.h'.
../../../dxvk/src/dxvk/shaders/dxvk_blit_frag_1d.frag
..........................
..........................
[136/265] Compiling C++ object src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj
FAILED: src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj
x86_64-w64-mingw32-g++ -Isrc/dxgi/dxgi.dll.p -Isrc/dxgi -I../../../dxvk/src/dxgi -I../../../dxvk/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -O3 -DNOMINMAX -MD -MQ src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj -MF src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj.d -o src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj -c ../../../dxvk/src/dxgi/dxgi_main.cpp
In file included from ../../../dxvk/src/dxgi/dxgi_main.cpp:1:
../../../dxvk/src/dxgi/dxgi_factory.h:13:41: error: 'IDXGIFactory7' was not declared in this scope; did you mean 'IDXGIFactory1'?
13 | class DxgiFactory : public DxgiObject {
| ^~~~~~~~~~~~~
| IDXGIFactory1
../../../dxvk/src/dxgi/dxgi_factory.h:13:54: error: template argument 1 is invalid
13 | class DxgiFactory : public DxgiObject {
..........................
..........................
120 | UINT STDMETHODCALLTYPE GetCreationFlags() final;
| ^~~~~~~~~~~~~~~~
../../../dxvk/src/dxgi/dxgi_factory.h:122:31: error: 'HRESULT dxvk::DxgiFactory::CheckFeatureSupport(DXGI_FEATURE, void*, UINT)' marked 'final', but is not virtual
122 | HRESULT STDMETHODCALLTYPE CheckFeatureSupport(
| ^~~~~~~~~~~~~~~~~~~
[150/265] Compiling C++ object src/d3d11/d3d11.dll.p/d3d11_blend.cpp.obj
ninja: build stopped: subcommand failed.
@terra:~/Daten/Programme/dxvk/dxvk>

How can I fix it?

Os: openSUSE Tumbleweed

regards o.

KK0bin maintainer 2020-11-24 github

Your Mingw is too old.

Mingw-w64 compiler and headers (at least version 10.0)

Ddoitsujin maintainer 2020-11-25 github

MinGW 10 is required due to a recent change.

Ggasinvein 2020-11-25 github

Sorry for interference, but what's exactly MinGW 10? Does the "10" refer to GCC version? I'm a bit confused, because MinGW itself (runtime and headers) has latest version 8.0.0

Mmisyltoad 2020-11-25 github

Headers 8.0.0 should be fine, MinGW 10 refers to the GCC version (albeit a bit erroneously)

Ddoitsujin maintainer 2020-11-25 github

Ah, looks like I got confused by the mingw version mess myself because people who claimed to be using 9.0 were complaining about build issues as well.

Yeah, 8.0 is the latest and is what's needed.

Jjohncaling40 2021-01-09 github

Ah, looks like I got confused by the mingw version mess myself because people who claimed to be using 9.0 were complaining about build issues as well.

Yeah, 8.0 is the latest and is what's needed.

How do I install version 8 on pop/ubuntu 20.10? In the apt site, right now it only shows 8 for Ubuntu 21.04

AAlex-Hughes-94 2021-06-22 github

I installed version 8 of MinGW on ubuntu 20.04 with this link: https://launchpad.net/~noasakurajin/+archive/ubuntu/sid-ubuntu-ports

I definitely have version 8.0.0 installed:

sudo apt-get install mingw-w64
Reading package lists... Done
Building dependency tree
Reading state information... Done
mingw-w64 is already the newest version (8.0.0-0~202009181618~ubuntu20.04.1).

but I still get this error:

[146/272] Compiling C++ object src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj
FAILED: src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj
x86_64-w64-mingw32-g++ -Isrc/dxgi/dxgi.dll.p -Isrc/dxgi -I../../../../../../../dxvk/src/dxgi -I../../../../../../../dxvk/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -O3 -DNOMINMAX -msse3 -MD -MQ src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj -MF src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj.d -o src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj -c ../../../../../../../dxvk/src/dxgi/dxgi_main.cpp
In file included from ../../../../../../../dxvk/src/dxgi/dxgi_main.cpp:1:
../../../../../../../dxvk/src/dxgi/dxgi_factory.h:13:41: error: ‘IDXGIFactory7’ was not declared in this scope; did you mean ‘IDXGIFactory1’?
13 | class DxgiFactory : public DxgiObject {
| ^~~~~~~~~~~~~
| IDXGIFactory1
../../../../../../../dxvk/src/dxgi/dxgi_factory.h:13:54: error: template argument 1 is invalid
13 | class DxgiFactory : public DxgiObject {
| ^
../../../../../../../dxvk/src/dxgi/dxgi_factory.h:75:13: error: ‘DXGI_GPU_PREFERENCE’ has not been declared
75 | DXGI_GPU_PREFERENCE GpuPreference,
| ^~~~~~~~~~~~~~~~~~~
../../../../../../../dxvk/src/dxgi/dxgi_factory.h:20:31: error: ‘HRESULT dxvk::DxgiFactory::QueryInterface(const IID&, void**)’ marked ‘final’, but is not virtual
20 | HRESULT STDMETHODCALLTYPE QueryInterface(

etc...

Ggasinvein 2021-06-22 github

@Alex-Hughes-94 Make sure you also have packages mingw-w64-x86-64-dev and mingw-w64-common with version 8.0.0. Looks like the mingw-w64 package hard depends only on GCC, but not on mingw crt.

DLLs