I tried to build dxvk, i have installed all dependencies, during compiling it failes, here is the output:
chriundcla@chriundcla-K53SV:~/Downloads/dxvk/dxvk-master/build.w64$ ninja
[0/1] Regenerating build files.
The Meson build system
Version: 0.42.1
Source dir: /home/chriundcla/Downloads/dxvk/dxvk-master
Build dir: /home/chriundcla/Downloads/dxvk/dxvk-master/build.w64
Build type: cross build
Project name: dxvk
Native C compiler: cc (gcc 7.2.0)
Cross C compiler: /usr/bin/x86_64-w64-mingw32-gcc (gcc 6.3.0)
Native C++ compiler: c++ (gcc 7.2.0)
Cross C++ compiler: /usr/bin/x86_64-w64-mingw32-g++ (gcc 6.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
Library vulkan-1 found: YES
Library d3d11 found: YES
Library dxgi found: YES
Library d3dcompiler_47 found: YES
Program glslangValidator found: YES (/home/chriundcla/Downloads/glslang/bin/glslangValidator)
Build targets in project: 12
[3/111] Compiling C++ object 'src/util/util@sta/log_log_debug.cpp.obj'.
FAILED: src/util/util@sta/log_log_debug.cpp.obj
/usr/bin/x86_64-w64-mingw32-g++ -Og -gstabs -Isrc/util/util@sta -Isrc/util -I../src/util -I.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O0 -g -MMD -MQ 'src/util/util@sta/log_log_debug.cpp.obj' -MF 'src/util/util@sta/log_log_debug.cpp.obj.d' -o 'src/util/util@sta/log_log_debug.cpp.obj' -c ../src/util/log/log_debug.cpp
In file included from ../src/util/log/log_debug.h:5:0,
from ../src/util/log/log_debug.cpp:1:
../src/util/log/log.h:43:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^~~~~
[4/111] Compiling C++ object 'src/util/util@sta/log_log.cpp.obj'.
FAILED: src/util/util@sta/log_log.cpp.obj
/usr/bin/x86_64-w64-mingw32-g++ -Og -gstabs -Isrc/util/util@sta -Isrc/util -I../src/util -I.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O0 -g -MMD -MQ 'src/util/util@sta/log_log.cpp.obj' -MF 'src/util/util@sta/log_log.cpp.obj.d' -o 'src/util/util@sta/log_log.cpp.obj' -c ../src/util/log/log.cpp
In file included from ../src/util/log/log.cpp:1:0:
../src/util/log/log.h:43:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^
../src/util/log/log.cpp: In member function ‘void dxvk::Logger::log(dxvk::LogLevel, const string&)’:
../src/util/log/log.cpp:42:23: error: ‘mutex’ is not a member of ‘std’
std::lock_guard
^~~
../src/util/log/log.cpp:42:33: error: template argument 1 is invalid
std::lock_guard
^
../src/util/log/log.cpp:42:40: error: ‘m_mutex’ was not declared in this scope
std::lock_guard
^~~
../src/util/log/log.cpp:42:35: warning: unused variable ‘lock’ [-Wunused-variable]
std::lock_guard
^~~~
[5/111] Compiling C++ object 'src/spirv/spirv@sta/spirv_code_buffer.cpp.obj'.
FAILED: src/spirv/spirv@sta/spirv_code_buffer.cpp.obj
/usr/bin/x86_64-w64-mingw32-g++ -Og -gstabs -Isrc/spirv/spirv@sta -Isrc/spirv -I../src/spirv -I.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O0 -g -MMD -MQ 'src/spirv/spirv@sta/spirv_code_buffer.cpp.obj' -MF 'src/spirv/spirv@sta/spirv_code_buffer.cpp.obj.d' -o 'src/spirv/spirv@sta/spirv_code_buffer.cpp.obj' -c ../src/spirv/spirv_code_buffer.cpp
In file included from ../src/spirv/spirv_include.h:3:0,
from ../src/spirv/spirv_instruction.h:6,
from ../src/spirv/spirv_code_buffer.h:8,
from ../src/spirv/spirv_code_buffer.cpp:4:
../src/spirv/../util/log/log.h:43:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^
[8/111] Compiling C++ object 'src/util/util@sta/com_com_guid.cpp.obj'.
FAILED: src/util/util@sta/com_com_guid.cpp.obj
/usr/bin/x86_64-w64-mingw32-g++ -Og -gstabs -Isrc/util/util@sta -Isrc/util -I../src/util -I.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O0 -g -MMD -MQ 'src/util/util@sta/com_com_guid.cpp.obj' -MF 'src/util/util@sta/com_com_guid.cpp.obj.d' -o 'src/util/util@sta/com_com_guid.cpp.obj' -c ../src/util/com/com_guid.cpp
In file included from ../src/util/com/../../d3d11/../dxgi/dxgi_include.h:9:0,
from ../src/util/com/../../d3d11/d3d11_include.h:3,
from ../src/util/com/../../d3d11/d3d11_interfaces.h:3,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxgi/../util/log/log.h:43:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^~~~~
In file included from ../src/util/com/../../d3d11/../dxvk/dxvk_buffer_res.h:4:0,
from ../src/util/com/../../d3d11/../dxvk/dxvk_buffer.h:3,
from ../src/util/com/../../d3d11/../dxvk/dxvk_device.h:4,
from ../src/util/com/../../d3d11/d3d11_interfaces.h:7,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxvk/dxvk_memory.h:182:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^
In file included from ../src/util/com/../../d3d11/../dxvk/dxvk_framebuffer.h:4:0,
from ../src/util/com/../../d3d11/../dxvk/dxvk_constant_state.h:4,
from ../src/util/com/../../d3d11/../dxvk/dxvk_device.h:6,
from ../src/util/com/../../d3d11/d3d11_interfaces.h:7,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxvk/dxvk_renderpass.h:169:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^~~~~
In file included from ../src/util/com/../../d3d11/../dxvk/dxvk_context_state.h:7:0,
from ../src/util/com/../../d3d11/../dxvk/dxvk_context.h:6,
from ../src/util/com/../../d3d11/../dxvk/dxvk_device.h:7,
from ../src/util/com/../../d3d11/d3d11_interfaces.h:7,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxvk/dxvk_graphics.h:147:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^
In file included from ../src/util/com/../../d3d11/../dxvk/dxvk_device.h:14:0,
from ../src/util/com/../../d3d11/d3d11_interfaces.h:7,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxvk/dxvk_pipemanager.h:103:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^~~~~
In file included from ../src/util/com/../../d3d11/../dxvk/dxvk_device.h:15:0,
from ../src/util/com/../../d3d11/d3d11_interfaces.h:7,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxvk/dxvk_queue.h:42:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^
../src/util/com/../../d3d11/../dxvk/dxvk_queue.h:43:10: error: ‘condition_variable’ in namespace ‘std’ does not name a type
std::condition_variable m_condOnAdd;
^~~~~~
../src/util/com/../../d3d11/../dxvk/dxvk_queue.h:44:10: error: ‘condition_variable’ in namespace ‘std’ does not name a type
std::condition_variable m_condOnTake;
^~~~~~
../src/util/com/../../d3d11/../dxvk/dxvk_queue.h:46:10: error: ‘thread’ in namespace ‘std’ does not name a type
std::thread m_thread;
^~
In file included from ../src/util/com/../../d3d11/../dxvk/dxvk_device.h:16:0,
from ../src/util/com/../../d3d11/d3d11_interfaces.h:7,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h:57:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_mutex;
^~~
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h: In member function ‘dxvk::Rc
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h:32:23: error: ‘mutex’ is not a member of ‘std’
std::lock_guard
^
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h:32:33: error: template argument 1 is invalid
std::lock_guard
^
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h:32:40: error: ‘m_mutex’ was not declared in this scope
std::lock_guard
^~~
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h: In member function ‘void dxvk::DxvkRecycler
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h:49:23: error: ‘mutex’ is not a member of ‘std’
std::lock_guard
^~~
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h:49:33: error: template argument 1 is invalid
std::lock_guard
^
../src/util/com/../../d3d11/../dxvk/dxvk_recycler.h:49:40: error: ‘m_mutex’ was not declared in this scope
std::lock_guard
^~~
In file included from ../src/util/com/../../d3d11/d3d11_interfaces.h:7:0,
from ../src/util/com/com_guid.cpp:3:
../src/util/com/../../d3d11/../dxvk/dxvk_device.h: At global scope:
../src/util/com/../../d3d11/../dxvk/dxvk_device.h:336:10: error: ‘mutex’ in namespace ‘std’ does not name a type
std::mutex m_submissionLock;
^~~~~
ninja: build stopped: subcommand failed.
Many thanks !
Christian
Are you sure you have properly installed MinGW-w64? It seems you lack the winpthreads headers, which leads to missing C++11 threading support.
Is the mingw-w64-x86-64-dev package installed?
it is installed:
ii mingw-w64-x86-64-dev 5.0.2-2 all Development files for MinGW-w64 targeting Win64
Sounds a lot like #1 - on Ubuntu you apparently have to use special mingw binaries with a posix suffix.
Hi,
thanks for the tip, now the build got further, but it still doesn't work:
[49/111] Compiling C++ object 'src/dxvk/dxvk@sta/hud_dxvk_hud_text.cpp.obj'.
FAILED: src/dxvk/dxvk@sta/hud_dxvk_hud_text.cpp.obj
/usr/bin/x86_64-w64-mingw32-g++-posix -Og -gstabs -Isrc/dxvk/dxvk@sta -Isrc/dxvk -I../src/dxvk -I.././include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O0 -g -pthread -MMD -MQ 'src/dxvk/dxvk@sta/hud_dxvk_hud_text.cpp.obj' -MF 'src/dxvk/dxvk@sta/hud_dxvk_hud_text.cpp.obj.d' -o 'src/dxvk/dxvk@sta/hud_dxvk_hud_text.cpp.obj' -c ../src/dxvk/hud/dxvk_hud_text.cpp
In file included from ../src/dxvk/hud/dxvk_hud_text.cpp:3:0:
src/dxvk/dxvk@sta/hud_text_frag.h:3:16: error: stray ‘@’ in program
const uint32_t @BASENAME@[] = {
^
src/dxvk/dxvk@sta/hud_text_frag.h:3:25: error: stray ‘@’ in program
const uint32_t @BASENAME@[] = {
^
In file included from ../src/dxvk/hud/dxvk_hud_text.cpp:4:0:
src/dxvk/dxvk@sta/hud_text_vert.h:3:16: error: stray ‘@’ in program
const uint32_t @BASENAME@[] = {
^
src/dxvk/dxvk@sta/hud_text_vert.h:3:25: error: stray ‘@’ in program
const uint32_t @BASENAME@[] = {
^
src/dxvk/dxvk@sta/hud_text_vert.h:3:27: error: redefinition of ‘const uint32_t BASENAME []’
const uint32_t @BASENAME@[] = {
^
In file included from ../src/dxvk/hud/dxvk_hud_text.cpp:3:0:
src/dxvk/dxvk@sta/hud_text_frag.h:3:17: note: ‘const uint32_t BASENAME [618]’ previously defined here
const uint32_t @BASENAME@[] = {
^~~~
../src/dxvk/hud/dxvk_hud_text.cpp: In member function ‘dxvk::Rc
../src/dxvk/hud/dxvk_hud_text.cpp:133:38: error: ‘hud_text_vert’ was not declared in this scope
const SpirvCodeBuffer codeBuffer(hud_text_vert);
^~~~~
../src/dxvk/hud/dxvk_hud_text.cpp: In member function ‘dxvk::Rc
../src/dxvk/hud/dxvk_hud_text.cpp:153:38: error: ‘hud_text_frag’ was not declared in this scope
const SpirvCodeBuffer codeBuffer(hud_text_frag);
^~~~~
[54/111] Compiling C++ object 'src/dxgi/dxgi@sha/dxgi_swapchain.cpp.obj'.
ninja: build stopped: subcommand failed.
Many thanks !
Christian
For me line 3 of src/dxvk/dxvk@sta/hud_text_frag.h looks like this:
const uint32_t hud_text_frag[] = {
so something goes wrong when generating that file. Do you use the latest meson?
i use the latest meson which is available in the ubuntu repositories.
sadly i am also failing to build on opensuse.
But i noticed that there are binary releases available also now, i will do my tests with those.
just use arch linux :^)
There is a package in obs for dxvk:
https://software.opensuse.org/package/dxvk
No need to compile by hand.
@Laaas do you have a link to arch install instructions? I don't see a PKGBUILD in the aur, looking at compileing it myself and making one but if you know of one or instructions even it would make it easier for me.
Just look at the README.md. It includes everything you need to know.
fair enough, just thought with your shout out maybe you knew of a PKGBUILD I may throw one together if I get it working and it seems worth maintaing.
@XenonPK 👍
Which migw packages did you install in opensuse tw to get it built ? many thx !
@XenonPK
And fyi, i just downloaded your opensuse tw packages and noticed that the two dlls are huge, one is 50mb. I guess that can't be correct..
The unstripped debug DLLs are actually that huge. For any kind of distribution I'd therefore recommend stripped release builds. Getting strip to actually work requires changes in the build files, however.
@pingubot you can find the packages I used in the spec file in the build service. As for size, I set the build type to Release, but I guess strip did not run, as @doitsujin said.
@XenonPK : thanks a lot, managed to build dxvk for myself on opensuse now !
@doitsujin : Thx for the info with the stripped dll's . If you find the time someday, would be great if you could add the info to the readme what needs to be done in the build file to get a stripped dll .
@pingubot I've updated my specfile to run strip on the dlls, I have no idea how to translate that into the Meson build system, but, maybe it will be of interest:
This runs after ninja install :
#Strip symbols
find ./ -type f -name "*.dll" -exec x86_64-w64-mingw32-strip -o {}_strip {} \; -exec mv {}_strip {} \;
On the folder containing the .dll files, ofc.
I managed to compile it on Ubuntu 17.10 by installing the latest meson version with pip3:
$ sudo apt install python3-pip
$ pip3 install meson
Meson is then located in ~/.local/bin, so the command has to be changed with that path.
After this I have this error:
PermissionError: [Errno 13] Permission denied: '/usr/local/bin/dxgi_vk.dll'
Which is solved in a similar way by downloading the bin from https://github.com/ninja-build/ninja/releases and putting it in ~/.local/bin (for instance), and changing the build command to point to that binary.
After doing the pip3 install meson hack and symlinking /usr/share/meson/meson to my .local/bin/meson (so i did not have to edit that many lines in build.ninja it builds seemingly without errors.
However my binaries are 40'ish MB big, while the "release" binaries on this page is <2MB?
Not finding the dll i guess would indicate that its "broken" somehow? :) The release binary "works" in a way that wine complains about not finding libvulkan1, but i guess that is because i have not installed the vulkanRT packages or whatever yet.
So.. Building dxvk on Ubuntu 17.10 just aint happening? :)
For the binary size, please refer to the above comment from @doitsujin above. It's normal.
Use the generated bash file to install the dlls in the wineprefix of your choice, as explained on this project's homepage:
cd /your/dxvk/directory/bin
WINEPREFIX=/your/wineprefix bash dlls_setup.sh
You indeed need to install libvulkan.
Well.. no matter what i do, i cant get it to work.
No other change, so for ME that would suggest something is wrong with my self-compiled dll's.
Do i have to compile 2 different dll's? one for 32-bit apps, and one for 64-bit app? Or is the build-win64.txt script for "amd64" build working on both?
How do i troubleshoot my seemingly error-free compile of dxvk? :)
You have to use the DLLs that match the architecture of the application you want to use. In case of the Unigine benchmarks, that would be 32-bit.
And building 32-bit dxvk is NOT like crossbuilding wine under Ubuntu where you have to make 32-bit containers with lxc and whatnot? (Atleast how i do it when i compile wine)?
Its as simple as using the build-wine32.txt file instead?
Its as simple as using the build-wine32.txt file instead?
Yes.
Also, you don't have to use lxc to build 32-bit wine, it sounds like you're making things overly complicated. Just follow these instructions.
Oki, so https://wiki.winehq.org/Building_Biarch_Wine_On_Ubuntu is old info and no longer necessary?
Well, the closest i could figure out was a sensible "PKG_CONFIG_PATH" for me would be:
PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfigure
But that still produced:
configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries
I do not dare to experiment with any --force flags to install all of wine's build-dep's :)
Anyway.. unless a horribly easy explanation to how i cross-build wine on Ubuntu comes along, that is perhaps not a dxvk support question :)
Back to the initial stuff:
When i compile 64-bit dll's, and put them in c:windowssyswow64, and then compile the 32-bit ones and put them in c:windowssystem32 ?
@SveSop Actually 64-bit DLLs go into system32 and 32-bit into syswow64. There's Microsoft's logic for you :/
One word backwards compatibility (ok actually 2).
Closing due to lack of activity. Support for GCC 6 will be dropped as soon as Ubuntu 18.04 lands, however.
I'd like to report that this still happens with MinGW 7.3 on Debian unstable. Using the -posix version of the compiler works, however I chose to not change the system-wide default and instead modify build-win64.txt. Is there any reason why that file shouldn't be changed in the repository, if the -win32 version of the compiler is simply unusable?