All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency
@ 2021-03-25 14:17 Stefan Agner
  2021-03-25 14:22 ` Baruch Siach
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Agner @ 2021-03-25 14:17 UTC (permalink / raw)
  To: buildroot

The library is only required at build time, which is handled by the
select in Config.in.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 package/libbytesize/libbytesize.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/libbytesize/libbytesize.mk b/package/libbytesize/libbytesize.mk
index 0ba380dc74..df54ae84b7 100644
--- a/package/libbytesize/libbytesize.mk
+++ b/package/libbytesize/libbytesize.mk
@@ -14,8 +14,7 @@ LIBBYTESIZE_DEPENDENCIES = \
 	host-pkgconf \
 	host-gettext \
 	gmp \
-	mpfr \
-	pcre2
+	mpfr
 
 LIBBYTESIZE_CONF_OPTS += \
 	--without-python3 \
-- 
2.30.2

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

* [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency
  2021-03-25 14:17 [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency Stefan Agner
@ 2021-03-25 14:22 ` Baruch Siach
  2021-03-25 14:40   ` Stefan Agner
  0 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2021-03-25 14:22 UTC (permalink / raw)
  To: buildroot

Hi Stefan,

On Thu, Mar 25 2021, Stefan Agner wrote:
> The library is only required at build time, which is handled by the
> select in Config.in.

The _DEPENDENCIES list is meant to make sure that pcre2 builds before
libbytesize. Config.in select does not guarantee the build order.
Config.in select only makes pcre2 build.

So if pcre2 is required at build time we need it in the _DEPENDENCIES
list.

Am I missing something?

baruch

> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  package/libbytesize/libbytesize.mk | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/package/libbytesize/libbytesize.mk b/package/libbytesize/libbytesize.mk
> index 0ba380dc74..df54ae84b7 100644
> --- a/package/libbytesize/libbytesize.mk
> +++ b/package/libbytesize/libbytesize.mk
> @@ -14,8 +14,7 @@ LIBBYTESIZE_DEPENDENCIES = \
>  	host-pkgconf \
>  	host-gettext \
>  	gmp \
> -	mpfr \
> -	pcre2
> +	mpfr
>  
>  LIBBYTESIZE_CONF_OPTS += \
>  	--without-python3 \


-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency
  2021-03-25 14:22 ` Baruch Siach
@ 2021-03-25 14:40   ` Stefan Agner
  2021-03-25 15:39     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Agner @ 2021-03-25 14:40 UTC (permalink / raw)
  To: buildroot

On 2021-03-25 15:22, Baruch Siach wrote:
> Hi Stefan,
> 
> On Thu, Mar 25 2021, Stefan Agner wrote:
>> The library is only required at build time, which is handled by the
>> select in Config.in.
> 
> The _DEPENDENCIES list is meant to make sure that pcre2 builds before
> libbytesize. Config.in select does not guarantee the build order.
> Config.in select only makes pcre2 build.
> 
> So if pcre2 is required at build time we need it in the _DEPENDENCIES
> list.
> 
> Am I missing something?

Hmm, I think I don't understand how runtime/compile time dependencies
work in buildroot.

I read this section:
https://buildroot.org/downloads/manual/manual.html#_gettext_integration_and_interaction_with_packages

But I think i got this wrong, gettext in that case is only a runtime
dependency.

Is there a way to have something as compile time dependency but not a
runtime dependency?

--
Stefan

> 
> baruch
> 
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>> ---
>>  package/libbytesize/libbytesize.mk | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/package/libbytesize/libbytesize.mk b/package/libbytesize/libbytesize.mk
>> index 0ba380dc74..df54ae84b7 100644
>> --- a/package/libbytesize/libbytesize.mk
>> +++ b/package/libbytesize/libbytesize.mk
>> @@ -14,8 +14,7 @@ LIBBYTESIZE_DEPENDENCIES = \
>>  	host-pkgconf \
>>  	host-gettext \
>>  	gmp \
>> -	mpfr \
>> -	pcre2
>> +	mpfr
>>
>>  LIBBYTESIZE_CONF_OPTS += \
>>  	--without-python3 \

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

* [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency
  2021-03-25 14:40   ` Stefan Agner
@ 2021-03-25 15:39     ` Thomas Petazzoni
  2021-03-25 16:41       ` Stefan Agner
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2021-03-25 15:39 UTC (permalink / raw)
  To: buildroot

On Thu, 25 Mar 2021 15:40:36 +0100
Stefan Agner <stefan@agner.ch> wrote:

> Hmm, I think I don't understand how runtime/compile time dependencies
> work in buildroot.
> 
> I read this section:
> https://buildroot.org/downloads/manual/manual.html#_gettext_integration_and_interaction_with_packages
> 
> But I think i got this wrong, gettext in that case is only a runtime
> dependency.

Yes, and because it's only a runtime dependency, we need to make sure
it is enabled in the configuration (which the "select" does), but we
don't need to ensure it is built *before* a certain package (which
<pkg>_DEPENDENCIES does).

> Is there a way to have something as compile time dependency but not a
> runtime dependency?

No, because it is fairly uncommon to have something that is a compile
time dependency but not necessary at runtime. Do you have specific
examples in mind ?

For example, in your patch, libbytesize links against the libpcre2
library. So there is a build time dependency, as libpcre2 needs to be
built before libbytesize, for the link of libbytesize to succeed. But
there is also a runtime dependency: libpcre2.so needs to be on the
target.

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

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

* [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency
  2021-03-25 15:39     ` Thomas Petazzoni
@ 2021-03-25 16:41       ` Stefan Agner
  2021-03-28 14:52         ` Yann E. MORIN
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Agner @ 2021-03-25 16:41 UTC (permalink / raw)
  To: buildroot

On 2021-03-25 16:39, Thomas Petazzoni wrote:
> On Thu, 25 Mar 2021 15:40:36 +0100
> Stefan Agner <stefan@agner.ch> wrote:
> 
>> Hmm, I think I don't understand how runtime/compile time dependencies
>> work in buildroot.
>>
>> I read this section:
>> https://buildroot.org/downloads/manual/manual.html#_gettext_integration_and_interaction_with_packages
>>
>> But I think i got this wrong, gettext in that case is only a runtime
>> dependency.
> 
> Yes, and because it's only a runtime dependency, we need to make sure
> it is enabled in the configuration (which the "select" does), but we
> don't need to ensure it is built *before* a certain package (which
> <pkg>_DEPENDENCIES does).
> 
>> Is there a way to have something as compile time dependency but not a
>> runtime dependency?
> 
> No, because it is fairly uncommon to have something that is a compile
> time dependency but not necessary at runtime. Do you have specific
> examples in mind ?
> 
> For example, in your patch, libbytesize links against the libpcre2
> library. So there is a build time dependency, as libpcre2 needs to be
> built before libbytesize, for the link of libbytesize to succeed. But
> there is also a runtime dependency: libpcre2.so needs to be on the
> target.

Oh you are right libbytesize actually links against it. I somehow was
assuming this is a build time dependency only.

Sorry for the noise.

--
Stefan


> 
> Thomas

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

* [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency
  2021-03-25 16:41       ` Stefan Agner
@ 2021-03-28 14:52         ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2021-03-28 14:52 UTC (permalink / raw)
  To: buildroot

Stefan, All,

On 2021-03-25 17:41 +0100, Stefan Agner spake thusly:
> On 2021-03-25 16:39, Thomas Petazzoni wrote:
> > On Thu, 25 Mar 2021 15:40:36 +0100
> > Stefan Agner <stefan@agner.ch> wrote:
> >> Is there a way to have something as compile time dependency but not a
> >> runtime dependency?
> > No, because it is fairly uncommon to have something that is a compile
> > time dependency but not necessary at runtime. Do you have specific
> > examples in mind ?

Well, technically there are two cases:

  - dependencies on a host package
  - dependencies on a header-only package

However, even in the later case, the package that provides those headers
still needs to be enabled in the configuration and must also be built
and installed (actually, only installed as it is headers-only) before
the package that depends on it gets built.

I've marked the patch as rejected in Patchwork now.

Regards,
Yann E. MORIN.

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

end of thread, other threads:[~2021-03-28 14:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 14:17 [Buildroot] [PATCH] package/libbytesize: remove pcre2 runtime dependency Stefan Agner
2021-03-25 14:22 ` Baruch Siach
2021-03-25 14:40   ` Stefan Agner
2021-03-25 15:39     ` Thomas Petazzoni
2021-03-25 16:41       ` Stefan Agner
2021-03-28 14:52         ` Yann E. MORIN

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.