One of the files installed by dev-java/snappy is libsnappyjava dynamic library to be used through Java JNI. On a Linux it is "libsnappyjava.so", while on Mac it is "libsnappyjava.jnilib" Line 56 of snappy-1.1.0.1.ebuild reads: java-pkg_doso "${S}"/target/libsnappyjava.so This should be made system-specific to work on Mac (unfortunately using ${libname} would not work because the usual extension for dynamic libraries on a Mac is .dylib while this file, for some reason, is using extension.jnilib) If that line is changed, however, I am still getting "invalid install_name" error related to the same library file. Reproducible: Always Steps to Reproduce: 1. emerge -1 =dev-java/snappy-1.1.0.1 Note: my version of Java is the one which came with the Mac, not installed through Gentoo repositories.
Created attachment 505242 [details] build.log
Created attachment 505244 [details] emerge --info '=dev-java/snappy-1.1.0.1::localrepo'
Created attachment 505246 [details] emerge -pqv '=dev-java/snappy-1.1.0.1::localrepo'
Created attachment 505248 [details] snappy-1.1.0.1.ebuild with the .so extension changed to .jnilib
Created attachment 505250 [details] workaround snappy-1.1.0.1.ebuild Here is a work-around: it checks for $CNAME to be *-darwin* and if so, runs install_name_tool and java-pkg_doso for libsnappyjava.jnilib; otherwise the old code is run. Based on/inspired by the patch #474902 for bug #620328 by Shunsuke Shimizu <grafi@grafi.jp>
@java: to handle these kinds of things, this would require some function like get_libname (get_javalibname ?) that would encode the logic as laid out in the initial bit of this bug, in short, .jnilib on *-darwin* hosts, .dll on windows hosts, and .so on the rest. Would you accept a patch on the sort of this?
(In reply to Fabian Groffen from comment #6) > @java: to handle these kinds of things, this would require some function > like get_libname (get_javalibname ?) that would encode the logic as laid out > in the initial bit of this bug, in short, .jnilib on *-darwin* hosts, .dll > on windows hosts, and .so on the rest. Would you accept a patch on the > sort of this? Java is quite a "quiet" project. I'd go ahead.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d02c4bd0c03b2824f55cfff124de93ebccde8c2e commit d02c4bd0c03b2824f55cfff124de93ebccde8c2e Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2021-03-13 12:21:40 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2021-03-13 12:21:44 +0000 dev-java/snappy-1.1.0.1: fix for and marked ~x64-macos Closes: https://bugs.gentoo.org/638284 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Fabian Groffen <grobian@gentoo.org> dev-java/snappy/snappy-1.1.0.1.ebuild | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)