All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
@ 2020-08-13 23:23 aduskett at gmail.com
  2020-08-14  9:01 ` Michael Nosthoff
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: aduskett at gmail.com @ 2020-08-13 23:23 UTC (permalink / raw)
  To: buildroot

From: Adam Duskett <Aduskett@gmail.com>

Currently, if gobject-introspection is built before avahi, avahi will fail
to build with several undefined reference errors due to several .libs
directories not being in the PATH when linking the .gir file.

To resolve this issue, do the following if gobject-introspection is selected:
  - Add gobject-introspection to AVAHI_DEPENDENCIES
  - Add --enable-gobject to AVAHI_CONF_OPTS
  - Add the appropriate directories to GIR_EXTRA_LIBS_PATH.

Fixes:
http://autobuild.buildroot.net/results/b9bf7cea8be9231552a10e8ea828bf24394402ba
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
 package/avahi/avahi.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
index 73db37545f..3e858083af 100644
--- a/package/avahi/avahi.mk
+++ b/package/avahi/avahi.mk
@@ -94,6 +94,13 @@ else
 AVAHI_CONF_OPTS += --disable-glib --disable-gobject
 endif
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+AVAHI_DEPENDENCIES += gobject-introspection
+AVAHI_CONF_OPTS += --enable-gobject
+AVAHI_MAKE_ENV += \
+	GIR_EXTRA_LIBS_PATH="$(@D)/avahi-gobject/.libs:$(@D)/avahi-common/.libs:$(@D)/avahi-client/.libs:$(@D)/avahi-glib/.libs"
+endif
+
 ifeq ($(BR2_PACKAGE_PYTHON),y)
 AVAHI_CONF_ENV += \
 	am_cv_pathless_PYTHON=python \
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
  2020-08-13 23:23 [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection aduskett at gmail.com
@ 2020-08-14  9:01 ` Michael Nosthoff
  2020-08-14 11:39 ` Thomas Petazzoni
  2020-08-14 21:11 ` Thomas Petazzoni
  2 siblings, 0 replies; 8+ messages in thread
From: Michael Nosthoff @ 2020-08-14  9:01 UTC (permalink / raw)
  To: buildroot

Hi,

On Friday, August 14, 2020 01:23 CEST, aduskett at gmail.com wrote: 
 
> From: Adam Duskett <Aduskett@gmail.com>
> 
> Currently, if gobject-introspection is built before avahi, avahi will fail
> to build with several undefined reference errors due to several .libs
> directories not being in the PATH when linking the .gir file.

Happened only if BR2_PACKAGE_DBUS=y.

> 
> To resolve this issue, do the following if gobject-introspection is selected:
>   - Add gobject-introspection to AVAHI_DEPENDENCIES
>   - Add --enable-gobject to AVAHI_CONF_OPTS
>   - Add the appropriate directories to GIR_EXTRA_LIBS_PATH.
> 
> Fixes:
> http://autobuild.buildroot.net/results/b9bf7cea8be9231552a10e8ea828bf24394402ba
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Reviewed-by: Michael Nosthoff <buildroot@heine.tech>
Tested-by: Michael Nosthoff <buildroot@heine.tech>

Compile tested on x64 for cortex-a15 with toolchain-external-arm-arm.

Regards,
Michael

> ---
>  package/avahi/avahi.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
> index 73db37545f..3e858083af 100644
> --- a/package/avahi/avahi.mk
> +++ b/package/avahi/avahi.mk
> @@ -94,6 +94,13 @@ else
>  AVAHI_CONF_OPTS += --disable-glib --disable-gobject
>  endif
>  
> +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
> +AVAHI_DEPENDENCIES += gobject-introspection
> +AVAHI_CONF_OPTS += --enable-gobject
> +AVAHI_MAKE_ENV += \
> +	GIR_EXTRA_LIBS_PATH="$(@D)/avahi-gobject/.libs:$(@D)/avahi-common/.libs:$(@D)/avahi-client/.libs:$(@D)/avahi-glib/.libs"
> +endif
> +
>  ifeq ($(BR2_PACKAGE_PYTHON),y)
>  AVAHI_CONF_ENV += \
>  	am_cv_pathless_PYTHON=python \
> -- 
> 2.26.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
  2020-08-13 23:23 [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection aduskett at gmail.com
  2020-08-14  9:01 ` Michael Nosthoff
@ 2020-08-14 11:39 ` Thomas Petazzoni
  2020-08-14 19:27   ` Adam Duskett
  2020-08-14 21:11 ` Thomas Petazzoni
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2020-08-14 11:39 UTC (permalink / raw)
  To: buildroot

On Thu, 13 Aug 2020 16:23:51 -0700
aduskett at gmail.com wrote:

> +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
> +AVAHI_DEPENDENCIES += gobject-introspection
> +AVAHI_CONF_OPTS += --enable-gobject
> +AVAHI_MAKE_ENV += \
> +	GIR_EXTRA_LIBS_PATH="$(@D)/avahi-gobject/.libs:$(@D)/avahi-common/.libs:$(@D)/avahi-client/.libs:$(@D)/avahi-glib/.libs"

This really isn't very neat. Isn't there a better solution?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
  2020-08-14 11:39 ` Thomas Petazzoni
@ 2020-08-14 19:27   ` Adam Duskett
  2020-08-14 19:37     ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Duskett @ 2020-08-14 19:27 UTC (permalink / raw)
  To: buildroot

On Fri, Aug 14, 2020 at 4:39 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Thu, 13 Aug 2020 16:23:51 -0700
> aduskett at gmail.com wrote:
>
> > +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
> > +AVAHI_DEPENDENCIES += gobject-introspection
> > +AVAHI_CONF_OPTS += --enable-gobject
> > +AVAHI_MAKE_ENV += \
> > +     GIR_EXTRA_LIBS_PATH="$(@D)/avahi-gobject/.libs:$(@D)/avahi-common/.libs:$(@D)/avahi-client/.libs:$(@D)/avahi-glib/.libs"
>
> This really isn't very neat. Isn't there a better solution?
>
Maybe? But that's why the GIR_EXTRA_LABS_PATH macro exists, is for
situations just like this.

Adam
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
  2020-08-14 19:27   ` Adam Duskett
@ 2020-08-14 19:37     ` Thomas Petazzoni
  2020-08-31 20:13       ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2020-08-14 19:37 UTC (permalink / raw)
  To: buildroot

On Fri, 14 Aug 2020 12:27:46 -0700
Adam Duskett <aduskett@gmail.com> wrote:

> > This really isn't very neat. Isn't there a better solution?
> >  
> Maybe? But that's why the GIR_EXTRA_LABS_PATH macro exists, is for
> situations just like this.

It seems absolutely awful that within the build of a package this kind
of variable is needed. If it was to point to libraries installed by
other packages, why not. But here, the package build system itself is
not capable of finding its own libraries?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
  2020-08-13 23:23 [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection aduskett at gmail.com
  2020-08-14  9:01 ` Michael Nosthoff
  2020-08-14 11:39 ` Thomas Petazzoni
@ 2020-08-14 21:11 ` Thomas Petazzoni
  2020-08-31 14:01   ` Peter Korsgaard
  2 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2020-08-14 21:11 UTC (permalink / raw)
  To: buildroot

On Thu, 13 Aug 2020 16:23:51 -0700
aduskett at gmail.com wrote:

> From: Adam Duskett <Aduskett@gmail.com>
> 
> Currently, if gobject-introspection is built before avahi, avahi will fail
> to build with several undefined reference errors due to several .libs
> directories not being in the PATH when linking the .gir file.
> 
> To resolve this issue, do the following if gobject-introspection is selected:
>   - Add gobject-introspection to AVAHI_DEPENDENCIES
>   - Add --enable-gobject to AVAHI_CONF_OPTS
>   - Add the appropriate directories to GIR_EXTRA_LIBS_PATH.
> 
> Fixes:
> http://autobuild.buildroot.net/results/b9bf7cea8be9231552a10e8ea828bf24394402ba
> Signed-off-by: Adam Duskett <Aduskett@gmail.com>
> ---
>  package/avahi/avahi.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk
> index 73db37545f..3e858083af 100644
> --- a/package/avahi/avahi.mk
> +++ b/package/avahi/avahi.mk
> @@ -94,6 +94,13 @@ else
>  AVAHI_CONF_OPTS += --disable-glib --disable-gobject
>  endif
>  
> +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
> +AVAHI_DEPENDENCIES += gobject-introspection
> +AVAHI_CONF_OPTS += --enable-gobject

This is wrong. The gobject option is not about gobject-introspection.
From the configure.ac:

AC_ARG_ENABLE(gobject,
        AS_HELP_STRING([--disable-gobject],[Disable use of GLib GObject]),
        [case "${enableval}" in
                yes) HAVE_GOBJECT=yes ;;
                no)  HAVE_GOBJECT=no ;;
                *) AC_MSG_ERROR(bad value ${enableval} for --enable-gobject) ;;
        esac],
        [HAVE_GOBJECT=yes])

if test "x$HAVE_GOBJECT" = "xyes" ; then
        PKG_CHECK_MODULES(GOBJECT, [ glib-2.0 >= 2.4.0 gobject-2.0 ])
        AC_SUBST(GOBJECT_CFLAGS)
        AC_SUBST(GOBJECT_LIBS)
fi
AM_CONDITIONAL(HAVE_GOBJECT, test "x$HAVE_GOBJECT" = "xyes")

The proper option is --enable-introspection / --disable-introspection.

> +AVAHI_MAKE_ENV += \
> +	GIR_EXTRA_LIBS_PATH="$(@D)/avahi-gobject/.libs:$(@D)/avahi-common/.libs:$(@D)/avahi-client/.libs:$(@D)/avahi-glib/.libs"

I see OpenEmbedded is doing the same thing:
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/avahi/avahi.inc?h=rocko#n73

Still, I find that atrocious :-/

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
  2020-08-14 21:11 ` Thomas Petazzoni
@ 2020-08-31 14:01   ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2020-08-31 14:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

Hi,

 >> +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
 >> +AVAHI_DEPENDENCIES += gobject-introspection
 >> +AVAHI_CONF_OPTS += --enable-gobject

 > This is wrong. The gobject option is not about gobject-introspection.
 > From the configure.ac:

 > AC_ARG_ENABLE(gobject,
 >         AS_HELP_STRING([--disable-gobject],[Disable use of GLib GObject]),
 >         [case "${enableval}" in
 >                 yes) HAVE_GOBJECT=yes ;;
 >                 no)  HAVE_GOBJECT=no ;;
 >                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-gobject) ;;
 >         esac],
 >         [HAVE_GOBJECT=yes])

 > if test "x$HAVE_GOBJECT" = "xyes" ; then
 >         PKG_CHECK_MODULES(GOBJECT, [ glib-2.0 >= 2.4.0 gobject-2.0 ])
 >         AC_SUBST(GOBJECT_CFLAGS)
 >         AC_SUBST(GOBJECT_LIBS)
 > fi
 > AM_CONDITIONAL(HAVE_GOBJECT, test "x$HAVE_GOBJECT" = "xyes")

 > The proper option is --enable-introspection / --disable-introspection.

 >> +AVAHI_MAKE_ENV += \
 >> +	GIR_EXTRA_LIBS_PATH="$(@D)/avahi-gobject/.libs:$(@D)/avahi-common/.libs:$(@D)/avahi-client/.libs:$(@D)/avahi-glib/.libs"

 > I see OpenEmbedded is doing the same thing:
 > http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/avahi/avahi.inc?h=rocko#n73

 > Still, I find that atrocious :-/

Agreed. I haven't seen any updates on this, but we need to fix the build
issues for 2020.08, so I've sent a patch to simply disable introspection
support:

https://patchwork.ozlabs.org/project/buildroot/patch/20200831140035.5880-1-peter at korsgaard.com/

We can then refine it later to add introspection support once the issues
have been fixed for next.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection
  2020-08-14 19:37     ` Thomas Petazzoni
@ 2020-08-31 20:13       ` Yann E. MORIN
  0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2020-08-31 20:13 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2020-08-14 21:37 +0200, Thomas Petazzoni spake thusly:
> On Fri, 14 Aug 2020 12:27:46 -0700
> Adam Duskett <aduskett@gmail.com> wrote:
> 
> > > This really isn't very neat. Isn't there a better solution?
> > >  
> > Maybe? But that's why the GIR_EXTRA_LABS_PATH macro exists, is for
> > situations just like this.
> 
> It seems absolutely awful that within the build of a package this kind
> of variable is needed. If it was to point to libraries installed by
> other packages, why not. But here, the package build system itself is
> not capable of finding its own libraries?

Remember that this is GOI we are speaking of, here! ;-)

More seriously, though, remember that this is also going through the
wrappers, backed by qemu because this is executing foreign code...

And again, GOI. Meh... ;-]

Regards,
Yann E. MORIN.

> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-31 20:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 23:23 [Buildroot] [PATCH 1/1] package/avahi: fix building against gobject-introspection aduskett at gmail.com
2020-08-14  9:01 ` Michael Nosthoff
2020-08-14 11:39 ` Thomas Petazzoni
2020-08-14 19:27   ` Adam Duskett
2020-08-14 19:37     ` Thomas Petazzoni
2020-08-31 20:13       ` Yann E. MORIN
2020-08-14 21:11 ` Thomas Petazzoni
2020-08-31 14:01   ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.