When using musl, libselinux depends on fts-standalone, which block glibc. Since the ebuild is using EAPI 6, emerge without --root-deps=rdeps installs DEPENDs into both the sysroot and build root. That prevents using a glibc system to build the musl selinux profile in a sysroot. Reproducible: Always Steps to Reproduce: 1. emerge -v sys-libs/libselinux # with a musl sysroot profile Actual Results: This blocks emerge: (sys-libs/fts-standalone-1.2.7:0/0::gentoo, ebuild scheduled for merge) pulled in by sys-libs/fts-standalone required by (sys-libs/libselinux-3.0:0/0::gentoo, ebuild scheduled for merge to '/usr/x86_64-gentoo-linux-musl/') USE="(python) -pcre2 -ruby -static-libs" PYTHON_TARGETS="python3_7 -python3_6 -python3_8 (-python3_9)" RUBY_TARGETS="ruby25 (-ruby24) (-ruby26)" Expected Results: It should build and install. Version 3.1 was released a couple days ago, so maybe it can just be bumped with the upgrade. https://github.com/SELinuxProject/selinux/releases/tag/libselinux-3.1 Here is the quick change I used to verify it works properly with EAPI 7: --- a/sys-libs/libselinux/libselinux-3.0.ebuild +++ b/sys-libs/libselinux/libselinux-3.0.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 PYTHON_COMPAT=( python3_{6..9} ) USE_RUBY="ruby24 ruby25 ruby26" @@ -40,7 +40,8 @@ ruby_targets_ruby26? ( dev-lang/ruby:2.6 ) ) elibc_musl? ( sys-libs/fts-standalone )" -DEPEND="${RDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" virtual/pkgconfig python? ( >=dev-lang/swig-2.0.9 ) ruby? ( >=dev-lang/swig-2.0.9 )"
Well, https://github.com/gentoo/gentoo/commit/b9167517361eb4648f7952dff072763cb6627262 bumped libselinux to EAPI 7, but the dependencies are messed up because nobody added BDEPEND. (Same for all the other SELinux packages.) This did get the libc blocker dep out of the CBUILD root, though, so I guess I'll close this issue and complain about BDEPEND later.