All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson
@ 2022-08-04 20:35 Thomas Petazzoni via buildroot
  2022-08-04 20:35 ` [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc Thomas Petazzoni via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-04 20:35 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Ruschival, Thomas Petazzoni

rapidjson has been added as a dependency of pistache as part of commit
2f3218567953185008ec862f814bebecb9d6ed82 ("package/pistache: bump
version & switch to meson build"), using a "depends on". However, as
it is a library dependency, a "select" is normally used in Buildroot.

rapidjson's only dependency is on C++ support, which is already a
dependency of pistache.

In addition, use = instead of += for the rapidjson dependency in the
.mk file, as it's an unconditional dependency.

Cc: Thomas Ruschival <thomas@ruschival.de>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/pistache/Config.in   | 2 +-
 package/pistache/pistache.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/pistache/Config.in b/package/pistache/Config.in
index 806c27077a..53a4b73a58 100644
--- a/package/pistache/Config.in
+++ b/package/pistache/Config.in
@@ -4,9 +4,9 @@ config BR2_PACKAGE_PISTACHE
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_PACKAGE_RAPIDJSON
 	depends on !BR2_TOOLCHAIN_USES_UCLIBC
 	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
+	select BR2_PACKAGE_RAPIDJSON
 	help
 	  Pistache is a modern and elegant HTTP and REST framework
 	  for C++. It is entirely written in pure C++17 and provides
diff --git a/package/pistache/pistache.mk b/package/pistache/pistache.mk
index 65d9b2412c..f4de5e3b2a 100644
--- a/package/pistache/pistache.mk
+++ b/package/pistache/pistache.mk
@@ -10,7 +10,7 @@ PISTACHE_LICENSE = Apache-2.0
 PISTACHE_LICENSE_FILES = LICENSE
 
 PISTACHE_INSTALL_STAGING = YES
-PISTACHE_DEPENDENCIES += rapidjson
+PISTACHE_DEPENDENCIES = rapidjson
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 PISTACHE_DEPENDENCIES += openssl
-- 
2.37.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc
  2022-08-04 20:35 [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson Thomas Petazzoni via buildroot
@ 2022-08-04 20:35 ` Thomas Petazzoni via buildroot
  2022-08-05 16:29   ` Yann E. MORIN
  2022-08-06 14:15   ` Yann E. MORIN
  2022-08-05 16:29 ` [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson Yann E. MORIN
  2022-09-14  9:46 ` Peter Korsgaard
  2 siblings, 2 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-04 20:35 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Ruschival, Thomas Petazzoni

pistache couldn't build on uClibc due to just one missing
definition. In addition, the Config.in comment was wrong as it said
that a glibc toolchain was needed, while in fact it could be glibc or
musl.

Cc: Thomas Ruschival <thomas@ruschival.de>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...port.cc-fallback-value-for-RUSAGE_TH.patch | 33 +++++++++++++++++++
 package/pistache/Config.in                    |  4 +--
 2 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch

diff --git a/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch b/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
new file mode 100644
index 0000000000..327933e26d
--- /dev/null
+++ b/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
@@ -0,0 +1,33 @@
+From 5feed6d2f86750bfe1e7c26d6fd4e8d2195ea81f Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Thu, 4 Aug 2022 19:54:23 +0200
+Subject: [PATCH] src/common/transport.cc: fallback value for RUSAGE_THREAD
+
+uClibc-ng currently does not define RUSAGE_THREAD, so let's add a
+fallback value until it gets fixed in uClibc-ng. The value is the same
+on all Linux systems, regardless of the CPU architecture.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Upstream bug: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thread/MEXOUSFSH46UFS3AEMEIEPTL5U4HVEFL/
+---
+ src/common/transport.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/common/transport.cc b/src/common/transport.cc
+index 62efb8c..0f3abb0 100644
+--- a/src/common/transport.cc
++++ b/src/common/transport.cc
+@@ -515,6 +515,10 @@ namespace Pistache::Tcp
+ 
+         rusage now;
+ 
++#if !defined(RUSAGE_THREAD)
++#define RUSAGE_THREAD 1
++#endif
++
+         auto res = getrusage(RUSAGE_THREAD, &now);
+         if (res == -1)
+             loadRequest_.reject(std::runtime_error("Could not compute usage"));
+-- 
+2.37.1
+
diff --git a/package/pistache/Config.in b/package/pistache/Config.in
index 53a4b73a58..3acf1f53f0 100644
--- a/package/pistache/Config.in
+++ b/package/pistache/Config.in
@@ -4,7 +4,6 @@ config BR2_PACKAGE_PISTACHE
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_TOOLCHAIN_USES_UCLIBC
 	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
 	select BR2_PACKAGE_RAPIDJSON
 	help
@@ -14,9 +13,8 @@ config BR2_PACKAGE_PISTACHE
 
 	  https://github.com/oktal/pistache
 
-comment "pistache needs a glibc toolchain w/ C++, gcc >= 7, threads, wchar, not binutils bug 27597"
+comment "pistache needs a toolchain w/ C++, gcc >= 7, threads, wchar, not binutils bug 27597"
 	depends on !BR2_INSTALL_LIBSTDCPP || \
-		   BR2_TOOLCHAIN_USES_UCLIBC || \
 		   !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
 		   !BR2_TOOLCHAIN_HAS_THREADS || \
 		   !BR2_USE_WCHAR || \
-- 
2.37.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc
  2022-08-04 20:35 ` [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc Thomas Petazzoni via buildroot
@ 2022-08-05 16:29   ` Yann E. MORIN
  2022-08-06 13:45     ` Thomas Petazzoni via buildroot
  2022-08-06 14:15   ` Yann E. MORIN
  1 sibling, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2022-08-05 16:29 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Thomas Ruschival, buildroot

Thomas², All,

Thomas R., a note for you toward the end...

On 2022-08-04 22:35 +0200, Thomas Petazzoni via buildroot spake thusly:
> pistache couldn't build on uClibc due to just one missing
> definition. In addition, the Config.in comment was wrong as it said
> that a glibc toolchain was needed, while in fact it could be glibc or
> musl.

As I understand, this patch is not really upstreamable, or at least not
in this state.

However, this means we will have to carry over and over, because
existing uclibc-based toolchains will still be usad in the future, even
when newer uclibc-ng contains the new definitions, so we can't drop this
patch because it may always needed when using external toolchains...

So, I think a version that is upstreamable would be nice...

Thomas R.: Thomas P. noticed a very nasty beha  viour for pistache: it
will forcibly register git hooks when it is built, if it finds that it
is built in a git tree.

This is very nasty, because in our case, developping Buildroot the
pistache sources are extacted from a tarball, but there is a git tree to
be found higher up: it finds Buildroot's own git tree, s registers git
hooks in that repository, and the results is obviously wrong and
prevents properly working:

    thomas@windsurf:~/projets/buildroot (pistache-fix)$ make pistache-extract
    pistache-3ec9d7c4f8b828fdd391550fff81b01e72dd6269.tar.gz: OK (sha256: f2b3e8b2581cfed5e036d1b97a9b97dc7022b3ddaab69c4691238faff3199bc1)
    >>> pistache 3ec9d7c4f8b828fdd391550fff81b01e72dd6269 Extracting
    gzip -d -c /home/thomas/dl/pistache/pistache-3ec9d7c4f8b828fdd391550fff81b01e72dd6269.tar.gz | tar --strip-components=1 -C /home/thomas/projets/buildroot/output/build/pistache-3ec9d7c4f8b828fdd391550fff81b01e72dd6269   -xf -

    thomas@windsurf:~/projets/buildroot (pistache-fix)$ git commit
    grep: version.txt: No such file or directory
    Update the commit date in version.txt before committing

    thomas@windsurf:~/projets/buildroot (pistache-fix)$ grep pistache .git/config
            hooksPath = /home/thomas/projets/buildroot/output/build/pistache-3ec9d7c4f8b828fdd391550fff81b01e72dd6269/.hooks

See: https://github.com/pistacheio/pistache/blob/master/meson.build#L137 :

    if not meson.is_subproject()
        git = find_program('git', required: false)
        if git.found()
            run_command(git, 'config', '--local', 'core.hooksPath', meson.source_root()/'.hooks', check: false)
        endif
    endif

Could you look into proposing a change upstream, that at the very least
makes that hook registration optional?

Regards,
Yann E. MORIN.

> Cc: Thomas Ruschival <thomas@ruschival.de>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  ...port.cc-fallback-value-for-RUSAGE_TH.patch | 33 +++++++++++++++++++
>  package/pistache/Config.in                    |  4 +--
>  2 files changed, 34 insertions(+), 3 deletions(-)
>  create mode 100644 package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
> 
> diff --git a/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch b/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
> new file mode 100644
> index 0000000000..327933e26d
> --- /dev/null
> +++ b/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
> @@ -0,0 +1,33 @@
> +From 5feed6d2f86750bfe1e7c26d6fd4e8d2195ea81f Mon Sep 17 00:00:00 2001
> +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +Date: Thu, 4 Aug 2022 19:54:23 +0200
> +Subject: [PATCH] src/common/transport.cc: fallback value for RUSAGE_THREAD
> +
> +uClibc-ng currently does not define RUSAGE_THREAD, so let's add a
> +fallback value until it gets fixed in uClibc-ng. The value is the same
> +on all Linux systems, regardless of the CPU architecture.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +Upstream bug: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thread/MEXOUSFSH46UFS3AEMEIEPTL5U4HVEFL/
> +---
> + src/common/transport.cc | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/src/common/transport.cc b/src/common/transport.cc
> +index 62efb8c..0f3abb0 100644
> +--- a/src/common/transport.cc
> ++++ b/src/common/transport.cc
> +@@ -515,6 +515,10 @@ namespace Pistache::Tcp
> + 
> +         rusage now;
> + 
> ++#if !defined(RUSAGE_THREAD)
> ++#define RUSAGE_THREAD 1
> ++#endif
> ++
> +         auto res = getrusage(RUSAGE_THREAD, &now);
> +         if (res == -1)
> +             loadRequest_.reject(std::runtime_error("Could not compute usage"));
> +-- 
> +2.37.1
> +
> diff --git a/package/pistache/Config.in b/package/pistache/Config.in
> index 53a4b73a58..3acf1f53f0 100644
> --- a/package/pistache/Config.in
> +++ b/package/pistache/Config.in
> @@ -4,7 +4,6 @@ config BR2_PACKAGE_PISTACHE
>  	depends on BR2_USE_WCHAR
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	depends on BR2_INSTALL_LIBSTDCPP
> -	depends on !BR2_TOOLCHAIN_USES_UCLIBC
>  	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
>  	select BR2_PACKAGE_RAPIDJSON
>  	help
> @@ -14,9 +13,8 @@ config BR2_PACKAGE_PISTACHE
>  
>  	  https://github.com/oktal/pistache
>  
> -comment "pistache needs a glibc toolchain w/ C++, gcc >= 7, threads, wchar, not binutils bug 27597"
> +comment "pistache needs a toolchain w/ C++, gcc >= 7, threads, wchar, not binutils bug 27597"
>  	depends on !BR2_INSTALL_LIBSTDCPP || \
> -		   BR2_TOOLCHAIN_USES_UCLIBC || \
>  		   !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
>  		   !BR2_TOOLCHAIN_HAS_THREADS || \
>  		   !BR2_USE_WCHAR || \
> -- 
> 2.37.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

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

* Re: [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson
  2022-08-04 20:35 [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson Thomas Petazzoni via buildroot
  2022-08-04 20:35 ` [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc Thomas Petazzoni via buildroot
@ 2022-08-05 16:29 ` Yann E. MORIN
  2022-09-14  9:46 ` Peter Korsgaard
  2 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2022-08-05 16:29 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Thomas Ruschival, buildroot

Thomas², All,

On 2022-08-04 22:35 +0200, Thomas Petazzoni via buildroot spake thusly:
> rapidjson has been added as a dependency of pistache as part of commit
> 2f3218567953185008ec862f814bebecb9d6ed82 ("package/pistache: bump
> version & switch to meson build"), using a "depends on". However, as
> it is a library dependency, a "select" is normally used in Buildroot.
> 
> rapidjson's only dependency is on C++ support, which is already a
> dependency of pistache.
> 
> In addition, use = instead of += for the rapidjson dependency in the
> .mk file, as it's an unconditional dependency.
> 
> Cc: Thomas Ruschival <thomas@ruschival.de>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/pistache/Config.in   | 2 +-
>  package/pistache/pistache.mk | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/pistache/Config.in b/package/pistache/Config.in
> index 806c27077a..53a4b73a58 100644
> --- a/package/pistache/Config.in
> +++ b/package/pistache/Config.in
> @@ -4,9 +4,9 @@ config BR2_PACKAGE_PISTACHE
>  	depends on BR2_USE_WCHAR
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	depends on BR2_INSTALL_LIBSTDCPP
> -	depends on BR2_PACKAGE_RAPIDJSON
>  	depends on !BR2_TOOLCHAIN_USES_UCLIBC
>  	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
> +	select BR2_PACKAGE_RAPIDJSON
>  	help
>  	  Pistache is a modern and elegant HTTP and REST framework
>  	  for C++. It is entirely written in pure C++17 and provides
> diff --git a/package/pistache/pistache.mk b/package/pistache/pistache.mk
> index 65d9b2412c..f4de5e3b2a 100644
> --- a/package/pistache/pistache.mk
> +++ b/package/pistache/pistache.mk
> @@ -10,7 +10,7 @@ PISTACHE_LICENSE = Apache-2.0
>  PISTACHE_LICENSE_FILES = LICENSE
>  
>  PISTACHE_INSTALL_STAGING = YES
> -PISTACHE_DEPENDENCIES += rapidjson
> +PISTACHE_DEPENDENCIES = rapidjson
>  
>  ifeq ($(BR2_PACKAGE_OPENSSL),y)
>  PISTACHE_DEPENDENCIES += openssl
> -- 
> 2.37.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

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

* Re: [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc
  2022-08-05 16:29   ` Yann E. MORIN
@ 2022-08-06 13:45     ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-06 13:45 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Thomas Ruschival, buildroot

Hello,

On Fri, 5 Aug 2022 18:29:06 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> As I understand, this patch is not really upstreamable, or at least not
> in this state.
> 
> However, this means we will have to carry over and over, because
> existing uclibc-based toolchains will still be usad in the future, even
> when newer uclibc-ng contains the new definitions, so we can't drop this
> patch because it may always needed when using external toolchains...

No, we will not have to carry it over and over. Regarding uClibc-ng, we
require using a reasonably recent version of uClibc-ng. So my plan
would be to keep this hack for a few months, until at least the Bootlin
uClibc toolchains are rebuilt with a recent enough uClibc-ng, and then
drop this hack.

So no, the goal is not to keep this hack patch forever.

What I'm proposing to do for pistache is exactly the same as I did in
commit fa4dba4aa202de20e3821eace5513aad81c23275, for openswan. Waldemar
was simply proposing to re-enable openswan for uClibc, because
uClibc-ng 1.0.41 has the necessary definitions. But in the immediate
term, that would have caused build break with Bootlin toolchains. So
until they are re-generated, I have added a hack patch that avoids the
uClibc build issue entirely, also with the goal of dropping the patch
when the toolchains are rebuilt.

> So, I think a version that is upstreamable would be nice...

I'm not sure it's worth the effort to introduce more complexity
upstream for this missing definition in uClibc. We should just fix it
in uClibc (I have already reported the issue), and that's it.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc
  2022-08-04 20:35 ` [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc Thomas Petazzoni via buildroot
  2022-08-05 16:29   ` Yann E. MORIN
@ 2022-08-06 14:15   ` Yann E. MORIN
  1 sibling, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2022-08-06 14:15 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Thomas Ruschival, buildroot

Thomas, All,

On 2022-08-04 22:35 +0200, Thomas Petazzoni via buildroot spake thusly:
> pistache couldn't build on uClibc due to just one missing
> definition. In addition, the Config.in comment was wrong as it said
> that a glibc toolchain was needed, while in fact it could be glibc or
> musl.
> 
> Cc: Thomas Ruschival <thomas@ruschival.de>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...port.cc-fallback-value-for-RUSAGE_TH.patch | 33 +++++++++++++++++++
>  package/pistache/Config.in                    |  4 +--
>  2 files changed, 34 insertions(+), 3 deletions(-)
>  create mode 100644 package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
> 
> diff --git a/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch b/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
> new file mode 100644
> index 0000000000..327933e26d
> --- /dev/null
> +++ b/package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
> @@ -0,0 +1,33 @@
> +From 5feed6d2f86750bfe1e7c26d6fd4e8d2195ea81f Mon Sep 17 00:00:00 2001
> +From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +Date: Thu, 4 Aug 2022 19:54:23 +0200
> +Subject: [PATCH] src/common/transport.cc: fallback value for RUSAGE_THREAD
> +
> +uClibc-ng currently does not define RUSAGE_THREAD, so let's add a
> +fallback value until it gets fixed in uClibc-ng. The value is the same
> +on all Linux systems, regardless of the CPU architecture.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> +Upstream bug: https://mailman.openadk.org/mailman3/hyperkitty/list/devel@uclibc-ng.org/thread/MEXOUSFSH46UFS3AEMEIEPTL5U4HVEFL/
> +---
> + src/common/transport.cc | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/src/common/transport.cc b/src/common/transport.cc
> +index 62efb8c..0f3abb0 100644
> +--- a/src/common/transport.cc
> ++++ b/src/common/transport.cc
> +@@ -515,6 +515,10 @@ namespace Pistache::Tcp
> + 
> +         rusage now;
> + 
> ++#if !defined(RUSAGE_THREAD)
> ++#define RUSAGE_THREAD 1
> ++#endif
> ++
> +         auto res = getrusage(RUSAGE_THREAD, &now);
> +         if (res == -1)
> +             loadRequest_.reject(std::runtime_error("Could not compute usage"));
> +-- 
> +2.37.1
> +
> diff --git a/package/pistache/Config.in b/package/pistache/Config.in
> index 53a4b73a58..3acf1f53f0 100644
> --- a/package/pistache/Config.in
> +++ b/package/pistache/Config.in
> @@ -4,7 +4,6 @@ config BR2_PACKAGE_PISTACHE
>  	depends on BR2_USE_WCHAR
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	depends on BR2_INSTALL_LIBSTDCPP
> -	depends on !BR2_TOOLCHAIN_USES_UCLIBC
>  	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
>  	select BR2_PACKAGE_RAPIDJSON
>  	help
> @@ -14,9 +13,8 @@ config BR2_PACKAGE_PISTACHE
>  
>  	  https://github.com/oktal/pistache
>  
> -comment "pistache needs a glibc toolchain w/ C++, gcc >= 7, threads, wchar, not binutils bug 27597"
> +comment "pistache needs a toolchain w/ C++, gcc >= 7, threads, wchar, not binutils bug 27597"
>  	depends on !BR2_INSTALL_LIBSTDCPP || \
> -		   BR2_TOOLCHAIN_USES_UCLIBC || \
>  		   !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
>  		   !BR2_TOOLCHAIN_HAS_THREADS || \
>  		   !BR2_USE_WCHAR || \
> -- 
> 2.37.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

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

* Re: [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson
  2022-08-04 20:35 [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson Thomas Petazzoni via buildroot
  2022-08-04 20:35 ` [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc Thomas Petazzoni via buildroot
  2022-08-05 16:29 ` [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson Yann E. MORIN
@ 2022-09-14  9:46 ` Peter Korsgaard
  2022-09-14  9:47   ` Peter Korsgaard
  2 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2022-09-14  9:46 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Ruschival, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > rapidjson has been added as a dependency of pistache as part of commit
 > 2f3218567953185008ec862f814bebecb9d6ed82 ("package/pistache: bump
 > version & switch to meson build"), using a "depends on". However, as
 > it is a library dependency, a "select" is normally used in Buildroot.

 > rapidjson's only dependency is on C++ support, which is already a
 > dependency of pistache.

 > In addition, use = instead of += for the rapidjson dependency in the
 > .mk file, as it's an unconditional dependency.

 > Cc: Thomas Ruschival <thomas@ruschival.de>
 > Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2022.05.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson
  2022-09-14  9:46 ` Peter Korsgaard
@ 2022-09-14  9:47   ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2022-09-14  9:47 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Thomas Ruschival, Thomas Petazzoni

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
 >> rapidjson has been added as a dependency of pistache as part of commit
 >> 2f3218567953185008ec862f814bebecb9d6ed82 ("package/pistache: bump
 >> version & switch to meson build"), using a "depends on". However, as
 >> it is a library dependency, a "select" is normally used in Buildroot.

 >> rapidjson's only dependency is on C++ support, which is already a
 >> dependency of pistache.

 >> In addition, use = instead of += for the rapidjson dependency in the
 >> .mk file, as it's an unconditional dependency.

 >> Cc: Thomas Ruschival <thomas@ruschival.de>
 >> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 >> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

 > Committed to 2022.05.x and 2022.02.x, thanks.

Ups, sorry - Meant 2022.05.x only.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-09-14  9:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04 20:35 [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson Thomas Petazzoni via buildroot
2022-08-04 20:35 ` [Buildroot] [PATCH 2/2] package/pistache: enable on uClibc Thomas Petazzoni via buildroot
2022-08-05 16:29   ` Yann E. MORIN
2022-08-06 13:45     ` Thomas Petazzoni via buildroot
2022-08-06 14:15   ` Yann E. MORIN
2022-08-05 16:29 ` [Buildroot] [PATCH 1/2] package/pistache: fix dependency on rapidjson Yann E. MORIN
2022-09-14  9:46 ` Peter Korsgaard
2022-09-14  9:47   ` 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.