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
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #1 from Mike Lothian mike@fireburn.co.uk --- I can't reproduce this if I build with -j1 (rather than the current -j8)
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #2 from Mike Lothian mike@fireburn.co.uk --- Created attachment 67832 --> https://bugs.winehq.org/attachment.cgi?id=67832 Work around patch
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #3 from Mike Lothian mike@fireburn.co.uk --- The patch has been tested with
--with-mingw --without-mingw
https://bugs.winehq.org/show_bug.cgi?id=49637
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #4 from Zebediah Figura z.figura12@gmail.com --- (In reply to Mike Lothian from comment #0)
Created attachment 67831 [details] 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
What does config.log say in this case?
I'm not sure why there's a build race here; d3dx10_43.dll should depend on libwindowscodecs.delay.a. It certainly does in my build tree. Can you please attach the generated dlls/d3dx10_43/Makefile?
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #5 from Mike Lothian mike@fireburn.co.uk --- Created attachment 67833 --> https://bugs.winehq.org/attachment.cgi?id=67833 Confiig.log CROSSCFLAGS set (xz compressed)
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #6 from Mike Lothian mike@fireburn.co.uk --- Created attachment 67834 --> https://bugs.winehq.org/attachment.cgi?id=67834 Config.log CROSSCFLAGS not set (xz compressed)
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #7 from Mike Lothian mike@fireburn.co.uk --- Created attachment 67835 --> https://bugs.winehq.org/attachment.cgi?id=67835 Config.log Diff between the two
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #8 from Mike Lothian mike@fireburn.co.uk --- Created attachment 67836 --> https://bugs.winehq.org/attachment.cgi?id=67836 Generated Makefile with CROSSCFLAGS set, Makefile.in unchanged
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #9 from Zebediah Figura z.figura12@gmail.com --- I don't know how to explain either of these phænomena.
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #10 from Mike Lothian mike@fireburn.co.uk --- Created attachment 67837 --> https://bugs.winehq.org/attachment.cgi?id=67837 Generated Makefile with CROSSCFLAGS NOT set, Makefile.in unchanged
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #11 from Mike Lothian mike@fireburn.co.uk --- Created attachment 67838 --> https://bugs.winehq.org/attachment.cgi?id=67838 Diff between two make files
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #12 from Zebediah Figura z.figura12@gmail.com --- Are you sure that the .dll.so are generated by this build, and not left over from an earlier build?
Note also that some DLLs have not been converted to PE, and still yield .dll.so even when compiled with mingw. kernelbase.dll is an example of a DLL that should not end in dll.so with a functional mingw.
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #13 from Mike Lothian mike@fireburn.co.uk --- Apologies, you're right about the dlls vs dlls.so - I'm getting the same mix between the two builds - so sorry for the noise about that issue :$
Gentoo's portage always uses fresh files for it's builds. I personally use tmpfs for my build directory - maybe the lack of debugging (-g -gdwarf-2 -gstrict-dwarf) combined with tmpfs, and a fresh build environment highlights a race issue?
https://bugs.winehq.org/show_bug.cgi?id=49637
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE
--- Comment #14 from Zebediah Figura z.figura12@gmail.com --- This is actually bug 49785.
*** This bug has been marked as a duplicate of bug 49785 ***
https://bugs.winehq.org/show_bug.cgi?id=49637
--- Comment #15 from Mike Lothian mike@fireburn.co.uk --- This bug was reported first...
https://bugs.winehq.org/show_bug.cgi?id=49637
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Zebediah Figura z.figura12@gmail.com --- (In reply to Mike Lothian from comment #15)
This bug was reported first...
Yes, but the other already had a more accurate title. Sometimes that happens.