Project

General

Profile

Actions

Bug #54265

closed
CB GS

s3select: c++20 compilation error in boost/msm/back/state_machine.hpp

Bug #54265: s3select: c++20 compilation error in boost/msm/back/state_machine.hpp

Added by Casey Bodley almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

set CMAKE_CXX_STANDARD=20:

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1157df00a19..b20e43b6bbb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -211,8 +211,8 @@ if(HAVE_INTEL)
   endif()
 endif()

-# require c++17
-set(CMAKE_CXX_STANDARD 17)
+# require c++20
+set(CMAKE_CXX_STANDARD 20)
 set(CMAKE_CXX_EXTENSIONS OFF)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_C_STANDARD 99)

fails with gcc 11.2.1 and boost 1.76:

In file included from /home/cbodley/ceph/src/s3select/include/s3select_csv_parser.h:5,
                 from /home/cbodley/ceph/src/s3select/include/s3select.h:14,
                 from /home/cbodley/ceph/src/rgw/rgw_s3select_private.h:35,
                 from /home/cbodley/ceph/src/rgw/rgw_s3select.cc:4:
/usr/include/boost/msm/back/state_machine.hpp: At global scope:
/usr/include/boost/msm/back/state_machine.hpp:1593:37: error: expected unqualified-id before ‘)’ token
 1593 |      state_machine<A0,A1,A2,A3,A4 >()
      |                                     ^
/usr/include/boost/msm/back/state_machine.hpp:1612:15: error: expected ‘)’ before ‘const’
 1612 |          (Expr const& expr,typename ::boost::enable_if<typename ::boost::proto::is_expr<Expr>::type >::type* =0)
      |          ~    ^~~~~~
      |               )
/usr/include/boost/msm/back/state_machine.hpp:1690:11: error: expected ‘)’ before ‘&&’ token
 1690 |     >(ARG0&& t0,ARG&&... t)
      |      ~    ^~
      |           )
/usr/include/boost/msm/back/state_machine.hpp:1707:11: error: expected ‘)’ before ‘const’
 1707 |     >(Expr const& expr,ARG&&... t)
      |      ~    ^~~~~~
      |           )
/usr/include/boost/msm/back/state_machine.hpp:1741:21: error: expected ‘)’ before ‘const’
 1741 |          (library_sm const& rhs)
      |          ~          ^~~~~~
      |                     )

i guess it's complaining that the constructor should just be state_machine() without the extra template syntax <A0,A1,A2,A3,A4 >

clang 13 compiles this without error

MB Updated by Matt Benjamin almost 5 years ago Actions #1

  • Assignee set to Gal Salomon

I think I heard that we're eliminating the dependency on boost::state_machine--its apparently a large source of CPU overhead.

Gal, can you comment?

Matt

GS Updated by Gal Salomon almost 5 years ago Actions #2

indeed,
we found that (Girjeh and myself) there is a faster(3x) alternative for boost_state_machine.

the thing is, the other CSV parser may need some "functionality backup" from boost_state_machine.

the other parser is compile-time (template), i.e. each CSV definition should define in compile-time,
while with boost it is dynamic(runtime)

we've just started with this task, we might resolve that issue also.

does s3select the only boost_state_machine user?

MB Updated by Matt Benjamin almost 5 years ago Actions #3

Yes, please use something else.

Matt

CB Updated by Casey Bodley almost 5 years ago Actions #4

Gal Salomon wrote:

does s3select the only boost_state_machine user?

i believe so - at least s3select was the only place i saw this compilation failure with c++20

AE Updated by Adam Emerson over 4 years ago Actions #5

Gal Salomon wrote:

we've just started with this task, we might resolve that issue also.

We can resolve this issue quickly just by bumping to Boost 1.77 or above.

(We should have at least 1.78 or 1.79 for coroutine functionality.)

CB Updated by Casey Bodley over 4 years ago Actions #6

  • Status changed from New to Resolved
Actions

Also available in: PDF Atom