https://bugs.winehq.org/show_bug.cgi?id=49637
Bug ID: 49637 Summary: Build fails when CROSSCFLAGS are passed Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: build-env Assignee: wine-bugs@winehq.org Reporter: mike@fireburn.co.uk Distribution: ---
Created attachment 67831 --> https://bugs.winehq.org/attachment.cgi?id=67831 Build log xz compressed
When I build a PE enabled wine (--enable-mingw) and don't set CROSSCFLAGS wine builds but creates dll.so files
When I build with CROSSCFLAGS=${CFLAGS} set I get a build failure when trying to link:
/usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1005): undefined reference to `GUID_ContainerFormatBmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1014): undefined reference to `GUID_ContainerFormatJpeg' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1023): undefined reference to `GUID_ContainerFormatPng' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1032): undefined reference to `GUID_ContainerFormatDds' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1041): undefined reference to `GUID_ContainerFormatTiff' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1050): undefined reference to `GUID_ContainerFormatGif' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x105f): undefined reference to `GUID_ContainerFormatWmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x11b5): undefined reference to `GUID_ContainerFormatWmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x11c4): undefined reference to `GUID_ContainerFormatWmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x11d3): undefined reference to `GUID_ContainerFormatWmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x11ed): undefined reference to `GUID_ContainerFormatBmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x11fc): undefined reference to `GUID_ContainerFormatBmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x120b): undefined reference to `GUID_ContainerFormatBmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x12dd): undefined reference to `GUID_ContainerFormatJpeg' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x12ec): undefined reference to `GUID_ContainerFormatJpeg' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x12fb): undefined reference to `GUID_ContainerFormatJpeg' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1315): undefined reference to `GUID_ContainerFormatPng' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1324): undefined reference to `GUID_ContainerFormatPng' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1333): undefined reference to `GUID_ContainerFormatPng' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1355): undefined reference to `GUID_ContainerFormatDds' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1364): undefined reference to `GUID_ContainerFormatDds' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1373): undefined reference to `GUID_ContainerFormatDds' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x1395): undefined reference to `GUID_ContainerFormatTiff' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x13a4): undefined reference to `GUID_ContainerFormatTiff' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x13b3): undefined reference to `GUID_ContainerFormatTiff' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x13d5): undefined reference to `GUID_ContainerFormatGif' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x13e4): undefined reference to `GUID_ContainerFormatGif' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x13f3): undefined reference to `GUID_ContainerFormatGif' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.text+0x14c0): undefined reference to `IID_IWICDdsDecoder' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.rdata+0x9c0): undefined reference to `GUID_ContainerFormatBmp' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.rdata+0x9c8): undefined reference to `GUID_ContainerFormatJpeg' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.rdata+0x9d0): undefined reference to `GUID_ContainerFormatPng' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.rdata+0x9d8): undefined reference to `GUID_ContainerFormatDds' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.rdata+0x9e0): undefined reference to `GUID_ContainerFormatTiff' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.rdata+0x9e8): undefined reference to `GUID_ContainerFormatGif' /usr/libexec/gcc/i686-w64-mingw32/ld: d3dx10_43_main.cross.o:d3dx10_43_main.c:(.rdata+0x9f0): undefined reference to `GUID_ContainerFormatWmp' collect2: error: ld returned 1 exit status winegcc: /usr/bin/i686-w64-mingw32-gcc failed make[1]: *** [Makefile:432: d3dx10_43.dll] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-emulation/wine-staging-9999/work/wine-9999-abi_x86_32.x86/dlls/d3dx10_43' make: *** [Makefile:10075: dlls/d3dx10_43] Error 2 make: *** Waiting for unfinished jobs....
I'll attach the complete log
I can work around this with the following patch:
--- a/dlls/d3dx10_43/Makefile.in 2020-07-30 12:23:06.918814528 +0100 +++ b/dlls/d3dx10_43/Makefile.in 2020-07-30 12:23:34.037329783 +0100 @@ -1,7 +1,6 @@ MODULE = d3dx10_43.dll IMPORTLIB = d3dx10 -IMPORTS = d3d10_1 d3dcompiler dxguid -DELAYIMPORTS = windowscodecs +IMPORTS = d3d10_1 d3dcompiler dxguid windowscodecs
EXTRADLLFLAGS = -mno-cygwin
After that wine builds successfully and creates dll files
Is there any instructions on how to do this officially? I've been figuring this out with trial and error
LTO is a no go in either CFLAGS or CROSSCFLAGS