There is a dependency loop librsvg->pango->dekstop-file-utils->emacs->librsvg when cross-compiling Emacs that seems to be from an incorrect dependency. The desktop-file-utils ebuilds have emacs in DEPEND (to put it in the cross-compiled root), but the elisp-common eclass defines EMACS=${EPREFIX}/usr/bin/emacs which would be provided by BDEPEND. The eclass natively executes emacs to compile elisp files, so the ebuild should not depend on the cross-compiled version. Reproducible: Always Steps to Reproduce: 1. USE='emacs gui svg' cross-emerge -v emacs Actual Results: * Error: circular dependencies: (gnome-base/librsvg-2.40.21:2/2::gentoo, ebuild scheduled for merge to '/usr/armv5tel-gentoo-linux-gnueabi/') depends on (x11-libs/pango-1.44.7:0/0::gentoo, ebuild scheduled for merge to '/usr/armv5tel-gentoo-linux-gnueabi/') (runtime) (dev-util/desktop-file-utils-0.26:0/0::gentoo, ebuild scheduled for merge to '/usr/armv5tel-gentoo-linux-gnueabi/') (buildtime) (app-editors/emacs-27.1-r1:27/27::gentoo, ebuild scheduled for merge to '/usr/armv5tel-gentoo-linux-gnueabi/') (runtime) (gnome-base/librsvg-2.40.21:2/2::gentoo, ebuild scheduled for merge to '/usr/armv5tel-gentoo-linux-gnueabi/') (buildtime) Or if you set USE=-emacs to resolve the loop first and then rebuild desktop-file-utils with USE=emacs, it fails to compile since Emacs was not installed in ROOT=/: * elisp-emacs-version: Failed to run /usr/bin/emacs * ERROR: dev-util/desktop-file-utils-0.24::gentoo failed (compile phase): * Could not determine Emacs version * * Call stack: * ebuild.sh, line 125: Called src_compile * environment, line 662: Called elisp-compile 'misc/desktop-entry-mode.el' * environment, line 451: Called elisp-check-emacs-version * environment, line 433: Called die * The specific snippet of code: * have_emacs=$(elisp-emacs-version) || die "Could not determine Emacs version"; Expected Results: It should build and install. It also needs to take emacs out of RDEPEND to fix the dependency loop, but that does not appear to be an issue because USE=emacs only causes it to compile and install some elisp files (i.e. running desktop-file-utils itself does not depend on Emacs). Putting emacs in PDEPEND (or dropping it altogether) fixes everything. --- dev-util/desktop-file-utils/desktop-file-utils-0.26.ebuild +++ dev-util/desktop-file-utils/desktop-file-utils-0.26.ebuild @@ -13,10 +13,11 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" IUSE="emacs" -RDEPEND=">=dev-libs/glib-2.12:2 - emacs? ( >=app-editors/emacs-23.1:* )" -DEPEND="${RDEPEND}" +DEPEND=">=dev-libs/glib-2.12:2" +RDEPEND="${DEPEND}" +PDEPEND="emacs? ( >=app-editors/emacs-23.1:* )" BDEPEND=" + emacs? ( >=app-editors/emacs-23.1:* ) app-arch/xz-utils virtual/pkgconfig "
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=856232121e36d2c73bc8a01d0518e69f345550e8 commit 856232121e36d2c73bc8a01d0518e69f345550e8 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-11-28 17:14:29 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-11-28 17:14:29 +0000 dev-util/desktop-file-utils: move emacs to BDEPEND Closes: https://bugs.gentoo.org/751775 Signed-off-by: Mike Gilbert <floppym@gentoo.org> ...sktop-file-utils-0.26.ebuild => desktop-file-utils-0.26-r1.ebuild} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
commit b5340fc8a3a71cca6161fddfbcf9db982965b7ee Author: Sam James <sam@gentoo.org> Date: Fri Jan 5 09:38:32 2024 +0000 dev-util/desktop-file-utils: move Emacs files to app-emacs/desktop-entry-mode Bug: https://bugs.gentoo.org/921333 Signed-off-by: Sam James <sam@gentoo.org> commit 50a7f72871ffc4a535cf555aaf49ce95eb67d710 Author: Sam James <sam@gentoo.org> Date: Fri Jan 5 09:35:57 2024 +0000 app-emacs/desktop-entry-mode: new package split out from dev-util/desktop-file-utils[emacs], add 0.27 Split out from dev-util/desktop-file-utils[emacs] to help break a circular dep with USE=emacs: ``` (dev-util/desktop-file-utils-0.27:0/0::gentoo, ebuild scheduled for merge) depends on (app-editors/emacs-29.1-r6:29/29::gentoo, ebuild scheduled for merge) (buildtime) (x11-libs/gtk+-3.24.38:3/3::gentoo, ebuild scheduled for merge) (buildtime) (dev-util/desktop-file-utils-0.27:0/0::gentoo, ebuild scheduled for merge) (runtime) It might be possible to break this cycle by applying any of the following changes: - dev-util/desktop-file-utils-0.27 (Change USE: -emacs) - app-editors/emacs-29.1-r6 (Change USE: -gui) - app-editors/emacs-29.1-r6 (Change USE: -gtk) ``` Bug: https://bugs.gentoo.org/921333 Signed-off-by: Sam James <sam@gentoo.org>