Joshua-Ashton / d9vk

A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]
https://github.com/doitsujin/dxvk
zlib License
832 stars 42 forks source link

D9VK does not compile on Fedora 30 #96

Closed Venemo closed 5 years ago

Venemo commented 5 years ago

I'm running Fedora 30, I installed wine-devel and all other dependencies, but I get an error about a missing header file:

fatal error: dxgi1_4.h: No such file or directory

However the file installed as part of wine-devel:

[Timur@timur-xps d9vk]$ find /usr/include -name dxgi1_4.h
/usr/include/wine/windows/dxgi1_4.h

Either the header file is located at the wrong place on my system, or the include paths are set up incorrectly.

Full build log:

[Timur@timur-xps d9vk]$ mkdir build
[Timur@timur-xps d9vk]$ ./package-release.sh master build --no-package
The Meson build system
Version: 0.50.1
Source dir: /home/Timur/Downloads/stuff/d9vk
Build dir: /home/Timur/Downloads/stuff/d9vk/build/dxvk-master/build.64
Build type: cross build
Project name: dxvk
Project version: v1.1.1
Native C compiler: cc (gcc 9.0.1 "cc (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10)")
Cross C compiler: x86_64-w64-mingw32-gcc (gcc 8.3.0)
Native C++ compiler: c++ (gcc 9.0.1 "c++ (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10)")
Cross C++ compiler: x86_64-w64-mingw32-g++ (gcc 8.3.0)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Build machine cpu family: x86_64
Build machine cpu: x86_64
Checking if "winelib check" compiles: NO
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)
Cross dependency threads found: YES 
Dependency threads found: YES (cached)
Build targets in project: 13
Found ninja-1.9.0 at /usr/bin/ninja
[1/248] Generating version.h with a custom command.
fatal: not a git repository (or any of the parent directories): .git
[5/248] Compiling C++ object 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.obj'.
FAILED: src/util/ed6d25d@@util@sta/com_com_guid.cpp.obj 
x86_64-w64-mingw32-g++ -Isrc/util/ed6d25d@@util@sta -Isrc/util -I../../../src/util -I../../.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O3 -DNOMINMAX -MD -MQ 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.obj' -MF 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.obj.d' -o 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.obj' -c ../../../src/util/com/com_guid.cpp
In file included from ../../../src/util/com/../../d3d11/../dxgi/dxgi_format.h:3,
                 from ../../../src/util/com/../../d3d11/../dxgi/dxgi_interfaces.h:5,
                 from ../../../src/util/com/../../d3d11/d3d11_interfaces.h:3,
                 from ../../../src/util/com/com_guid.cpp:3:
../../../src/util/com/../../d3d11/../dxgi/dxgi_include.h:28:10: fatal error: dxgi1_4.h: No such file or directory
 #include <dxgi1_4.h>
          ^~~~~~~~~~~
compilation terminated.
[14/248] Compiling C++ object 'src/util/ed6d25d@@util@sta/config_config.cpp.obj'.
ninja: build stopped: subcommand failed.
[Timur@timur-xps d9vk]$ 
loathingKernel commented 5 years ago

Take a look at the log you posted. You are using the mingw compiler and you are searching for the header provided by wine. You should look into the documentation more closely. You need to specify the crossfile intended for wine.

K0bin commented 5 years ago

Where is it looking for Wine headers? Looks more like his MinGW is outdated.

loathingKernel commented 5 years ago

OP commented that used find to look for dxgi1_4.h. His mingw is based in gcc 8.3.0 based on the log. He is lacking the mingw headers though.

Venemo commented 5 years ago

Thanks for the quick reply. It is not evident to me from the log what is missing, otherwise I would not have opened this issue. Also, which documentation should I look at? I read "Building DLLs - the simple way".

In other words, which devel packages do I need? Thanks again, and sorry if this is trivial to you.

Venemo commented 5 years ago

Also, the documentation is quite confusing, it looks like a carbon copy of the DXVK documentation (in some places not even the project name is replaced).

loathingKernel commented 5 years ago

From the log you posted you can see that the crosscompiler in use is mingw:

Native C compiler: cc (gcc 9.0.1 "cc (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10)") Cross C compiler: x86_64-w64-mingw32-gcc (gcc 8.3.0) Native C++ compiler: c++ (gcc 9.0.1 "c++ (GCC) 9.0.1 20190312 (Red Hat 9.0.1-0.10)") Cross C++ compiler: x86_64-w64-mingw32-g++ (gcc 8.3.0)

You mention that you have installed wine-devel, but you have not specified the --winelib option as mentioned in the documentation.

[Timur@timur-xps d9vk]$ ./package-release.sh master build --no-package

A winelib build can be created by adding the --winelib argument.

So, you have two choices, you can either build the winelib version, in which case you have to specify it in your command line as stated in the README or you can build it using the mingw compiler and you have to satisfy the header requirements by installing the relevant package from your distribution. The name of said package can vary between distributions and you have to find out how it is named for your distro.

Joshua-Ashton commented 5 years ago

Not my issue. Update MinGW.

Venemo commented 5 years ago

Thanks @loathingKernel yes --winelib was the answer.