Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915086 - dev-libs/libffi-3.4.4-r1 fails to link with clang-17: error: version script assignment of 'LIBFFI_BASE_8.0' to symbol 'ffi_java_raw_call' failed: symbol not defined
Summary: dev-libs/libffi-3.4.4-r1 fails to link with clang-17: error: version script a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LD-is-lld, systemwide-lld 912821
  Show dependency tree
 
Reported: 2023-10-02 19:27 UTC by ppw0
Modified: 2023-12-13 01:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (dev-libs:libffi-3.4.4-r1:20231002-192437.log,29.25 KB, text/x-log)
2023-10-02 19:27 UTC, ppw0
Details
emerge --info (emerge_info.log,7.36 KB, text/x-log)
2023-10-02 19:27 UTC, ppw0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-10-02 19:27:29 UTC
Created attachment 872052 [details]
build log

In a clang-17[default-libcxx] environment, trying to emerge libffi-3.4.4-r1 fails during the linking phase:
---
x86_64-pc-linux-gnu-ld: error: version script assignment of 'LIBFFI_BASE_8.0' to symbol 'ffi_java_raw_call' failed: symbol not defined
x86_64-pc-linux-gnu-ld: error: version script assignment of 'LIBFFI_CLOSURE_8.0' to symbol 'ffi_prep_java_raw_closure' failed: symbol not defined
x86_64-pc-linux-gnu-ld: error: version script assignment of 'LIBFFI_CLOSURE_8.0' to symbol 'ffi_prep_java_raw_closure_loc' failed: symbol not defined
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:1102: libffi.la] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4-abi_x86_32.x86'
make[1]: *** [Makefile:1397: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-libs/libffi-3.4.4-r1/work/libffi-3.4.4-abi_x86_32.x86'
make: *** [Makefile:625: all] Error 2
---

This error can be bypassed by issuing "-Wl,--undefined-version" to LDFLAGS.

Attaching logs.
Comment 1 ppw0 2023-10-02 19:27:53 UTC
Created attachment 872053 [details]
emerge --info
Comment 2 Larry the Git Cow gentoo-dev 2023-12-13 01:54:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f1da16cf19f06d8a7930165976a0b7c1d76262e

commit 6f1da16cf19f06d8a7930165976a0b7c1d76262e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-13 01:53:21 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-13 01:53:21 +0000

    dev-libs/libffi: backport lld 17 fix
    
    Closes: https://bugs.gentoo.org/915086
    Bug: https://bugs.gentoo.org/912034
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/libffi/files/libffi-3.4.4-lld-17.patch | 34 ++++++++++
 dev-libs/libffi/libffi-3.4.4-r3.ebuild          | 82 +++++++++++++++++++++++++
 2 files changed, 116 insertions(+)