Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Olivier Schonken <olivier.schonken@gmail.com>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>,
	Adam Duskett <aduskett@gmail.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2, 1/1] package/poppler: fix introspection build
Date: Sun, 16 Apr 2023 10:25:56 +0200	[thread overview]
Message-ID: <20230416082556.GW2819@scaer> (raw)
In-Reply-To: <CADvTj4o4dPhWnKiQ0dvm6cJSqwY+ZtbyE0Gwhh8A5Nc5dKPYOQ@mail.gmail.com>

James, All,

On 2023-04-15 20:44 -0600, James Hilliard spake thusly:
> On Sat, Apr 15, 2023 at 3:30 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
[--SNIP--]
> > However, I would really like to understand why we don't have more
> > packages that are broken. Is it because poppler is the only one with
> > include directives in his gir file, which means it needs access to the
> > installed gir files from other packages (those from goi)?
> >
> > Or is it because it is the only one that already passes an explicit
> > --includedir option to g-ir-compiler, and that disables searching the
> > standard directory?
> 
> From the looks of it most of our packages with a gobject-introspection
> dependency are meson based which use the native meson integration.

Ah, good point, that would explain.

We have 33 (target) packages that use meson, and 12 that don't; that's
25%, not a small part. But lets look at those:

    $ grep -E '\$\(eval \$\([^-]+-package\)\)' \
        $(git grep -l gobject-introspection '*.mk') \
      |grep -v meson
    package/gconf/gconf.mk:$(eval $(autotools-package))
    package/libffi/libffi.mk:$(eval $(autotools-package))
    package/libgee/libgee.mk:$(eval $(autotools-package))
    package/libgtk2/libgtk2.mk:$(eval $(autotools-package))
    package/libostree/libostree.mk:$(eval $(autotools-package))
    package/libqrtr-glib/libqrtr-glib.mk:$(eval $(autotools-package))
    package/librsvg/librsvg.mk:$(eval $(autotools-package))
    package/libvips/libvips.mk:$(eval $(autotools-package))
    package/midori/midori.mk:$(eval $(cmake-package))
    package/nodejs/nodejs.mk:$(eval $(generic-package))
    package/poppler/poppler.mk:$(eval $(cmake-package))
    package/webkitgtk/webkitgtk.mk:$(eval $(cmake-package))

So, a generic, 3 cmake, the rest is autotools.

  - poppler we just fixed

  - nodejs is a false positive, goi only appears in a comment.

  - midori hasn't failed since 2021-08-22, but hasn't succeed since
    2020-04-19 either... The last config that had midori enabled was in
    2022-10-19 and failed for another reason. I've started a build
    locally...

  - webkitgtk hasn't failed since 2022-11-13, but hasn't succeeded since
    2021-12-07 either... There have been recent configs with webkitgtk
    enabled since 2022-11-13, but they failed for other reasons. I've
    started a build here...

  - I got bored investigating on the autotools packages, so I started a
    build here, with as many enabled as possible (a few were missing
    arch supports, as I'm resuing the failed config as reported by
    Fabrice, which is on riscv...)

> https://gi.readthedocs.io/en/latest/buildsystems/meson.html
> From my understanding there is no standardized cmake
> gobject-introspection integration so there's more likely to be bugs that only
> affect say one package for cmake packages.

OK, that makes sense: the poppler fix is really an exception, so we do
not need to catter for that in the wrapper.

Thanks for your feedback!

Regards,
Yann E. MORIN.

> > As Thomas also suggested, should we be doing that systematically in our
> > g-ir-compiler wrapper?
> 
> I'm thinking it's probably not needed as it's likely a package specific issue
> and could interfere with meson's gobject-introspection integration.
> 
> >
> > I know Adam said your change was "the simplest solution to the problem".
> > Still, this is not very satisfying...
> >
> > Regards,
> > Yann E. MORIN.
> >
> > > ---
> > > Changes v1 -> v2:
> > >  - Rebase on top of master
> > >  - Use upstream commit
> > >
> > >  ...txt-allow-the-user-to-configure-INTR.patch | 43 +++++++++++++++++++
> > >  package/poppler/poppler.mk                    |  3 +-
> > >  2 files changed, 45 insertions(+), 1 deletion(-)
> > >  create mode 100644 package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch
> > >
> > > diff --git a/package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch b/package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch
> > > new file mode 100644
> > > index 0000000000..079cf7234d
> > > --- /dev/null
> > > +++ b/package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch
> > > @@ -0,0 +1,43 @@
> > > +From e9d5731ba254f35e2d94b628c51e48c50a945271 Mon Sep 17 00:00:00 2001
> > > +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > +Date: Mon, 24 Jan 2022 09:28:20 +0100
> > > +Subject: [PATCH] glib/CMakeLists.txt: allow the user to configure
> > > + INTROSPECTION_COMPILER_ARGS
> > > +
> > > +Allow the user to add its own parameters such as
> > > +--includedir=$(STAGING_DIR)/usr/share/gir-1.0 to
> > > +INTROSPECTION_COMPILER_ARGS to avoid the following build failure when
> > > +cross-compiling with buildroot:
> > > +
> > > +[ 98%] Generating Poppler-0.18.typelib
> > > +Could not find GIR file 'GObject-2.0.gir'; check XDG_DATA_DIRS or use --includedir
> > > +error parsing file /home/giuliobenetti/autobuild/run/instance-1/output-1/build/poppler-21.12.0/glib/Poppler-0.18.gir: Failed to parse included gir GObject-2.0
> > > +If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help.
> > > +Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"
> > > +
> > > +Fixes:
> > > + - http://autobuild.buildroot.org/results/d2f50aa56410c2fff8a0538c57038104906e747e
> > > +
> > > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > +[Retrieved from:
> > > +https://gitlab.freedesktop.org/poppler/poppler/-/commit/e9d5731ba254f35e2d94b628c51e48c50a945271]
> > > +---
> > > + glib/CMakeLists.txt | 2 +-
> > > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > > +
> > > +diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
> > > +index 7510e69ee..f5130e3c9 100644
> > > +--- a/glib/CMakeLists.txt
> > > ++++ b/glib/CMakeLists.txt
> > > +@@ -119,7 +119,7 @@ if (HAVE_INTROSPECTION AND BUILD_SHARED_LIBS)
> > > +   # General gir: Reset object-list for introspection & load tool args
> > > +   set(INTROSPECTION_GIRS)
> > > +   set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}" "--warn-all")
> > > +-  set(INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}")
> > > ++  set(INTROSPECTION_COMPILER_ARGS ${INTROSPECTION_COMPILER_ARGS} "--includedir=${CMAKE_CURRENT_SOURCE_DIR}")
> > > +
> > > +   # Poppler: Assign package to gir & export keys
> > > +   set(Poppler_0_18_gir "poppler-glib")
> > > +--
> > > +GitLab
> > > +
> > > diff --git a/package/poppler/poppler.mk b/package/poppler/poppler.mk
> > > index b54262e7c4..db6da25d39 100644
> > > --- a/package/poppler/poppler.mk
> > > +++ b/package/poppler/poppler.mk
> > > @@ -47,7 +47,8 @@ POPPLER_DEPENDENCIES += gobject-introspection
> > >  POPPLER_CONF_OPTS += \
> > >       -DENABLE_GOBJECT_INTROSPECTION=ON \
> > >       -DINTROSPECTION_SCANNER=$(STAGING_DIR)/usr/bin/g-ir-scanner \
> > > -     -DINTROSPECTION_COMPILER=$(STAGING_DIR)/usr/bin/g-ir-compiler
> > > +     -DINTROSPECTION_COMPILER=$(STAGING_DIR)/usr/bin/g-ir-compiler \
> > > +     -DINTROSPECTION_COMPILER_ARGS="--includedir=$(STAGING_DIR)/usr/share/gir-1.0"
> > >  else
> > >  POPPLER_CONF_OPTS += -DENABLE_GOBJECT_INTROSPECTION=OFF
> > >  endif
> > > --
> > > 2.35.1
> > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot@buildroot.org
> > > https://lists.buildroot.org/mailman/listinfo/buildroot
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > '------------------------------^-------^------------------^--------------------'
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-04-16  8:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 10:17 [Buildroot] [PATCH v2, 1/1] package/poppler: fix introspection build Fabrice Fontaine
2022-08-14 10:37 ` Thomas Petazzoni via buildroot
2022-08-20  9:28   ` Thomas Petazzoni via buildroot
2022-09-21 17:38     ` Adam Duskett
2022-09-21 20:41       ` Fabrice Fontaine
2022-09-27 18:33         ` Adam Duskett
2023-04-15 21:29 ` Yann E. MORIN
2023-04-16  2:44   ` James Hilliard
2023-04-16  8:25     ` Yann E. MORIN [this message]
2023-04-16 11:16       ` Yann E. MORIN
2023-04-18  8:03         ` James Hilliard
2023-04-18 17:44           ` Yann E. MORIN
2023-04-18 21:58             ` James Hilliard
2023-04-19 19:50               ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230416082556.GW2819@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=aduskett@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=james.hilliard1@gmail.com \
    --cc=olivier.schonken@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox