• Bug#1103916: gnome-recipes FTCBFS: requires a cross exe_wrapper

    From Helmut Grohne@21:1/5 to All on Tue Apr 22 22:20:01 2025
    Source: gnome-recipes
    Version: 2.0.4-3
    Tags: patch upstream
    User: debian-cross@lists.debian.org
    Usertags: ftcbfs

    gnome-recipes fails to cross build from source, because it needs to run tools/recipe-extract.c during build. Presently, it compiles it as a host executable and expects an exe_wrapper to run it. That tends to be qemu.
    In this case, we can avoid that qemu dependency by compiling it as a
    native executable instead. Doing so incurs and extra Build-Depends on libglib2.0-dev:native, but I think that's the better option. I'm
    attaching the patch to turn recipe-extract native. Please consider
    forwarding it upstream and applying it.

    Helmut

    --- gnome-recipes-2.0.4.orig/tools/meson.build
    +++ gnome-recipes-2.0.4/tools/meson.build
    @@ -1,3 +1,6 @@
    +native_deps = [ dependency('glib-2.0', native: true) ]
    +
    recipe_extract = executable('recipe-extract', 'recipe-extract.c',
    include_directories : top_inc,
    - dependencies: deps)
    + dependencies: native_deps,
    + native: true)
    --- gnome-recipes-2.0.4.orig/tools/recipe-extract.c
    +++ gnome-recipes-2.0.4/tools/recipe-extract.c
    @@ -18,8 +18,6 @@
    * along with this program. If not, see <http://www.gnu.org/licenses/>.
    */

    -#include "config.h"
    -
    #include <locale.h>

    #include <glib.h>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Jeremy_B=C3=ADcha?=@21:1/5 to helmut@subdivi.de on Tue Apr 22 23:00:01 2025
    On Tue, Apr 22, 2025 at 4:18 PM Helmut Grohne <helmut@subdivi.de> wrote:
    gnome-recipes fails to cross build from source, because it needs to run tools/recipe-extract.c during build. Presently, it compiles it as a host executable and expects an exe_wrapper to run it. That tends to be qemu.
    In this case, we can avoid that qemu dependency by compiling it as a
    native executable instead. Doing so incurs and extra Build-Depends on libglib2.0-dev:native, but I think that's the better option. I'm
    attaching the patch to turn recipe-extract native. Please consider
    forwarding it upstream and applying it.

    The meson.build part of your patch was already applied upstream years
    ago. (gnome-recipes hasn't had an upstream release since 2020.)

    https://gitlab.gnome.org/GNOME/recipes/-/commit/3ad8307

    It is missing your removal of #include "config.h" . What is the
    significance of that change? Is the change necessary here?

    Thank you,
    Jeremy Bícha

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to All on Wed Apr 23 07:40:01 2025
    Hi Jeremy,

    On Tue, Apr 22, 2025 at 04:47:28PM -0400, Jeremy Bícha wrote:
    The meson.build part of your patch was already applied upstream years
    ago. (gnome-recipes hasn't had an upstream release since 2020.)

    https://gitlab.gnome.org/GNOME/recipes/-/commit/3ad8307

    Sorry for not having checked.

    It is missing your removal of #include "config.h" . What is the
    significance of that change? Is the change necessary here?

    The config.h files usually contains architecture-specific properties. It
    may even #include other headers that are only available for a particular architecture. Keeping it bears a risk of things failing subtly. By not #including it and knowing that it works anyway, we generally eliminate
    that risk. It's not a critical aspect but more like making sure it works
    in future.

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)