https://bugs.winehq.org/show_bug.cgi?id=52455
Bug ID: 52455 Summary: Bundled libffi causes linker failure with gcc11 and x86_64 Product: Wine-gecko Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-gecko-unknown Assignee: jacek@codeweavers.com Reporter: mike@cchtml.com Distribution: ---
Wine Gecko 2.47.2
The bundled libffi looks like version 3.1. This version has known problems linking with recent versions of gcc under the 64-bit x86 arch.
Linking fails with:
../libjs_static.a(win64.o):fake:(.text+0x69): relocation truncated to fit: R_X86_64_32S against symbol `ffi_closure_win64_inner' defined in .text section in ../libjs_static.a(ffi.o) collect2: error: ld returned 1 exit status
It looks like upstream has fixed this as newer versions successfully link. Upgrading the bundled version to 3.4.2 lets wine-gecko successfully link with gcc 11.2.1.
https://bugs.winehq.org/show_bug.cgi?id=52455
Michael Cronenworth mike@cchtml.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Bundled libffi causes |Bundled libraries cause |linker failure with gcc11 |linker failures with gcc11 |and x86_64 |and x86_64
--- Comment #1 from Michael Cronenworth mike@cchtml.com --- The same issue affects ffvpx and libav, but libav has been removed from newer Firefox versions. If I try to set 'MOZ_LIBAV_FFT=0' to disable it in my build other pieces break that require libav.
Any chance you will rebase to a newer Firefox code base?
https://bugs.winehq.org/show_bug.cgi?id=52455
--- Comment #2 from Jacek Caban jacek@codeweavers.com --- Unfortunately we can't use newer code base. Mozilla dropped XPCOM APIs that we use for embedding Gecko. Even 47 branch required a number of reverts/changes to make it useful for us. I'm afraid that we will need to continue dealing with such problems...
On top of that, MS stopped developing IE after version IE11, so that's what applications expect and we need to target it. Lack of newer HTML features is, in a sense, good for IE11 compatibility.
https://bugs.winehq.org/show_bug.cgi?id=52455
--- Comment #3 from Michael Cronenworth mike@cchtml.com --- Thanks for the reply. I was afraid of that.
I'll keep poking at the code to get it to compile.
https://bugs.winehq.org/show_bug.cgi?id=52455
--- Comment #4 from Michael Cronenworth mike@cchtml.com --- Created attachment 71756 --> https://bugs.winehq.org/attachment.cgi?id=71756 image-base and libffi
Telling the linker to use a different base address fixes the libav and ffvpx issues. I now have compiled 32-bit and 64-bit MSI packages under Fedora Rawhide (36).
This patch also includes a single change needed when using the latest, stable upstream libffi library to replace the bundled version.
I'm not sure how to test the HTML functionality. The MSI package files install fine.