All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/cpp-httplib: depends on BR2_TOOLCHAIN_HAS_SYNC_1
@ 2026-06-20  7:03 Bernd Kuhls
  2026-09-16 21:46 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-06-20  7:03 UTC (permalink / raw)
  To: buildroot; +Cc: Aleksandr Makarov

Buildroot commit 8dad17ea06260ef0bd23eebc47c95a8510310bf5 bumped the
package from 0.27.0 to 0.37.2. This bump includes upstream commit
https://github.com/yhirose/cpp-httplib/commit/464867a9cedef2b6185e25e3e912d3f796fe58fd
which added WebSocket support to version 0.33.0 and causes a build error
detected by the Gitlab pipelines for bootlin-sparc-uclibc:

/builds/bkuhls/buildroot/br-test-pkg/bootlin-sparc-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld:
 /tmp/cciyXsAR.ltrans6.ltrans.o: in function
 `httplib::ws::WebSocket::close(httplib::ws::CloseStatus,
 std::__cxx11::basic_string<char, std::char_traits<char>,
 std::allocator<char> > const&)':
<artificial>:(.text+0x6408): undefined reference to `__atomic_exchange_1'

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/1f16e14c1131a99a61f16200285b71d0cfe47020

 package/cpp-httplib/Config.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/cpp-httplib/Config.in b/package/cpp-httplib/Config.in
index 9bd93ee0af..7d1244c2ac 100644
--- a/package/cpp-httplib/Config.in
+++ b/package/cpp-httplib/Config.in
@@ -1,10 +1,12 @@
 comment "cpp-httplib needs a toolchain w/ C++, wchar, threads"
+	depends on BR2_TOOLCHAIN_HAS_SYNC_1
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PACKAGE_CPP_HTTPLIB
 	bool "cpp-httplib"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_SYNC_1
 	depends on BR2_USE_WCHAR
 	help
 	  A C++ header-only HTTP/HTTPS server and client library.
-- 
2.47.3

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

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

* Re: [Buildroot] [PATCH 1/1] package/cpp-httplib: depends on BR2_TOOLCHAIN_HAS_SYNC_1
  2026-06-20  7:03 [Buildroot] [PATCH 1/1] package/cpp-httplib: depends on BR2_TOOLCHAIN_HAS_SYNC_1 Bernd Kuhls
@ 2026-09-16 21:46 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-16 21:46 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot, Aleksandr Makarov

On Sat, Jun 20, 2026 at 09:03:43AM +0200, Bernd Kuhls wrote:
> Buildroot commit 8dad17ea06260ef0bd23eebc47c95a8510310bf5 bumped the
> package from 0.27.0 to 0.37.2. This bump includes upstream commit
> https://github.com/yhirose/cpp-httplib/commit/464867a9cedef2b6185e25e3e912d3f796fe58fd
> which added WebSocket support to version 0.33.0 and causes a build error
> detected by the Gitlab pipelines for bootlin-sparc-uclibc:
> 
> /builds/bkuhls/buildroot/br-test-pkg/bootlin-sparc-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld:
>  /tmp/cciyXsAR.ltrans6.ltrans.o: in function
>  `httplib::ws::WebSocket::close(httplib::ws::CloseStatus,
>  std::__cxx11::basic_string<char, std::char_traits<char>,
>  std::allocator<char> > const&)':
> <artificial>:(.text+0x6408): undefined reference to `__atomic_exchange_1'

Thanks for the patch. However, I believe you're making a confusion
between __sync builtins
(https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html) and
__atomic builtins
(https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html).

__sync builtins are in Buildroot covered by the
BR2_TOOLCHAIN_HAS_SYNC_xyz options.

On the other hand, __atomic built-ins are covered by
BR2_TOOLCHAIN_HAS_ATOMIC and BR2_TOOLCHAIN_HAS_LIBATOMIC.

So what you want to do here is:

1. Add depends on BR2_TOOLCHAIN_HAS_ATOMIC in Config.in

2. Ensure that the code is linked against libatomic if
   BR2_TOOLCHAIN_HAS_LIBATOMIC

Could you have a look into this?

Thanks a lot!

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

end of thread, other threads:[~2026-09-16 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-20  7:03 [Buildroot] [PATCH 1/1] package/cpp-httplib: depends on BR2_TOOLCHAIN_HAS_SYNC_1 Bernd Kuhls
2026-09-16 21:46 ` Thomas Petazzoni via buildroot

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.