When building dev-libs/nss in a crossdev environment, emerge fails with the error shlibsign: command not found, after dev-libs/nss is build on the crossdev host and subsequently dev-libs/nss is built in the crossdev environment, the build is successful, I assume adding dev-libs/nss to the IDEPEND of itself for crossdev would solve the issue. This error occurs on all the versions in the current gentoo repo 3.111 3.110 3.101.3 and 3.101.2 Reproducible: Always
Created attachment 929289 [details] Failed build log from cross environment
IDEPEND is inappropriate. That is for programs called in pkg_preinst/pkg_postinst. This failure is occurring during the compile phase, so BDEPEND would be the appropriate variable. However, adding dev-libs/nss to BDEPEND will cause a circular dependency error when not cross-compiling. I don't think we have a good way to solve this; it would require a special USE flag to be set when cross-compiling or a change to PMS.
Sometimes it's feasible to just build the bit you need with the CBUILD toolchain. I haven't looked yet, but that's probably not straightforward enough in this case. I have had a PMS change planned, but I haven't filled a bug for it yet. Thanks for the nudge.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0485de10cb637ace71a547a16c21f6a7e3e5d5ca commit 0485de10cb637ace71a547a16c21f6a7e3e5d5ca Author: Andrei Horodniceanu <a.horodniceanu@proton.me> AuthorDate: 2025-05-23 10:03:56 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2025-05-23 14:16:24 +0000 dev-libs/nss: Don't call shlibsign during cross-builds Passing CROSS_COMPILE=1 to make prevents the build from calling shlibsign, which can fail in a cross-environment since CBUILD may not have dev-libs/nss installed. Closes: https://bugs.gentoo.org/956431 Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me> Part-of: https://github.com/gentoo/gentoo/pull/42225 Closes: https://github.com/gentoo/gentoo/pull/42225 Signed-off-by: Joonas Niilola <juippis@gentoo.org> dev-libs/nss/nss-3.111.ebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)