https://bugs.winehq.org/show_bug.cgi?id=46097
Bug ID: 46097 Summary: Cannot build wine-i386 on a x86-64 host Product: Wine Version: 3.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: critical Priority: P2 Component: build-env Assignee: wine-bugs@winehq.org Reporter: aros@gmx.com Distribution: ---
make[1]: Entering directory '/tmp/wine-3.19/dlls/joy.cpl' ../../tools/winegcc/winegcc -o joy.cpl.so -B../../tools/winebuild -fasynchronous-unwind-tables -shared joy.cpl.spec \ main.o joy.res ../../dlls/dxguid/libdxguid.a ../../dlls/dinput/libdinput.a \ ../../dlls/dinput8/libdinput8.a -lole32 -lcomctl32 -luser32 -ladvapi32 \ ../../libs/port/libwine_port.a -m32 -Wl,-O1 -Wl,--hash-style=gnu ld: relocatable linking with relocations from format elf64-x86-64 (../../dlls/dinput8/libdinput8.a(dinput8.kc7iBi.o)) to format elf32-i386 (joy.iEAF1I.o) is not supported winebuild: ld failed with status 1 winegcc: ../../tools/winebuild/winebuild failed make[1]: *** [Makefile:237: joy.cpl.so] Error 2 make[1]: Leaving directory '/tmp/wine-3.19/dlls/joy.cpl' make: *** [Makefile:8177: dlls/joy.cpl] Error 2
This are is my compilation routine (has always worked previously): $ export CFLAGS="-O2 -march=pentium-m -m32 -pipe" $ export LDFLAGS="-m32 -Wl,-O1 -Wl,--hash-style=gnu" $ setarch i686 ./configure $ make
Host: fedora 29 x86-64 with all updates installed.
Strangely libdinput.a doesn't get built when make enters wine-3.19/dlls/dinput directory. It's wine-3.19/dlls/joy.cpl which builds it.
This is what's inside libdinput.a:
data_formats.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped dinput.6vh9eu.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped dinput.CtsDd6.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped dinput.tP5ioN.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #1 from Artem S. Tashkinov aros@gmx.com --- ../../tools/winebuild/winebuild -m32 -w --implib -o libdinput.a --export dinput.spec data_formats.o
fixes libdinput.a
!!! However libdinput8.a has the same issue which is fixed by
../../tools/winebuild/winebuild -m32 -w --implib -o libdinput8.a --export dinput8.spec data_formats.o
https://bugs.winehq.org/show_bug.cgi?id=46097
Artem S. Tashkinov aros@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P1
--- Comment #2 from Artem S. Tashkinov aros@gmx.com --- This continues in Wine 4.0.
Please fix ASAP.
It's an easy fix.
https://bugs.winehq.org/show_bug.cgi?id=46097
Artem S. Tashkinov aros@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Cannot build wine-i386 on a |Cannot build wine-i386 on a |x86-64 host |x86-64 host (ld: | |relocatable linking with | |relocations from format | |elf64-x86-64 | |(../../dlls/dinput8/libdinp | |ut8.a(dinput8.kc7iBi.o)) to | |format elf32-i386 | |(joy.iEAF1I.o) is not | |supported)
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- You should get rid of setarch i686 and let Wine figure out the build flags for itself.
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #4 from Artem S. Tashkinov aros@gmx.com --- (In reply to Alexandre Julliard from comment #3)
You should get rid of setarch i686 and let Wine figure out the build flags for itself.
How will wine figure out anything when I'm on a x86-64 host and I want to build a i686 version?
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #5 from Artem S. Tashkinov aros@gmx.com --- (In reply to Alexandre Julliard from comment #3)
You should get rid of setarch i686 and let Wine figure out the build flags for itself.
Passing -m32 as a CFLAGS/LDFLAGS argument wasn't enough in the past and also some applications still require to be ./configure'd via setarch.
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- (In reply to Artem S. Tashkinov from comment #4)
(In reply to Alexandre Julliard from comment #3)
You should get rid of setarch i686 and let Wine figure out the build flags for itself.
How will wine figure out anything when I'm on a x86-64 host and I want to build a i686 version?
That's the default behavior, unless you use --enable-win64.
https://bugs.winehq.org/show_bug.cgi?id=46097
Artem S. Tashkinov aros@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #7 from Artem S. Tashkinov aros@gmx.com --- It would be great if someone left a note at or updated https://wiki.winehq.org/Building_Wine#Cross-Compiling
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #8 from Artem S. Tashkinov aros@gmx.com --- (In reply to Alexandre Julliard from comment #6)
(In reply to Artem S. Tashkinov from comment #4)
(In reply to Alexandre Julliard from comment #3)
You should get rid of setarch i686 and let Wine figure out the build flags for itself.
How will wine figure out anything when I'm on a x86-64 host and I want to build a i686 version?
That's the default behavior, unless you use --enable-win64.
https://wiki.winehq.org/Building_Wine#Cross-Compiling
doesn't even mention how to properly build wine i686 on a x86-64 host.
https://bugs.winehq.org/show_bug.cgi?id=46097
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |INVALID
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #9 from Rosanne DiMesio dimesio@earthlink.net --- (In reply to Artem S. Tashkinov from comment #7)
It would be great if someone left a note at or updated https://wiki.winehq.org/Building_Wine#Cross-Compiling
https://wiki.winehq.org/Building_Wine#Multi-Arch_and_Multi-lib already has a note marked with a blue info icon that says "If you've installed the necessary libraries, wine's configure script should handle any multi-lib compiler flags for you."
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #10 from Artem S. Tashkinov aros@gmx.com --- (In reply to Rosanne DiMesio from comment #9)
(In reply to Artem S. Tashkinov from comment #7)
It would be great if someone left a note at or updated https://wiki.winehq.org/Building_Wine#Cross-Compiling
https://wiki.winehq.org/Building_Wine#Multi-Arch_and_Multi-lib already has a note marked with a blue info icon that says "If you've installed the necessary libraries, wine's configure script should handle any multi-lib compiler flags for you."
Are you saying that specifying -m32 is also unnecessary?
https://bugs.winehq.org/show_bug.cgi?id=46097
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- (In reply to Artem S. Tashkinov from comment #10)
(In reply to Rosanne DiMesio from comment #9)
(In reply to Artem S. Tashkinov from comment #7)
It would be great if someone left a note at or updated https://wiki.winehq.org/Building_Wine#Cross-Compiling
https://wiki.winehq.org/Building_Wine#Multi-Arch_and_Multi-lib already has a note marked with a blue info icon that says "If you've installed the necessary libraries, wine's configure script should handle any multi-lib compiler flags for you."
Are you saying that specifying -m32 is also unnecessary?
Yes.
https://bugs.winehq.org/show_bug.cgi?id=46097
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Gijs Vermeulen gijsvrm@gmail.com --- Closing.