Joshua-Ashton / dxvk-native

D3D9/11 but it runs natively on Linux!
zlib License
404 stars 30 forks source link

fatal error: dxgi1_5.h: No such file or directory #2

Closed Arxcis closed 4 years ago

Arxcis commented 4 years ago

Hi, I am trying to build dxvk-native for the first time (Because I finally know what Meson is 🚀) . My issue is that that the dxgi1_5.h-header file is not found. See detailed output below.

I found a similar issue here https://github.com/doitsujin/dxvk/issues/1239. The answer given is to update mingw-w64 to version >= 6.0.

Is mingw-w64 still required to compile dxvk-native though?

Screenshot image

meson build --reconfigure

➜  dxvk-native git:(master) ✗ meson build --reconfigure
The Meson build system
Version: 0.54.0
Source dir: /home/jonas/git/github/dxvk-native
Build dir: /home/jonas/git/github/dxvk-native/build
Build type: native build
Project name: dxvk
Project version: v1.5.5
C compiler for the host machine: cc (gcc 9.2.1 "cc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008")
C linker for the host machine: cc ld.bfd 2.33
C++ compiler for the host machine: c++ (gcc 9.2.1 "c++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008")
C++ linker for the host machine: c++ ld.bfd 2.33
Host machine cpu family: x86_64
Host machine cpu: x86_64
Checking if "winelib check" compiles: NO (cached)
Library vulkan found: YES
Library SDL2 found: YES
Program echo found: YES (/usr/bin/echo)
Program glslangValidator found: YES (/home/jonas/bin/glslangValidator)
Dependency threads found: YES unknown (cached)
Dependency threads found: YES unknown (cached)
src/meson.build:14: WARNING: Ignoring D3D10... Not supported for DXVK native.
Build targets in project: 11

Found ninja-1.10.0 at /home/jonas/bin/ninja

ninja -C build

➜  dxvk-native git:(master) ✗ ninja -C build
ninja: Entering directory `build'
[1/238] Compiling C++ object 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.o'
FAILED: src/util/ed6d25d@@util@sta/com_com_guid.cpp.o 
c++ -Isrc/util/ed6d25d@@util@sta -Isrc/util -I../src/util -I../include -I../include/native -I../include/native/windows -I../include/native/directx -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -g -DNOMINMAX -DDXVK_NATIVE -DDXVK_WSI_SDL2 -DDXVK_PLATFORM_LINUX -fPIC -MD -MQ 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.o' -MF 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.o.d' -o 'src/util/ed6d25d@@util@sta/com_com_guid.cpp.o' -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:31:10: fatal error: dxgi1_5.h: No such file or directory
   31 | #include <dxgi1_5.h>
      |          ^~~~~~~~~~~
compilation terminated.
[2/238] Generating version.h with a custom command
fatal: No names found, cannot describe anything.
[8/238] Compiling C++ object 'src/spirv/e922df6@@spirv@sta/spirv_module.cpp.o'
ninja: build stopped: subcommand failed.
Joshua-Ashton commented 4 years ago

You'll need to put the MinGW headers for DirectX in include/native/directx

I need to re-evaluate the licenses on that to see if we can redistribute or not.

Arxcis commented 4 years ago

@Joshua-Ashton Thanks!

Here is what I ended up doing:

➜  brew install mingw-w64
 ...installing
➜  cd ~/Cellar/mingw-w64/7.0.0_2/toolchain-x86_64/x86_64-w64-mingw32/include/
➜  cp d3d*.h dxgi*.h ~/git/github/Joshua-Ashton/dxvk-native/include/native/directx/

Now ninja is successful 🎉

➜  ninja -C build
 ...ninjaing
[205/205] Linking target src/d3d9/libdxvk_d3d9.so

Definitely relevant to #1