All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libglib2: fix util-linux-libs dependency
@ 2020-11-01 12:15 Fabrice Fontaine
  2020-11-01 13:03 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2020-11-01 12:15 UTC (permalink / raw)
  To: buildroot

Commit 2acaa86ce630f616b12aa92493e0269421c5bc97 replaced util-linux by
util-linux-libs but this raises the following build failure:

Makefile:585: *** util-linux-libs is in the dependency chain of libglib2 that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in.  Stop.

To fix this build failure, use util-linux or util-linux-libs depending
on BR2_PACKAGE_UTIL_LINUX_LIBS

Fixes:
 - http://autobuild.buildroot.org/results/8bf6360a343edd10c73a756ab86cdba727f9ea43

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libglib2/libglib2.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 43fcb27fae..6e9dbd7b26 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -86,8 +86,12 @@ endif
 
 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
 LIBGLIB2_CONF_OPTS += -Dlibmount=enabled
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS),y)
 LIBGLIB2_DEPENDENCIES += util-linux-libs
 else
+LIBGLIB2_DEPENDENCIES += util-linux
+endif
+else
 LIBGLIB2_CONF_OPTS += -Dlibmount=disabled
 endif
 
-- 
2.28.0

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

* [Buildroot] [PATCH 1/1] package/libglib2: fix util-linux-libs dependency
  2020-11-01 12:15 [Buildroot] [PATCH 1/1] package/libglib2: fix util-linux-libs dependency Fabrice Fontaine
@ 2020-11-01 13:03 ` Yann E. MORIN
  2020-11-01 15:03   ` Fabrice Fontaine
  0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2020-11-01 13:03 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2020-11-01 13:15 +0100, Fabrice Fontaine spake thusly:
> Commit 2acaa86ce630f616b12aa92493e0269421c5bc97 replaced util-linux by
> util-linux-libs but this raises the following build failure:
> 
> Makefile:585: *** util-linux-libs is in the dependency chain of libglib2 that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in.  Stop.
> 
> To fix this build failure, use util-linux or util-linux-libs depending
> on BR2_PACKAGE_UTIL_LINUX_LIBS

OK, so this is exactly what I did not like in this util-linux vs
util-linus-libs split, and the fact that util-linux-libs is optional...

IMHO:

 1. util-linux-libs must be enabled as soon as util-linux is enabled,

 2. packages should build-depend on util-linux-libs, and never on
    util-linux, and should 'select BR2_PACKAGE_UTIL_LINUX_LIBS' if
    all they need is a library.

So, for now I'll apply this patch, because we do need a fix.

But ultimately, we wnat to sanitise this situation.

Regards,
Yann E. MORIN.

> Fixes:
>  - http://autobuild.buildroot.org/results/8bf6360a343edd10c73a756ab86cdba727f9ea43
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/libglib2/libglib2.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
> index 43fcb27fae..6e9dbd7b26 100644
> --- a/package/libglib2/libglib2.mk
> +++ b/package/libglib2/libglib2.mk
> @@ -86,8 +86,12 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
>  LIBGLIB2_CONF_OPTS += -Dlibmount=enabled
> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS),y)
>  LIBGLIB2_DEPENDENCIES += util-linux-libs
>  else
> +LIBGLIB2_DEPENDENCIES += util-linux
> +endif
> +else
>  LIBGLIB2_CONF_OPTS += -Dlibmount=disabled
>  endif
>  
> -- 
> 2.28.0
> 
> _______________________________________________
> 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] 5+ messages in thread

* [Buildroot] [PATCH 1/1] package/libglib2: fix util-linux-libs dependency
  2020-11-01 13:03 ` Yann E. MORIN
@ 2020-11-01 15:03   ` Fabrice Fontaine
  2020-11-03 20:38     ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2020-11-01 15:03 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le dim. 1 nov. 2020 ? 14:04, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
>
> Fabrice, All,
>
> On 2020-11-01 13:15 +0100, Fabrice Fontaine spake thusly:
> > Commit 2acaa86ce630f616b12aa92493e0269421c5bc97 replaced util-linux by
> > util-linux-libs but this raises the following build failure:
> >
> > Makefile:585: *** util-linux-libs is in the dependency chain of libglib2 that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in.  Stop.
> >
> > To fix this build failure, use util-linux or util-linux-libs depending
> > on BR2_PACKAGE_UTIL_LINUX_LIBS
>
> OK, so this is exactly what I did not like in this util-linux vs
> util-linus-libs split, and the fact that util-linux-libs is optional...
>
> IMHO:
>
>  1. util-linux-libs must be enabled as soon as util-linux is enabled,
>
>  2. packages should build-depend on util-linux-libs, and never on
>     util-linux, and should 'select BR2_PACKAGE_UTIL_LINUX_LIBS' if
>     all they need is a library.
We can't select BR2_PACKAGE_UTIL_LINUX_LIBS without selecting
BR2_PACKAGE_UTIL_LINUX as BR2_PACKAGE_UTIL_LINUX_LIBS is a hidden
option of BR2_PACKAGE_UTIL_LINUX.
Moreover, we'll select BR2_PACKAGE_UTIL_LINUX_LIBS as soon as
BR2_PACKAGE_UTIL_LINUX is enabled (as per your first suggestion).
As a result, util-linux will always be selected even if packages (such
as abootimg) only build-depend on util-linux-libs.
So, in the end, we'll fix/clean the build order but util-linux will
still be built but this is unavoidable unless util-linux-libs is moved
to its own package.
Did I misunderstood something?
I'll send a 2-patch serie that implements your first suggestion and
your second suggestion on abootimg. If it pleases you, I'll update the
other packages.
>
> So, for now I'll apply this patch, because we do need a fix.
>
> But ultimately, we wnat to sanitise this situation.
>
> Regards,
> Yann E. MORIN.
>
> > Fixes:
> >  - http://autobuild.buildroot.org/results/8bf6360a343edd10c73a756ab86cdba727f9ea43
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/libglib2/libglib2.mk | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
> > index 43fcb27fae..6e9dbd7b26 100644
> > --- a/package/libglib2/libglib2.mk
> > +++ b/package/libglib2/libglib2.mk
> > @@ -86,8 +86,12 @@ endif
> >
> >  ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
> >  LIBGLIB2_CONF_OPTS += -Dlibmount=enabled
> > +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS),y)
> >  LIBGLIB2_DEPENDENCIES += util-linux-libs
> >  else
> > +LIBGLIB2_DEPENDENCIES += util-linux
> > +endif
> > +else
> >  LIBGLIB2_CONF_OPTS += -Dlibmount=disabled
> >  endif
> >
> > --
> > 2.28.0
> >
> > _______________________________________________
> > 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.  |
> '------------------------------^-------^------------------^--------------------'
Best Regards,

Fabrice

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

* [Buildroot] [PATCH 1/1] package/libglib2: fix util-linux-libs dependency
  2020-11-01 15:03   ` Fabrice Fontaine
@ 2020-11-03 20:38     ` Yann E. MORIN
  2020-12-01 21:12       ` Arnout Vandecappelle
  0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2020-11-03 20:38 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2020-11-01 16:03 +0100, Fabrice Fontaine spake thusly:
> Le dim. 1 nov. 2020 ? 14:04, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
> > On 2020-11-01 13:15 +0100, Fabrice Fontaine spake thusly:
> > > Commit 2acaa86ce630f616b12aa92493e0269421c5bc97 replaced util-linux by
> > > util-linux-libs but this raises the following build failure:
> > >
> > > Makefile:585: *** util-linux-libs is in the dependency chain of libglib2 that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in.  Stop.
> > >
> > > To fix this build failure, use util-linux or util-linux-libs depending
> > > on BR2_PACKAGE_UTIL_LINUX_LIBS
> >
> > OK, so this is exactly what I did not like in this util-linux vs
> > util-linus-libs split, and the fact that util-linux-libs is optional...
> >
> > IMHO:
> >
> >  1. util-linux-libs must be enabled as soon as util-linux is enabled,
> >
> >  2. packages should build-depend on util-linux-libs, and never on
> >     util-linux, and should 'select BR2_PACKAGE_UTIL_LINUX_LIBS' if
> >     all they need is a library.
> We can't select BR2_PACKAGE_UTIL_LINUX_LIBS without selecting
> BR2_PACKAGE_UTIL_LINUX as BR2_PACKAGE_UTIL_LINUX_LIBS is a hidden
> option of BR2_PACKAGE_UTIL_LINUX.

No, we really need to make util-linux-libs a real package, not a hidden
one, like

    config BR2_PACAKGE_UTIL_LINUX_LIBS
        bool "util-linux-libs"
        help
          Only the libraries provided bby util-linux; if you need the
          tools too, select util-linux.

and:

    config BR2_PACAKGE_UTIL_LINUX
        bool "util-linux"
        select BR2_PACAKGE_UTIL_LINUX_LIBS

    (or:)

    config BR2_PACAKGE_UTIL_LINUX_LIBMOUNT
        bool "libmount"
        select BR2_PACAKGE_UTIL_LINUX_LIBS

> Moreover, we'll select BR2_PACKAGE_UTIL_LINUX_LIBS as soon as
> BR2_PACKAGE_UTIL_LINUX is enabled (as per your first suggestion).
> As a result, util-linux will always be selected even if packages (such
> as abootimg) only build-depend on util-linux-libs.

Now that util-linux-libs is a full-gfledged package, it is selctable by
packages. See for example eudev os systemd, which already both select
BR2_PACKAGE_UTIL_LINUX_LIBS and biuld-depend on util-linux-libs.

> So, in the end, we'll fix/clean the build order but util-linux will
> still be built but this is unavoidable unless util-linux-libs is moved
> to its own package.

It is already its own package; just it is not "user-visible".

> Did I misunderstood something?

The above, I guess. ;-)

> I'll send a 2-patch serie that implements your first suggestion and
> your second suggestion on abootimg. If it pleases you, I'll update the
> other packages.

Well, we can do it multi-pass, of course; fixing packages to build-depend
on util-linux-libs is not a lost effort anyway.

Thanks for your work! :-)

Regards,
Yann E. MORIN.

> > So, for now I'll apply this patch, because we do need a fix.
> >
> > But ultimately, we wnat to sanitise this situation.
> >
> > Regards,
> > Yann E. MORIN.
> >
> > > Fixes:
> > >  - http://autobuild.buildroot.org/results/8bf6360a343edd10c73a756ab86cdba727f9ea43
> > >
> > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > > ---
> > >  package/libglib2/libglib2.mk | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
> > > index 43fcb27fae..6e9dbd7b26 100644
> > > --- a/package/libglib2/libglib2.mk
> > > +++ b/package/libglib2/libglib2.mk
> > > @@ -86,8 +86,12 @@ endif
> > >
> > >  ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
> > >  LIBGLIB2_CONF_OPTS += -Dlibmount=enabled
> > > +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS),y)
> > >  LIBGLIB2_DEPENDENCIES += util-linux-libs
> > >  else
> > > +LIBGLIB2_DEPENDENCIES += util-linux
> > > +endif
> > > +else
> > >  LIBGLIB2_CONF_OPTS += -Dlibmount=disabled
> > >  endif
> > >
> > > --
> > > 2.28.0
> > >
> > > _______________________________________________
> > > 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.  |
> > '------------------------------^-------^------------------^--------------------'
> Best Regards,
> 
> Fabrice

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 5+ messages in thread

* [Buildroot] [PATCH 1/1] package/libglib2: fix util-linux-libs dependency
  2020-11-03 20:38     ` Yann E. MORIN
@ 2020-12-01 21:12       ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2020-12-01 21:12 UTC (permalink / raw)
  To: buildroot

 [Replying to this one, because it's the one with most of the discussion, but my
comments really pertain to [1]]
 [1]
http://patchwork.ozlabs.org/project/buildroot/patch/20201103205745.123950-1-fontaine.fabrice at gmail.com/



On 03/11/2020 21:38, Yann E. MORIN wrote:
> Fabrice, All,
> 
> On 2020-11-01 16:03 +0100, Fabrice Fontaine spake thusly:
>> Le dim. 1 nov. 2020 ? 14:04, Yann E. MORIN <yann.morin.1998@free.fr> a ?crit :
>>> On 2020-11-01 13:15 +0100, Fabrice Fontaine spake thusly:
>>>> Commit 2acaa86ce630f616b12aa92493e0269421c5bc97 replaced util-linux by
>>>> util-linux-libs but this raises the following build failure:
>>>>
>>>> Makefile:585: *** util-linux-libs is in the dependency chain of libglib2 that has added it to its _DEPENDENCIES variable without selecting it or depending on it from Config.in.  Stop.
>>>>
>>>> To fix this build failure, use util-linux or util-linux-libs depending
>>>> on BR2_PACKAGE_UTIL_LINUX_LIBS
>>>
>>> OK, so this is exactly what I did not like in this util-linux vs
>>> util-linus-libs split, and the fact that util-linux-libs is optional...
>>>
>>> IMHO:
>>>
>>>  1. util-linux-libs must be enabled as soon as util-linux is enabled,
>>>
>>>  2. packages should build-depend on util-linux-libs, and never on
>>>     util-linux, and should 'select BR2_PACKAGE_UTIL_LINUX_LIBS' if
>>>     all they need is a library.
>> We can't select BR2_PACKAGE_UTIL_LINUX_LIBS without selecting
>> BR2_PACKAGE_UTIL_LINUX as BR2_PACKAGE_UTIL_LINUX_LIBS is a hidden
>> option of BR2_PACKAGE_UTIL_LINUX.
> 
> No, we really need to make util-linux-libs a real package, not a hidden
> one, like
> 
>     config BR2_PACAKGE_UTIL_LINUX_LIBS
>         bool "util-linux-libs"
>         help
>           Only the libraries provided bby util-linux; if you need the
>           tools too, select util-linux.

 There's no need to make this user-selectable AFAICS.

> 
> and:
> 
>     config BR2_PACAKGE_UTIL_LINUX
>         bool "util-linux"
>         select BR2_PACAKGE_UTIL_LINUX_LIBS
> 
>     (or:)
> 
>     config BR2_PACAKGE_UTIL_LINUX_LIBMOUNT
>         bool "libmount"
>         select BR2_PACAKGE_UTIL_LINUX_LIBS

 This was one of the possibilities that was considered/tried when Carlos and I
worked on the util-linux split. I don't remember the details of why it didn't
work, but basically it didn't :-) It *might* be just avoiding building
util-linux twice if it's not needed though.


> 
>> Moreover, we'll select BR2_PACKAGE_UTIL_LINUX_LIBS as soon as
>> BR2_PACKAGE_UTIL_LINUX is enabled (as per your first suggestion).
>> As a result, util-linux will always be selected even if packages (such
>> as abootimg) only build-depend on util-linux-libs.
> 
> Now that util-linux-libs is a full-gfledged package, it is selctable by
> packages. See for example eudev os systemd, which already both select
> BR2_PACKAGE_UTIL_LINUX_LIBS and biuld-depend on util-linux-libs.

 And that's exactly the approach that should have been taken by libglib2 as well:

	select BR2_PACKAGE_UTIL_LINUX_LIBS if BR2_PACKAGE_UTIL_LINUX_LIBMOUNT

and unconditionally depend on util-linux-libs in libglib2.mk.


> 
>> So, in the end, we'll fix/clean the build order but util-linux will
>> still be built but this is unavoidable unless util-linux-libs is moved
>> to its own package.

 Yes, util-linux will definitely always be built.

 Regards,
 Arnout

> 
> It is already its own package; just it is not "user-visible".
> 
>> Did I misunderstood something?
> 
> The above, I guess. ;-)
> 
>> I'll send a 2-patch serie that implements your first suggestion and
>> your second suggestion on abootimg. If it pleases you, I'll update the
>> other packages.
> 
> Well, we can do it multi-pass, of course; fixing packages to build-depend
> on util-linux-libs is not a lost effort anyway.
> 
> Thanks for your work! :-)
> 
> Regards,
> Yann E. MORIN.
> 
>>> So, for now I'll apply this patch, because we do need a fix.
>>>
>>> But ultimately, we wnat to sanitise this situation.
>>>
>>> Regards,
>>> Yann E. MORIN.
>>>
>>>> Fixes:
>>>>  - http://autobuild.buildroot.org/results/8bf6360a343edd10c73a756ab86cdba727f9ea43
>>>>
>>>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>>>> ---
>>>>  package/libglib2/libglib2.mk | 4 ++++
>>>>  1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
>>>> index 43fcb27fae..6e9dbd7b26 100644
>>>> --- a/package/libglib2/libglib2.mk
>>>> +++ b/package/libglib2/libglib2.mk
>>>> @@ -86,8 +86,12 @@ endif
>>>>
>>>>  ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y)
>>>>  LIBGLIB2_CONF_OPTS += -Dlibmount=enabled
>>>> +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBS),y)
>>>>  LIBGLIB2_DEPENDENCIES += util-linux-libs
>>>>  else
>>>> +LIBGLIB2_DEPENDENCIES += util-linux
>>>> +endif
>>>> +else
>>>>  LIBGLIB2_CONF_OPTS += -Dlibmount=disabled
>>>>  endif
>>>>
>>>> --
>>>> 2.28.0
>>>>
>>>> _______________________________________________
>>>> 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.  |
>>> '------------------------------^-------^------------------^--------------------'
>> Best Regards,
>>
>> Fabrice
> 

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

end of thread, other threads:[~2020-12-01 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-01 12:15 [Buildroot] [PATCH 1/1] package/libglib2: fix util-linux-libs dependency Fabrice Fontaine
2020-11-01 13:03 ` Yann E. MORIN
2020-11-01 15:03   ` Fabrice Fontaine
2020-11-03 20:38     ` Yann E. MORIN
2020-12-01 21:12       ` Arnout Vandecappelle

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.