When I emerge =dev-libs/ffcall-2.4 on Unmatched with USE='test' enabled, it would fail indefinitely. Specifically, at libffcall-2.4/vacall make check, with the following message: > /usr/lib/gcc/riscv64-unknown-linux-gnu/11.3.0/../../../../riscv64-unknown-linux-gnu/bin/ld: libvacall.a(vacall.o): relocation R_RISCV_HI20 against `vacall_function' can not be used when making a shared object; recompile with -fPIC > collect2: error: ld returned 1 exit status Make from source manually would end up with the same result.
Can you attach full build log and emerge --info for completeness?
To my knowledge, it seems that vacall only has non-PIC implementations for riscv systems precompiled and nowadays distributions have PIE/PIC enabled by default when possible, which leads to the test failure. Both patching riscv assembly source code or append -no-pie to Makefile could resolve this, but we might want the former solution as ebuild suggests that we want it to be position-independent.
Created attachment 777023 [details] emerge --info
Created attachment 777026 [details] build.log
(In reply to Jakov Smolić from comment #1) > Can you attach full build log and emerge --info for completeness? Done
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27474f966c5c419ea4fd3a7cb050071d0f9d84c6 commit 27474f966c5c419ea4fd3a7cb050071d0f9d84c6 Author: Raymond Wong <infiwang@pm.me> AuthorDate: 2022-05-08 15:57:29 +0000 Commit: Jakov Smolić <jsmolic@gentoo.org> CommitDate: 2022-05-08 19:27:55 +0000 dev-libs/ffcall-2.4: add vacall PIC support for Linux/riscv Patch is already done upstream, drop on next version bump. Closes: https://bugs.gentoo.org/842915 Signed-off-by: Raymond Wong <infiwang@pm.me> Closes: https://github.com/gentoo/gentoo/pull/25388 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org> dev-libs/ffcall/ffcall-2.4.ebuild | 7 +- .../ffcall/files/ffcall-2.4-vacall-riscv-pic.patch | 792 +++++++++++++++++++++ 2 files changed, 798 insertions(+), 1 deletion(-)