Summary: | >=x11-libs/gtk+-3.24.24-r1 fails to cross compile with error: /usr/aarch64-unknown-linux-gnu/usr/bin/glib-compile-resources: cannot execute binary file | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tt_1 <herrtimson> |
Component: | Current packages | Assignee: | Cross compilation support <cross> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | gnome, jstein, sam, tgyt |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://gitlab.gnome.org/GNOME/gtk/-/issues/4428 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
compressed build log
build.log for aarch64 target and x86_64 host aarch64-unknown-linux-gnu-emerge --info gtk and gnome2-utils patch gtk and gnome2-utils patch r2 gtk+.patch |
I've hit this again today, when I rebootstraped my armv7a rootfs *after* swapping dev-util/pkgconfig for dev-util/pkgconf the aarch64 rootfs always did have dev-util/pkgconf over the older dev-util/pkgconfig it also seeks those from host: /usr/bin/glib-genmarshal /usr/bin/glib-mkenums AARCH cross-compilation, x64 host, same you can symlink to workaround Created attachment 846318 [details]
build.log for aarch64 target and x86_64 host
gtk+-3.24.34 and bug is still here
Created attachment 846320 [details]
aarch64-unknown-linux-gnu-emerge --info
dev-libs/glib should be added to BDEPENDS because glib-compile-resources is used at build time. true, but you still have to symlink, don't you? Created attachment 849718 [details, diff]
gtk and gnome2-utils patch
Created attachment 849720 [details, diff]
gtk and gnome2-utils patch r2
Comment on attachment 849720 [details, diff] gtk and gnome2-utils patch r2 >--- eclass/gnome2-utils.eclass 2022-03-24 07:26:01.000000000 +0300 >+++ eclass/gnome2-utils.eclass 2023-02-02 18:40:03.037286456 +0300 >@@ -43,8 +43,12 @@ > # Path to scrollkeeper-update > : ${SCROLLKEEPER_UPDATE_BIN:="/usr/bin/scrollkeeper-update"} > >+# @ECLASS_VARIABLE: GLIB_COMPILE_RESOURCES >+# @DESCRIPTION: >+# Path to glib-compile-resources >+: ${GLIB_COMPILE_RESOURCES:="/usr/bin/glib-compile-resources"} >+ > # @ECLASS_VARIABLE: GLIB_COMPILE_SCHEMAS >-# @INTERNAL > # @DESCRIPTION: > # Path to glib-compile-schemas > : ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"} >--- x11-libs/gtk+/gtk+-3.24.35.ebuild 2022-12-22 14:40:40.000000000 +0300 >+++ x11-libs/gtk+/gtk+-3.24.35.ebuild 2023-02-02 18:38:24.408290811 +0300 >@@ -78,6 +78,7 @@ > vim-syntax? ( app-vim/gtk-syntax ) > " > BDEPEND=" >+ dev-libs/glib:2 > app-text/docbook-xml-dtd:4.1.2 > app-text/docbook-xsl-stylesheets > dev-libs/gobject-introspection-common >@@ -173,7 +174,7 @@ > ) > fi; > >- ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}" >+ ECONF_SOURCE=${S} GLIB_COMPILE_RESOURCES="${BROOT}${GLIB_COMPILE_RESOURCES}" gnome2_src_configure "${myconf[@]}" > > # work-around gtk-doc out-of-source brokedness > if multilib_is_native_abi; then >@@ -185,7 +186,7 @@ > } > > multilib_src_test() { >- "${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die >+ "${BROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die > GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx emake check > } > The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6022aa7ab8b1d4f20ecd67941f848e2505a0cf26 commit 6022aa7ab8b1d4f20ecd67941f848e2505a0cf26 Author: uis <uis9936@gmail.com> AuthorDate: 2023-02-13 13:59:48 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2023-02-13 14:01:20 +0000 gnome2-utils.eclass: Document GLIB_COMPILE_RESOURCES Also removed @INTERNAL for GLIB_COMPILE_SCHEMAS because it is already used outside of gnome2-utils. Bug: https://bugs.gentoo.org/779871 Signed-off-by: Matt Turner <mattst88@gentoo.org> eclass/gnome2-utils.eclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Created attachment 851244 [details, diff] gtk+.patch Signed-off-by: uis <uis9936@gmail.com> (In reply to tgyt from comment #13) > Created attachment 851244 [details, diff] [details, diff] > gtk+.patch > > Signed-off-by: uis <uis9936@gmail.com> Can you rebase this on .36 please? |
Created attachment 697011 [details] compressed build log x11-libs/gtk+:3 fails to cross compile to with amd64 host and arm64 target as follows: && echo timestamp > gdk/stamp-gc-h /usr/aarch64-unknown-linux-gnu/usr/bin/glib-compile-resources gdk.gresource.xml --target=gdkresources.h \ --sourcedir=/var/tmp/portage/portage/x11-libs/gtk+-3.24.26/work/gtk+-3.24.26/gdk --c-name _gdk --generate-header --manual-register --internal /usr/aarch64-unknown-linux-gnu/usr/bin/glib-compile-resources gdk.gresource.xml --target=gdkresources.c \ --sourcedir=/var/tmp/portage/portage/x11-libs/gtk+-3.24.26/work/gtk+-3.24.26/gdk --c-name _gdk --generate-source --manual-register --internal /usr/aarch64-unknown-linux-gnu/usr/bin/glib-compile-resources: /usr/aarch64-unknown-linux-gnu/usr/bin/glib-compile-resources: cannot execute binary file make[2]: *** [Makefile:2243: gdkresources.h] Error 126 make[2]: *** Waiting for unfinished jobs.... it seems as if the build is confused about where the cross compile prefix is and where $EROOT is, since it tries to execute foreign binary on the host. this can be worked around with removing the binary from the prefix, and symlinking the hosts /usr/bin/glib-compile-resources instead into the prefix. maybe gtk+ should check for /usr/bin/glib-compile-resources as it already does for /usr/bin/glib-compile-schemas with success