https://bugs.winehq.org/show_bug.cgi?id=50653
Bug ID: 50653 Summary: Wine fails to build with clang-10.0 as a crosscompiler Product: Wine Version: 6.1 Hardware: x86-64 OS: Linux Status: NEW Keywords: regression Severity: blocker Priority: P2 Component: tools Assignee: wine-bugs@winehq.org Reporter: dmitry@baikal.ru CC: jacek@codeweavers.com Regression SHA1: 8c2ad8e403fbc30355eacda1d315f36e812ec15b Distribution: ---
$ clang --version clang version 10.0.0 Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/bin
$ make ... tools/winebuild/winebuild -b x86_64-windows -w --implib -o dlls/ucrtbase/libucrtbase.cross.a --export \ ../wine.src/dlls/ucrtbase/ucrtbase.spec dlls/ucrtbase/crt_gccmain.cross.o \ dlls/ucrtbase/crt_main.cross.o dlls/ucrtbase/crt_winmain.cross.o dlls/ucrtbase/crt_wmain.cross.o \ dlls/ucrtbase/crt_wwinmain.cross.o dlls/ucrtbase/mathf.cross.o dlls/ucrtbase/printf.cross.o ucrtbase.dll: not a COFF object, bitcode, archive or resource file winebuild: /usr/bin/lld-link failed with status 1 make: *** [Makefile:161453: dlls/ucrtbase/libucrtbase.cross.a] Error 1
This is an out of the tree wow64 build.
https://bugs.winehq.org/show_bug.cgi?id=50653
--- Comment #1 from Jacek Caban jacek@codeweavers.com --- It works for me with clang, so it may be version dependent: clang version 11.0.0 (https://github.com/llvm/llvm-project.git 176249bd6732a8044d457092ed932768724a6f06)
Please manually run failing winebuild command with additional -v argument and post the output.
https://bugs.winehq.org/show_bug.cgi?id=50653
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Jacek Caban from comment #1)
It works for me with clang, so it may be version dependent: clang version 11.0.0 (https://github.com/llvm/llvm-project.git 176249bd6732a8044d457092ed932768724a6f06)
Please manually run failing winebuild command with additional -v argument and post the output.
$ tools/winebuild/winebuild -v -b x86_64-windows -w --implib -o dlls/ucrtbase/libucrtbase.cross.a --export ../wine.src/dlls/ucrtbase/ucrtbase.spec dlls/ucrtbase/crt_gccmain.cross.o dlls/ucrtbase/crt_main.cross.o dlls/ucrtbase/crt_winmain.cross.o dlls/ucrtbase/crt_wmain.cross.o dlls/ucrtbase/crt_wwinmain.cross.o dlls/ucrtbase/mathf.cross.o dlls/ucrtbase/printf.cross.o /usr/bin/llvm-dlltool -k -l dlls/ucrtbase/libucrtbase.3MBRyK.a -d dlls/ucrtbase/libucrtbase.AinUNm.def -m i386:x86-64 --as-flags=--64 /usr/bin/lld-link /lib -out:dlls/ucrtbase/libucrtbase.cross.a dlls/ucrtbase/libucrtbase.3MBRyK.a dlls/ucrtbase/crt_gccmain.cross.o dlls/ucrtbase/crt_main.cross.o dlls/ucrtbase/crt_winmain.cross.o dlls/ucrtbase/crt_wmain.cross.o dlls/ucrtbase/crt_wwinmain.cross.o dlls/ucrtbase/mathf.cross.o dlls/ucrtbase/printf.cross.o ucrtbase.dll: not a COFF object, bitcode, archive or resource file winebuild: /usr/bin/lld-link failed with status 1
https://bugs.winehq.org/show_bug.cgi?id=50653
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru --- https://bugs.llvm.org/show_bug.cgi?id=42837 might be related. It looks like the fix was pushed to 11.x and never ported to 10.x.
https://bugs.winehq.org/show_bug.cgi?id=50653
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=50653
--- Comment #4 from Jacek Caban jacek@codeweavers.com --- Created attachment 69365 --> https://bugs.winehq.org/attachment.cgi?id=69365 fix
Yes, that explains everything. Does the attached patch help?
https://bugs.winehq.org/show_bug.cgi?id=50653
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #5 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Jacek Caban from comment #4)
Created attachment 69365 [details] fix
Yes, that explains everything. Does the attached patch help?
The patch fixes the build. Thanks for the quick fix!
https://bugs.winehq.org/show_bug.cgi?id=50653
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Dmitry Timoshkov from comment #5)
(In reply to Jacek Caban from comment #4)
Created attachment 69365 [details] fix
Yes, that explains everything. Does the attached patch help?
The patch fixes the build. Thanks for the quick fix!
Another version of the patch https://source.winehq.org/patches/data/199773 also works.
https://bugs.winehq.org/show_bug.cgi?id=50653
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |6d9b33118455027bebb6a453b7e | |1477864080fe3
--- Comment #7 from Dmitry Timoshkov dmitry@baikal.ru --- Fixed by 6d9b33118455027bebb6a453b7e1477864080fe3.
Thanks Jacek.
https://bugs.winehq.org/show_bug.cgi?id=50653
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.3.