diff mbox series

[1/1] package/pistache: needs NPTL

Message ID 20240723132058.629476-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/pistache: needs NPTL | expand

Commit Message

Fabrice Fontaine July 23, 2024, 1:20 p.m. UTC
pistache needs NPTL as it unconditionally uses pthread_setname_np since
https://github.com/pistacheio/pistache/commit/b283c32963a7cb0500cf69555d320a6e9e252850
resulting in the following uclibc build failure since commit
82e61bed8208857d5d13c384c89086c4dd4e1e79:

../src/common/reactor.cc: In lambda function:
../src/common/reactor.cc:512:25: error: 'pthread_setname_np' was not declared in this scope; did you mean 'pthread_setcanceltype'?
  512 |                         pthread_setname_np(pthread_self(),
      |                         ^~~~~~~~~~~~~~~~~~
      |                         pthread_setcanceltype

Fixes: 82e61bed8208857d5d13c384c89086c4dd4e1e79
 - http://autobuild.buildroot.org/results/b2b22e4f9684aca0246650673fd8c33019712ddf
 - http://autobuild.buildroot.org/results/1597bfe2a57cd3aef54d331447dd81cae020d434

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/pistache/Config.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni Aug. 2, 2024, 5:51 p.m. UTC | #1
On Tue, 23 Jul 2024 15:20:58 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> pistache needs NPTL as it unconditionally uses pthread_setname_np since
> https://github.com/pistacheio/pistache/commit/b283c32963a7cb0500cf69555d320a6e9e252850
> resulting in the following uclibc build failure since commit
> 82e61bed8208857d5d13c384c89086c4dd4e1e79:
> 
> ../src/common/reactor.cc: In lambda function:
> ../src/common/reactor.cc:512:25: error: 'pthread_setname_np' was not declared in this scope; did you mean 'pthread_setcanceltype'?
>   512 |                         pthread_setname_np(pthread_self(),
>       |                         ^~~~~~~~~~~~~~~~~~
>       |                         pthread_setcanceltype
> 
> Fixes: 82e61bed8208857d5d13c384c89086c4dd4e1e79
>  - http://autobuild.buildroot.org/results/b2b22e4f9684aca0246650673fd8c33019712ddf
>  - http://autobuild.buildroot.org/results/1597bfe2a57cd3aef54d331447dd81cae020d434
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/pistache/Config.in | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to master, thanks.

Thomas
Peter Korsgaard Sept. 3, 2024, 4:26 p.m. UTC | #2
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > pistache needs NPTL as it unconditionally uses pthread_setname_np since
 > https://github.com/pistacheio/pistache/commit/b283c32963a7cb0500cf69555d320a6e9e252850
 > resulting in the following uclibc build failure since commit
 > 82e61bed8208857d5d13c384c89086c4dd4e1e79:

 > ../src/common/reactor.cc: In lambda function:
 > ../src/common/reactor.cc:512:25: error: 'pthread_setname_np' was not
 > declared in this scope; did you mean 'pthread_setcanceltype'?
 >   512 |                         pthread_setname_np(pthread_self(),
 >       |                         ^~~~~~~~~~~~~~~~~~
 >       |                         pthread_setcanceltype

 > Fixes: 82e61bed8208857d5d13c384c89086c4dd4e1e79
 >  - http://autobuild.buildroot.org/results/b2b22e4f9684aca0246650673fd8c33019712ddf
 >  - http://autobuild.buildroot.org/results/1597bfe2a57cd3aef54d331447dd81cae020d434

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2024.02.x and 2024.05.x, thanks.
diff mbox series

Patch

diff --git a/package/pistache/Config.in b/package/pistache/Config.in
index ca2d2833cd..e66c24d86d 100644
--- a/package/pistache/Config.in
+++ b/package/pistache/Config.in
@@ -2,7 +2,7 @@  config BR2_PACKAGE_PISTACHE
 	bool "pistache"
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17, std::optional
 	depends on BR2_USE_WCHAR
-	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_RAPIDJSON
 	help
@@ -12,8 +12,8 @@  config BR2_PACKAGE_PISTACHE
 
 	  https://github.com/oktal/pistache
 
-comment "pistache needs a toolchain w/ C++, gcc >= 7, threads, wchar"
+comment "pistache needs a toolchain w/ C++, gcc >= 7, NPTL, wchar"
 	depends on !BR2_INSTALL_LIBSTDCPP || \
 		   !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
-		   !BR2_TOOLCHAIN_HAS_THREADS || \
+		   !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
 		   !BR2_USE_WCHAR