description is below Reproducible: Always Steps to Reproduce: 1. setup cross-compiler 2. emerge-armv7a-unknown-linux-gnueabihf -av llvm 3. dev-lang/perl gets pulled in, alongside perl-cleaner and sys-apps/portage Actual Results: the compile is going to stop at sys-apps/portage, as it still fails to cross-compile. Expected Results: none of those should get pulled in, they're not compile time dependencies: [ebuild N ] sys-devel/llvm-common-8.0.1::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ 0 KiB [ebuild N ] dev-libs/iniparser-3.1-r1::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="-doc -examples -static-libs" 0 KiB [ebuild N ] app-portage/portage-utils-0.74::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="-nls -static" 0 KiB [ebuild N ] dev-lang/perl-5.28.2-r1:0/5.28::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="berkdb gdbm -debug -doc -ithreads" 0 KiB [ebuild N ] app-admin/perl-cleaner-2.27::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ 0 KiB [ebuild N ] virtual/perl-Data-Dumper-2.170.0::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ 0 KiB [ebuild N ] virtual/perl-Test-Harness-3.420.0-r1::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ 0 KiB [ebuild N ] perl-core/File-Temp-0.230.400-r1::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ 0 KiB [ebuild N ] virtual/perl-File-Temp-0.230.400-r5::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ 0 KiB [ebuild R *] sys-devel/llvm-9.0.0.9999:9::gentoo to /usr/armv7a-unknown-linux-gnueabihf/ USE="gold libffi ncurses -debug -doc -exegesis -libedit -test -xar -xml -z3" LLVM_TARGETS="(ARM) WebAssembly -AArch64 -AMDGPU -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -X86 -XCore" 0 KiB that's also true for llvm-common, strictly speaking it's a runtime dependency, needed on the hosts side.
I'm not cross-compiling myself, so please supply a patch.
thanks for your fast answer, I'll provide a patch as soon as I can find the reason. It's a bit of a head scratcher though, moving dev-lang/perl to RDEPEND isn't working. Since llvm-9.x is EAPI=7, I might try to fix this via BDEPEND: https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html#build-time-dependencies-split-into-depend-and-bdepend
Created attachment 589968 [details, diff] patch for llvm-9.x and llvm-10.x how about this?
It looks fine. Did you test that it works without perl installed in your chost tree? There are probably more deps that need to be moved but one's still progress x).
Yes, I did test this right after your confirmation. I emerge llvm-9.0.9999 on the host, with the patch I removed cross compiled chost tree and bootstraped it from scratch I emerged llvm-9.0.9999 to the newly bootrstraped chost tree, with the patch all of this went fine without any problem.
I know the patch is kinda trivial but I'd use your Signed-off-by on it.
yeah, I'll bake one with correct sign-off in the evening.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17d10010f7e4578ed704a2672c952b18f569727c commit 17d10010f7e4578ed704a2672c952b18f569727c Author: stefson <herrtimson@yahoo.de> AuthorDate: 2019-09-16 07:00:02 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-09-16 15:05:27 +0000 sys-devel/llvm: move dev-lang/perl to BDEPEND wrt #694460 dev-lang/perl is a build time dependency of llvm, only during cross compile it must be run by the host (CBUILD) and not the target (CHOST). Moving it to BDEPEND solves the issue of dev-lang/perl and friends getting pulled into the dependency graph as compile time dependencies during cross compile. BDEPEND has been introduced in EAPI=7, so the fix is only possible for >=llvm-9.x Closes: https://bugs.gentoo.org/694460 Signed-off-by: Steffen Kuhn <nielson2@yandex.com> Closes: https://github.com/gentoo/gentoo/pull/12941 Signed-off-by: Michał Górny <mgorny@gentoo.org> sys-devel/llvm/llvm-10.0.0.9999.ebuild | 2 +- sys-devel/llvm/llvm-9.0.0.9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)