https://bugs.winehq.org/show_bug.cgi?id=48497
Bug ID: 48497 Summary: DXVA2 patchset not compatible with GCC 10 Product: Wine-staging Version: 5.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: mike@cchtml.com CC: leslie_alistair@hotmail.com, z.figura12@gmail.com Distribution: ---
GCC 10 defaults have changed.
https://gcc.gnu.org/gcc-10/porting_to.html#common
Default to -fno-common
A common mistake in C is omitting extern when declaring a global variable in a header file. If the header is included by several files it results in multiple definitions of the same variable. In previous GCC versions this error is ignored. GCC 10 defaults to -fno-common, which means a linker error will now be reported. To fix this, use extern in header files when declaring global variables, and ensure each global is defined in exactly one C file. As a workaround, legacy C code can be compiled with -fcommon.
int x; // tentative definition - avoid in header files
extern int y; // correct declaration in a header file
Fedora Rawhide (Fedora 32) now has GCC 10 and Wine-staging fails to build.
The fix is simple. Add 'extern' to the two offending lines below:
sed -i 's/BOOL config_vaapi_drm DECLSPEC_HIDDEN;/extern BOOL config_vaapi_drm DECLSPEC_HIDDEN;/' dlls/dxva2/dxva2_private.h sed -i 's/char config_vaapi_drm_path[MAX_PATH] DECLSPEC_HIDDEN;/extern char config_vaapi_drm_path[MAX_PATH] DECLSPEC_HIDDEN;/' dlls/dxva2/dxva2_private.h
https://bugs.winehq.org/show_bug.cgi?id=48497
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #1 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- This is now fixed.
Thanks.
https://bugs.winehq.org/show_bug.cgi?id=48497
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed wine-staging.