Looks like your standard library is missing some C++17 features. Which GCC version are you using?
You need at least GCC 9.2
https://github.com/gcc-mirror/gcc/commit/
6b5134758656611b71a924ba0889a64f765aa9cb#diff-
f4a6a68472e926ec0c2a87b8097068e4[1]
See all tags where this commit is included.
[1] https://github.com/gcc-mirror/gcc/commit/
6b5134758656611b71a924ba0889a64f765aa9cb#diff-
f4a6a68472e926ec0c2a87b8097068e4
I'll force a recent GCC then.
Shouldn't the DXVK build system catch this?
I wasn't aware that this functionality was missing before GCC 9.2 (same probably goes for @Joshua-Ashton who wrote this piece of code).
GCC 8.1, actually.
I'm now building using GCC 9.2 and I get the following error:
[257/257] Linking target src/d3d9/d3d9.dll.so.
FAILED: src/d3d9/d3d9.dll.so
wineg++ -o src/d3d9/d3d9.dll.so 'src/d3d9/ecc23b3@@d3d9.dll@sha/version.res' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_main.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_interface.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_adapter.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_monitor.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_device.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_state.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_cursor.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_swapchain.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_format.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_common_texture.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_texture.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_surface.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_volume.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_common_buffer.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_buffer.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_shader.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_vertex_declaration.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_query.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_multithread.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_options.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_stateblock.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_sampler.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_util.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_initializer.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_fixed_function.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_names.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_swvp_emu.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_format_helpers.cpp.o' 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_hud.cpp.o' ../source/src/d3d9/d3d9.spec -Wl,--no-undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,d3d9.dll.so -m32 -mwindows src/dxso/libdxso.a src/dxvk/libdxvk.a src/util/libutil.a src/spirv/libspirv.a src/vulkan/libvkcommon.a -ldl -lwinevulkan -Wl,--end-group -pthread '-Wl,-rpath,$ORIGIN/../dxso:$ORIGIN/../dxvk:$ORIGIN/../util:$ORIGIN/../spirv:$ORIGIN/../vulkan' -Wl,-rpath-link,/tmp/guix-build-dxvk32-1.5.drv-0/build/src/dxso:/tmp/guix-build-dxvk32-1.5.drv-0/build/src/dxvk:/tmp/guix-build-dxvk32-1.5.drv-0/build/src/util:/tmp/guix-build-dxvk32-1.5.drv-0/build/src/spirv:/tmp/guix-build-dxvk32-1.5.drv-0/build/src/vulkan
ld: src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_interface.cpp.o:(.data.rel.ro._ZTIN4dxvk9ComObjectI12IDirect3D9ExEE[_ZTIN4dxvk9ComObjectI12IDirect3D9ExEE]+0x8): undefined reference to `typeinfo for IDirect3D9Ex'
collect2: error: ld returned 1 exit status
The D3D9 module requires pretty much the latest MinGW because in older versions the headers are completely broken and don't have the correct definitions for functions (missing the =0 for some reason on the interfaces)
As for if you're building Winelib (please don't 🐸), the same issue also applies there. I put in a patch to Wine at the start of this year to remedy this there.
As for if you're building Winelib, the same issue also applies there. I put in a patch to Wine at the start of this year to remedy this there.
Are you saying I should use a recent-enough version of Wine? Which one?
I'll also try with mingw 6.0.0.
He's saying that you shouldn't use Winelib builds because those don't work and are close to unsupported.
Try a recent version of MinGW.
@K0bin
you shouldn't use Winelib builds because those don't work
That's not true.
@Ambrevar
Are you saying I should use a recent-enough version of Wine? Which one?
IIRC, minimal requirements for DXVK was GCC 7.3 and Wine >=3.17 a long time ago.
Now (after D9VK merged), it seems, GCC 8.1 and Wine ~ 4.??, at least I can build and use winelib with Wine-proton 4.11 w/o any problem.
But better use MinGW, if possible.
Yes you'll need a Wine that's newer than a year old
I've tried with wine-staging (4.18) and gcc 9.2
and I get the same first error:
--8<---------------cut here---------------start------------->8---
[222/257] Compiling C++ object 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_adapter.cpp.o'.
FAILED: src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_adapter.cpp.o
wineg++ -Isrc/d3d9/ecc23b3@@d3d9.dll@sha -Isrc/d3d9 -I../source/src/d3d9 -I../source/./include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -O2 -g -DNOMINMAX --no-gnu-unique -m64 -fvisibility=hidden -fvisibility-inlines-hidden -D__WIDL_objidl_generated_name_0000000C= -fPIC -MD -MQ 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_adapter.cpp.o' -MF 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_adapter.cpp.o.d' -o 'src/d3d9/ecc23b3@@d3d9.dll@sha/d3d9_adapter.cpp.o' -c ../source/src/d3d9/d3d9_adapter.cpp
In file included from ../source/src/d3d9/../util/util_flags.h:5:0,
from ../source/src/d3d9/d3d9_include.h:36,
from ../source/src/d3d9/d3d9_adapter.h:3,
from ../source/src/d3d9/d3d9_adapter.cpp:1:
../source/src/d3d9/../util/util_bit.h:135:0: warning: ignoring #pragma GCC unroll [-Wunknown-pragmas]
#pragma GCC unroll 0
In file included from ../source/src/d3d9/d3d9_adapter.cpp:10:0:
../source/src/d3d9/../util/util_ratio.h:5:10: fatal error: charconv: No such file or directory
#include
^~~~~~~~~~
compilation terminated.
winegcc: g++ failed
--8<---------------cut here---------------end--------------->8---
The package definitions for dxvk32 and dxvk 1.4.4:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/wine.scm#n548
All I changed to those definitions are the inputs:
Am I missing something?
Note: I don't know how to use the mingw compiler in Guix packages :(
@Ambrevar
I'm now building using GCC 9.2 ...
[257/257] Linking target src/d3d9/d3d9.dll.so.
Your previous attempt with GCC 9.2 was successful, so double check your current configuration.
$ echo '#include "charconv"' | g++ -c -v -x c++ -
this should print which directories used by GCC to locate includes, also should run w/o errors.
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/x86_64-pc-linux-gnu
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/backward
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed
/usr/include
End of search list.
charconv is under the first path for me.
My bad, I had forgotten gcc-9 from dxvk native-inputs!
It just built properly using winelib. Thanks to you all!
I'm trying to update the Guix package from 1.4.4 to 1.5. It fails with
Any idea why?