Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 801109 (libffi-3.4)

Summary: [tracker] dev-libs/libffi-3.4 porting
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: atoth
Priority: Normal Keywords: PullRequest, Tracker
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=813756
https://github.com/gentoo/gentoo/pull/29195
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 804660    
Bug Blocks:    

Description Sergei Trofimovich (RETIRED) gentoo-dev 2021-07-07 21:56:01 UTC
libffi-3.4 has no API changes but has a trampoline change that is known to expose bugs in apps:
- ghc has too optimistic assumption about executable memory: https://gitlab.haskell.org/ghc/ghc/-/issues/20051
- gobject-introspection uses incorrect object as a closure: https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/283

Both are currently mitigated by disabling USE=-exec-static-trampoline default. But more might lurk in the shadows.

This is a tracker bug. No talking here please.

Let's gather typical failures and examples of fixes at:
    https://wiki.gentoo.org/wiki/Project:Toolchain#libffi-3.4
Comment 1 Larry the Git Cow gentoo-dev 2021-07-24 23:47:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f1d3258d1e53b8171f75848e42f7628ca14ce28

commit 9f1d3258d1e53b8171f75848e42f7628ca14ce28
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-07-24 23:43:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-07-24 23:46:49 +0000

    profiles/base: mask dev-libs/libffi[exec-static-trampoline]
    
    Masking for now until we've had some more testing just in case
    of other consumers relying on faulty assumptions which we
    haven't discovered yet.
    
    Feel free to test this flag, but be aware of possible
    breakage. Let us know of any bugs!
    
    Bug: https://bugs.gentoo.org/801109
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/base/package.use.mask | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2023-01-21 01:05:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ac8657f39e4ee421d2ee778ac4392ac03516b1d

commit 3ac8657f39e4ee421d2ee778ac4392ac03516b1d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-01-21 01:01:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-21 01:01:42 +0000

    profiles/base: unmask libffi[exec-static-trampoline]
    
    - >=dev-libs/gobject-introspection-1.72 fixed
    - >=dev-lang/ghc-9.0.2 fixed
    
    Closes: https://bugs.gentoo.org/801109
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/base/package.use.mask | 8 --------
 1 file changed, 8 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2023-01-21 02:37:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=427ed5358b2f145aa1d87b6eb2503396f41fbd68

commit 427ed5358b2f145aa1d87b6eb2503396f41fbd68
Author:     hololeap <hololeap@users.noreply.github.com>
AuthorDate: 2023-01-21 01:15:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-01-21 02:36:31 +0000

    dev-lang/ghc: depend on libffi[-exec-static-trampoline]
    
    The 8.10 line of ghc needs USE=exec-static-trampoline turned off on
    libffi. The fix exists in 9.0.2 and later versions of ghc.
    
    See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6155
    Bug: https://bugs.gentoo.org/801109
    Reported-by: Sam James <sam@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/29195
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/ghc/{ghc-8.10.6-r1.ebuild => ghc-8.10.6-r2.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)