Bug 1996712

Summary: mingw-libffi: FTBFS due to incorrect relocation for ffi_closure_win64_inner
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: mingw-libffiAssignee: Yvugenfi <yvugenfi>
Status: CLOSED ERRATA QA Contact: Tomas Pelka <tpelka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: ailan, bstinson, jen, jwboyer, kkiwi, mdean, nobody, rjones, rlemosor, tpelka, yvugenfi
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mingw-libffi-3.4.2-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 16:06:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2009943    
Bug Blocks: 1975099    
Attachments:
Description Flags
build.log none

Description Florian Weimer 2021-08-23 13:57:25 UTC
Created attachment 1816886 [details]
build.log

A rebuild of mingw-libffi-3.1-13.el9 fails with:

libtool: link: x86_64-w64-mingw32-gcc -shared  src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/x86/.libs/ffi.o src/x86/.libs/win64.o   -lssp  -O2 -g -fstack-protector   -o .libs/libffi-6.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libffi.dll.a
src/x86/.libs/win64.o:/builddir/build/BUILD/libffi-3.1/build_win64/../src/x86/win64.S:298:(.text+0x69): relocation truncated to fit: R_X86_64_32S against symbol `ffi_closure_win64_inner' defined in .text section in src/x86/.libs/ffi.o
collect2: error: ld returned 1 exit status

This failure is likely triggered by the mingw-gcc rebase (bug 1953914).

It's possible this happens because SYMBOL_UNDERSCORE is no longer set correctly.

Comment 1 Richard W.M. Jones 2021-08-23 14:23:17 UTC
Meirav, I believe someone on your team maintains this?

Notes:

It builds fine in Fedora so probably the best plan is to
synch the package with Fedora.

The deadline for RHEL 9 Beta is next Monday (31st).

Comment 5 Richard W.M. Jones 2021-10-01 07:25:27 UTC
As it is urgent I have done a scratch build of the package synched
to Fedora (see my suggestion above):

https://kojihub.stream.rdu2.redhat.com/koji/taskinfo?taskID=682720

and created a merge request:

https://gitlab.com/redhat/centos-stream/rpms/mingw-libffi/-/merge_requests/2

*NB* I am not maintaining this package and I don't know
who consumes it in RHEL 9.

Comment 6 Richard W.M. Jones 2021-10-01 13:45:07 UTC
I'll need QE ack from someone if you want this fixed in RHEL 9.
The only other bug I can find for this component in RHEL has
QE contact spice-qe-bugs and was ACKed by @tpelka

Comment 7 Richard W.M. Jones 2021-10-01 17:06:56 UTC
After doing all that I notice there were in fact successful builds
of this package in brew:
  https://brewweb.engineering.redhat.com/brew/packageinfo?packageID=35562
The package was actually stuck in gating:
  https://dashboard.osci.redhat.com/#/artifact/brew-build/aid/38822259
because of numerous missing tests.

It's probably for the best that we have rebased it to match Fedora.

This is not fixed in RHEL 9 beta.  I guess someone can have a look
at the missing gating tests (because I've no idea about why they didn't
run), or we could rebase it in RHEL 9 beta.  We'll probably need a cloned
bug with exception+.

Comment 8 Richard W.M. Jones 2021-10-01 17:13:31 UTC
This is going well.  mingw-glib2 now fails to install because
apparently this version of libffi bumps the SONAME:

nothing provides mingw32(libffi-6.dll) needed by mingw32-glib2-2.66.7-3.el9.noarch
nothing provides mingw64(libffi-6.dll) needed by mingw64-glib2-2.66.7-3.el9.noarch

We really need the maintainer of these packages to help us now.

Comment 14 Richard W.M. Jones 2021-10-12 16:20:04 UTC
We're probably also waiting for "Verified: Tested".

Comment 19 errata-xmlrpc 2022-05-17 16:06:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: mingw-libffi), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:4297