* [Buildroot] [PATCH] package/websocketpp: fix build with C++20
@ 2023-11-03 11:16 Michael Nosthoff via buildroot
2023-11-03 19:31 ` Thomas Petazzoni via buildroot
2023-11-04 13:43 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 5+ messages in thread
From: Michael Nosthoff via buildroot @ 2023-11-03 11:16 UTC (permalink / raw)
To: buildroot; +Cc: Ryan Barnett
websocketpp had some ill-formed usage of template parameters which was
finally removed in C++20. Hence build fails when building with C++20 support
enabled.
The patch is already in the develop branch but no new release was done.
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
.../websocketpp/0001-fix_cpp20_build.patch | 108 ++++++++++++++++++
1 file changed, 108 insertions(+)
create mode 100644 package/websocketpp/0001-fix_cpp20_build.patch
diff --git a/package/websocketpp/0001-fix_cpp20_build.patch b/package/websocketpp/0001-fix_cpp20_build.patch
new file mode 100644
index 0000000000..77b2292051
--- /dev/null
+++ b/package/websocketpp/0001-fix_cpp20_build.patch
@@ -0,0 +1,108 @@
+From 3197a520eb4c1e4754860441918a5930160373eb Mon Sep 17 00:00:00 2001
+From: Peter Thorson <git@zaphoyd.com>
+Date: Tue, 29 Jun 2021 09:13:12 -0500
+Subject: [PATCH] [core] Remove the use of simple template ids as they have
+ been removed in c++20.
+ https://timsong-cpp.github.io/cppwp/n4861/diff.cpp17.class#2 references #991
+
+Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
+Upstream: https://github.com/zaphoyd/websocketpp/commit/3197a520eb4c1e4754860441918a5930160373eb
+---
+ websocketpp/endpoint.hpp | 2 +-
+ websocketpp/logger/basic.hpp | 14 +++++++-------
+ websocketpp/roles/server_endpoint.hpp | 6 +++---
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp
+index 825eaa46d..10f525689 100644
+--- a/websocketpp/endpoint.hpp
++++ b/websocketpp/endpoint.hpp
+@@ -111,7 +111,7 @@ class endpoint : public config::transport_type, public config::endpoint_base {
+
+
+ /// Destructor
+- ~endpoint<connection,config>() {}
++ ~endpoint() {}
+
+ #ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
+ // no copy constructor because endpoints are not copyable
+diff --git a/websocketpp/logger/basic.hpp b/websocketpp/logger/basic.hpp
+index 84514130e..4c9d83649 100644
+--- a/websocketpp/logger/basic.hpp
++++ b/websocketpp/logger/basic.hpp
+@@ -58,33 +58,33 @@ namespace log {
+ template <typename concurrency, typename names>
+ class basic {
+ public:
+- basic<concurrency,names>(channel_type_hint::value h =
++ basic(channel_type_hint::value h =
+ channel_type_hint::access)
+ : m_static_channels(0xffffffff)
+ , m_dynamic_channels(0)
+ , m_out(h == channel_type_hint::error ? &std::cerr : &std::cout) {}
+
+- basic<concurrency,names>(std::ostream * out)
++ basic(std::ostream * out)
+ : m_static_channels(0xffffffff)
+ , m_dynamic_channels(0)
+ , m_out(out) {}
+
+- basic<concurrency,names>(level c, channel_type_hint::value h =
++ basic(level c, channel_type_hint::value h =
+ channel_type_hint::access)
+ : m_static_channels(c)
+ , m_dynamic_channels(0)
+ , m_out(h == channel_type_hint::error ? &std::cerr : &std::cout) {}
+
+- basic<concurrency,names>(level c, std::ostream * out)
++ basic(level c, std::ostream * out)
+ : m_static_channels(c)
+ , m_dynamic_channels(0)
+ , m_out(out) {}
+
+ /// Destructor
+- ~basic<concurrency,names>() {}
++ ~basic() {}
+
+ /// Copy constructor
+- basic<concurrency,names>(basic<concurrency,names> const & other)
++ basic(basic<concurrency,names> const & other)
+ : m_static_channels(other.m_static_channels)
+ , m_dynamic_channels(other.m_dynamic_channels)
+ , m_out(other.m_out)
+@@ -97,7 +97,7 @@ class basic {
+
+ #ifdef _WEBSOCKETPP_MOVE_SEMANTICS_
+ /// Move constructor
+- basic<concurrency,names>(basic<concurrency,names> && other)
++ basic(basic<concurrency,names> && other)
+ : m_static_channels(other.m_static_channels)
+ , m_dynamic_channels(other.m_dynamic_channels)
+ , m_out(other.m_out)
+diff --git a/websocketpp/roles/server_endpoint.hpp b/websocketpp/roles/server_endpoint.hpp
+index 4a5865eff..04fee18f9 100644
+--- a/websocketpp/roles/server_endpoint.hpp
++++ b/websocketpp/roles/server_endpoint.hpp
+@@ -75,11 +75,11 @@ class server : public endpoint<connection<config>,config> {
+ }
+
+ /// Destructor
+- ~server<config>() {}
++ ~server() {}
+
+ #ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
+ // no copy constructor because endpoints are not copyable
+- server<config>(server<config> &) = delete;
++ server(server<config> &) = delete;
+
+ // no copy assignment operator because endpoints are not copyable
+ server<config> & operator=(server<config> const &) = delete;
+@@ -87,7 +87,7 @@ class server : public endpoint<connection<config>,config> {
+
+ #ifdef _WEBSOCKETPP_MOVE_SEMANTICS_
+ /// Move constructor
+- server<config>(server<config> && o) : endpoint<connection<config>,config>(std::move(o)) {}
++ server(server<config> && o) : endpoint<connection<config>,config>(std::move(o)) {}
+
+ #ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
+ // no move assignment operator because of const member variables
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH] package/websocketpp: fix build with C++20
2023-11-03 11:16 [Buildroot] [PATCH] package/websocketpp: fix build with C++20 Michael Nosthoff via buildroot
@ 2023-11-03 19:31 ` Thomas Petazzoni via buildroot
2023-11-03 20:54 ` Michael Nosthoff via buildroot
2023-11-04 13:43 ` Thomas Petazzoni via buildroot
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-03 19:31 UTC (permalink / raw)
To: Michael Nosthoff via buildroot; +Cc: Ryan Barnett
On Fri, 3 Nov 2023 12:16:12 +0100
Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
> websocketpp had some ill-formed usage of template parameters which was
> finally removed in C++20. Hence build fails when building with C++20 support
> enabled.
>
> The patch is already in the develop branch but no new release was done.
>
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
> ---
> .../websocketpp/0001-fix_cpp20_build.patch | 108 ++++++++++++++++++
> 1 file changed, 108 insertions(+)
> create mode 100644 package/websocketpp/0001-fix_cpp20_build.patch
Since there are no autobuilder failures for this, could you provide a
defconfig that reproduces the build issue?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH] package/websocketpp: fix build with C++20
2023-11-03 19:31 ` Thomas Petazzoni via buildroot
@ 2023-11-03 20:54 ` Michael Nosthoff via buildroot
0 siblings, 0 replies; 5+ messages in thread
From: Michael Nosthoff via buildroot @ 2023-11-03 20:54 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Ryan Barnett, Michael Nosthoff via buildroot
Hi Thomas,
On Friday, November 03, 2023 20:31 CET, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> On Fri, 3 Nov 2023 12:16:12 +0100
> Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
>
>
> Since there are no autobuilder failures for this, could you provide a
> defconfig that reproduces the build issue?
Since this is a Header Only Lib and we only have one other package
depending on it I don't think there is a defconfig which provokes this.
I stumbled across this issue when I started bumping an internal project
to C++20. This issue triggered quite some bug reports in the project [0] and
there are backports to other package managers like vcpkg [1] and
conan [2].
So, as buildroot is in this case also more or less acting like a package manager
when generating the SDK I thought it makes sense to apply this patch here as well.
Regards,
Michael
[0] https://github.com/zaphoyd/websocketpp/pull/1060
[1] https://github.com/microsoft/vcpkg/pull/23669
[2] https://github.com/conan-io/conan-center-index/pull/15295
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH] package/websocketpp: fix build with C++20
2023-11-03 11:16 [Buildroot] [PATCH] package/websocketpp: fix build with C++20 Michael Nosthoff via buildroot
2023-11-03 19:31 ` Thomas Petazzoni via buildroot
@ 2023-11-04 13:43 ` Thomas Petazzoni via buildroot
2023-11-08 20:34 ` Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-11-04 13:43 UTC (permalink / raw)
To: Michael Nosthoff via buildroot; +Cc: Ryan Barnett
Hello Michael,
On Fri, 3 Nov 2023 12:16:12 +0100
Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
> websocketpp had some ill-formed usage of template parameters which was
> finally removed in C++20. Hence build fails when building with C++20 support
> enabled.
>
> The patch is already in the develop branch but no new release was done.
>
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
> ---
> .../websocketpp/0001-fix_cpp20_build.patch | 108 ++++++++++++++++++
> 1 file changed, 108 insertions(+)
> create mode 100644 package/websocketpp/0001-fix_cpp20_build.patch
Thanks a lot, I have extended the commit log with the very useful
details you provided as a reply to my question, and applied to master.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH] package/websocketpp: fix build with C++20
2023-11-04 13:43 ` Thomas Petazzoni via buildroot
@ 2023-11-08 20:34 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2023-11-08 20:34 UTC (permalink / raw)
To: Thomas Petazzoni via buildroot; +Cc: Thomas Petazzoni, Ryan Barnett
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> Hello Michael,
> On Fri, 3 Nov 2023 12:16:12 +0100
> Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
>> websocketpp had some ill-formed usage of template parameters which was
>> finally removed in C++20. Hence build fails when building with C++20 support
>> enabled.
>>
>> The patch is already in the develop branch but no new release was done.
>>
>> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
>> ---
>> .../websocketpp/0001-fix_cpp20_build.patch | 108 ++++++++++++++++++
>> 1 file changed, 108 insertions(+)
>> create mode 100644 package/websocketpp/0001-fix_cpp20_build.patch
> Thanks a lot, I have extended the commit log with the very useful
> details you provided as a reply to my question, and applied to master.
> Thanks!
Committed to 2023.02.x and 2023.08.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-08 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 11:16 [Buildroot] [PATCH] package/websocketpp: fix build with C++20 Michael Nosthoff via buildroot
2023-11-03 19:31 ` Thomas Petazzoni via buildroot
2023-11-03 20:54 ` Michael Nosthoff via buildroot
2023-11-04 13:43 ` Thomas Petazzoni via buildroot
2023-11-08 20:34 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox