currently org.gnome.ShellSearchProvider2.xml is read from host machine and thus gnome-terminal with search_provider enabled can only be cross-compiled from a host system that has gnome-shell installed.
This patch would add a meson option to allow setting DBUS_INTERFACE_DIR manually to help cross-compiling 0001-meson-add-an-option-to-set-dbus_interface_dir.patch
Markus Volk (224c7b3e) at 07 Jan 13:01
meson: add an option to set dbus_interface_dir
This would be helpful for crosscompiling
Signed-off-by: Markus Volk f_l_k@t-online.de
That is interesting. I will create user access tokens in the future so as not to confuse people
Thanks for the merge
I have created a new access token between the two pushes ... more or less for experimentation. As said, I'm quite unfamiliar with the gitlab interface.
The push itself was done from terminal using "git push -f"
I forced pushed to adopt your requested changes. Dont do things often with gitlab, so maybe I did something wrong ?
Sure, changed accordingly
This fixes:
| ../glib-2.75.3/gio/tests/cxx.cpp: In function 'int main(int, char**)':
| ../glib-2.75.3/gio/tests/cxx.cpp:61:15: error: missing sentinel in function call [-Werror=format=]
| 61 | g_test_init (&argc, &argv, NULL);
if built with musl libc
Signed-off-by: Markus Volk f_l_k@t-online.de
gnome-settings uses pkgconfig to find gdesktop-enums.h https://github.com/GNOME/gnome-control-center/blob/4648296a706df83af984a918e5f14c3ece42f5fc/panels/background/meson.build#L22
Adding pc-sysrootdir to prefix would allow to find the file also if we have a user defined sysroot. This will fix cross compilation of gnome-control-center with yocto/openembedded that otherwise fails like this:
| ../gnome-control-center-43.2/panels/background/meson.build:27:0: ERROR: File /usr/include/gsettings-desktop-schemas/gdesktop-enums.h does not exist.
Signed-off-by: Markus Volk f_l_k@t-online.de
But you are right. Basically it will work with a meson.cross file as well like this:
EXTRA_OEMESON += "--cross-file=${WORKDIR}/meson-${PN}.cross"
do_write_config:append() {
cat >${WORKDIR}/meson-${PN}.cross <<EOF
[binaries]
gpg2 = '${bindir}/gpg2'
ssh-add = '${bindir}/ssh-add'
ssh-agent = '${bindir}/ssh-agent'
EOF
}
Once the -Dssh_agent option is enabled, the ssh binaries are searched automatically and fail like this:
| Program ssh-add found: NO | | ../gcr-4.0.0/meson.build:66:4: ERROR: Program 'ssh-add' not found or not executable
Openssh does not support pkgconfig which unfortunately complicates the openembedded usecase.
Unfortunately, this does not work for the openembedded use case. The sysroots are defined and created separately for each program. Basically there are two paths
${STAGING_BINDIR} expands to: /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/gcr/4.0.0-r0/recipe-sysroot/usr/bin/
${STAGING_BINDIR_NATIVE} expands to /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/gcr/4.0.0-r0/recipe-sysroot-native/usr/bin/
As far as I understand, in this case at build time the path is set to be used at runtime, right?
So I can't use either of the directories where the binaries can be found at build time, because the determined path would then be wrong.
Since it is already possible for gpg_path to specify the path as a meson option, I thought it would only be consistent to allow this for ssh-agent and ssh-add as well.
This would be helpful for crosscompiling
Signed-off-by: Markus Volk f_l_k@t-online.de
Thanks for the explanation. I updated to use POSIX basename and like you said it did fix the issue for musl also.
'basename' is undeclared for cplusplus if using musl. Utilize g_path_get_basename instead for better portability.
fdebug-prefix-map=TOPDIR/build/tmp/work/cortexa57-yoe-linux-musl/gparted/1.4.0-r0/ recipe-sysroot-native=-fvisibility-inlines-hidden -c -o Dialog_Disklabel.o ../../ gparted-1.4.0/src/Dialog_Disklabel.cc ../../gparted-1.4.0/src/BCache_Info.cc:52:33:
error: use of undeclared identifier 'basename'; did you mean 'g_basename'? return "/dev/" + Glib::ustring(basename(buf)); ^~~~~~~~ g_basename
yocto/open-embedded is a cross-compile environment to create embedded Linux distributions for many platforms. It is very complex and compiles almost all of the needed host/target packages itself. Very few tools are used from your build machine.
This might help to understand the concept and why things like cross-compiling gir could be done with it.
I can't explain how they do it in detail and for sure there happens some magic inside the lamp. But it's working quite well. Normally one would inherit the gobject-introspection.bbclass in yocto/oe.
https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/classes/gobject-introspection.bbclass
I decided not to do so for the gimp recipe. This class sets GIR_MESON_OPTION ?= 'introspection' and there is no such option anymore. I only included the missing packages to build gir.
gobject-introspection-native \
qemuwrapper-cross \
This is the current state of my gimp.bb. I only compiled gimp for aarch64 with it so far but its running great on my target rock-pi machine.
https://github.com/MarkusVolk/meta-wayland/blob/master/recipes-gimp/gimp/gimp_git.bb
Hello, i'm using yocto/oe build environment to create a wayland image. The shipped recipe for gimp in meta-oe is quite old, still utilizes gtk2 and doesn't run on wayland. This was my incentive to update the recipe. I used the latest development branch and switched the buildsystem to meson.
It was a quite pleasant ride, there were no bigger issues but i ran into a small problem with introspection build. There seems to be an option missing to enable introspection like it was with autotools. Meson tries to automatically decide if 'have_gobject_introspection = true' and makes this decision depending on whether we are cross-compiling. Yocto/oe is capable of creating gir even if cross-compiling but introspection gets disabled nevertheless and i didn't see an option to override that assume.
I don't know what would be the best way to fix this, but what i did to get introspection built was to patch meson like this:
From c8f73f57d63779cfaad140e0521be40972fbec8f Mon Sep 17 00:00:00 2001
From: Markus Volk <f_l_k@t-online.de>
Date: Wed, 1 Sep 2021 16:44:13 +0200
Subject: [PATCH] meson: make gir buildable
yocto/oe is capable of building gobject introspection despite cross-compiling.
add an option to enable gir build even if cross-compiling
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
libgimp/meson.build | 2 +-
meson_options.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgimp/meson.build b/libgimp/meson.build
index 9e7b4fbbe3..99614733d7 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -384,7 +384,7 @@ libgimpui_introspectable_files = [
libgimpwidgets_introspectable,
]
-if meson.is_cross_build()
+if meson.is_cross_build() and not get_option('can-crosscompile-gir')
have_gobject_introspection = false
gobject_introspection_warning = '\n '.join(['',
'GObject Introspection is disabled while cross-compiling because',
diff --git a/meson_options.txt b/meson_options.txt
index 7b6ad78045..c29fdb5b40 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -52,7 +52,7 @@ option('headless-tests', type: 'feature', value: 'auto', description: 'Use xv
option('gtk-doc', type: 'boolean', value: true, description: 'Build developer documentation')
option('gtk-doc-app', type: 'boolean', value: false, description: 'Build developer documentation for app')
option('g-ir-doc', type: 'boolean', value: false, description: 'Build developer documentation for introspected API')
-
+option('can-crosscompile-gir', type: 'boolean', value: false, description: 'GIR is buildable even if crosscompiling')
option('linux-input', type: 'feature', value: 'auto', description: 'Linux input event controller module')
option('vec-icons', type: 'boolean', value: true, description: 'Use vector icons rather than raster ones')
--
2.25.1
introspection now could be built and i was able to manually add those files to the package
FILES:${PN} += "
${datadir}/metainfo
${datadir}/gir-1.0
${datadir}/appdata \
${libdir}/girepository-1.0"