vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

Boost 1.74 helper code doesn't build with boost 1.74 on 3.1.20.3 tag

Open insi-eb opened this issue 2 years ago • 1 comments

I need the following patch to be able to build vsomeip 3.1.20.3 with boost 1.74

diff -u -r a/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvfrom_op_ext_local.hpp b/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvfrom_op_ext_local.hpp
--- a/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvfrom_op_ext_local.hpp	2022-05-09 15:06:49.472137948 +0200
+++ b/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvfrom_op_ext_local.hpp	2022-05-09 17:23:08.692467289 +0200
@@ -37,7 +37,7 @@
   reactive_socket_recvfrom_op_base_ext_local(socket_type socket, int protocol_type,
       const MutableBufferSequence& buffers, Endpoint& endpoint,
       socket_base::message_flags flags, func_type complete_func)
-    : reactor_op_ext_local(&reactive_socket_recvfrom_op_base_ext_local::do_perform, complete_func),
+    : reactor_op_ext_local(success_ec, &reactive_socket_recvfrom_op_base_ext_local::do_perform, complete_func),
       socket_(socket),
       protocol_type_(protocol_type),
       buffers_(buffers),
@@ -75,6 +75,7 @@
   MutableBufferSequence buffers_;
   Endpoint& sender_endpoint_;
   socket_base::message_flags flags_;
+  boost::system::error_code success_ec;
 };
 
 template <typename MutableBufferSequence, typename Endpoint,
diff -u -r a/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvmsg_op_ext.hpp b/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvmsg_op_ext.hpp
--- a/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvmsg_op_ext.hpp	2022-05-09 15:06:49.472137948 +0200
+++ b/implementation/helper/1.74/boost/asio/detail/reactive_socket_recvmsg_op_ext.hpp	2022-05-09 17:33:53.920493269 +0200
@@ -41,7 +41,7 @@
   reactive_socket_recvmsg_op_base_ext(const boost::system::error_code& success_ec,
 	  socket_type socket, const MutableBufferSequence& buffers, socket_base::message_flags in_flags,
       socket_base::message_flags& out_flags, func_type complete_func)
-    : reactor_op_ext(&reactive_socket_recvmsg_op_base_ext::do_perform, complete_func),
+    : reactor_op_ext(success_ec, &reactive_socket_recvmsg_op_base_ext::do_perform, complete_func),
       socket_(socket),
       buffers_(buffers),
       in_flags_(in_flags),

insi-eb avatar May 09 '22 15:05 insi-eb

For me this was also necessary to cross-compile vsome-ip 3.1.20.3 with boost 1.74 for the Raspberry Pi 1 with Rasperry Pi OS. Thanks a lot for sharing your findings!

tglane avatar Jun 28 '22 14:06 tglane

Fixed on version 3.3.0 (master branch).

goncaloalmeida avatar Mar 15 '23 17:03 goncaloalmeida

is this also fixed for 3.1.37? It doesn't show up there in the changelog - I cannot move to 3.3.0 due to the C++17 dependency.

insi-eb avatar Mar 16 '23 09:03 insi-eb

@insi-eb in principle not. Please confirm if the problem occurs in 3.1.37.

goncaloalmeida avatar Mar 16 '23 09:03 goncaloalmeida

problem still exists in 3.1.37.1 and patch still applies there

insi-eb avatar Mar 17 '23 09:03 insi-eb

@insi-eb ok, just create the PR and we will analyze it.

goncaloalmeida avatar Mar 17 '23 09:03 goncaloalmeida

is this also fixed for 3.1.37? It doesn't show up there in the changelog - I cannot move to 3.3.0 due to the C++17 dependency.

Hi, In principle 3.3.0 should be C++14. Where are you seeing C++17 dependency? Thanks

fcmonteiro avatar Apr 14 '23 08:04 fcmonteiro

is this also fixed for 3.1.37? It doesn't show up there in the changelog - I cannot move to 3.3.0 due to the C++17 dependency.

Hi, In principle 3.3.0 should be C++14. Where are you seeing C++17 dependency? Thanks

the 3.3.0 changelog says

  • Raise C++ standard used to C++17 on non-Windows platforms

I had assumed that means it is C++17 - will have to check integrating that version in C++14 mode, then

insi-eb avatar Apr 14 '23 08:04 insi-eb

the 3.3.0 changelog says

* Raise C++ standard used to C++17 on non-Windows platforms

I had assumed that means it is C++17 - will have to check integrating that version in C++14 mode, then

is the changelog entry perhaps wrong?

looking at CMakeLists.txt, you changed --std from C++11 to C++14 on non-Windows platform, not to C++17.

Building 3.3.0 doesn't require patching anymore for 1.74/1.76

insi-eb avatar Apr 14 '23 08:04 insi-eb

Yes, I've confirmed that we later downgraded it back to C++14.

fcmonteiro avatar Apr 14 '23 08:04 fcmonteiro