Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add missing include in program_options.cc #2626

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

KrzaQ
Copy link
Contributor

@KrzaQ KrzaQ commented Jan 21, 2025

With GCC 14.2.1 and Boost 1.86.0 the code failed to compile due to unknown type template boost::type. The include has been removed, possibly accidentally, from the non-module build in aa1c8b3

I tried it on Arch with GCC and Boost as above. CMake command (from repository root):
cmake -S . -B build -DSeastar_DOCS=OFF

[  1%] Building CXX object CMakeFiles/seastar.dir/src/core/program_options.cc.o /home/krzaq/code/temp/seastar/src/core/program_options.cc:82:64: error: ‘boost::type’ has not been declared
   82 | memory::alloc_failure_kind from_string(const std::string& val, boost::type<memory::alloc_failure_kind>) {
      |                                                                ^~~~~
/home/krzaq/code/temp/seastar/src/core/program_options.cc:82:75: error: expected ‘,’ or ‘...’ before ‘<’ token
   82 | memory::alloc_failure_kind from_string(const std::string& val, boost::type<memory::alloc_failure_kind>) {
      |                                                                           ^
/home/krzaq/code/temp/seastar/src/core/program_options.cc:93:47: error: ‘boost::type’ has not been declared
   93 | log_level from_string(const std::string& val, boost::type<log_level>) {
      |                                               ^~~~~
/home/krzaq/code/temp/seastar/src/core/program_options.cc:93:58: error: expected ‘,’ or ‘...’ before ‘<’ token
   93 | log_level from_string(const std::string& val, boost::type<log_level>) {
      |                                                          ^
/home/krzaq/code/temp/seastar/src/core/program_options.cc:93:11: error: ambiguating new declaration of ‘seastar::log_level seastar::program_options::{anonymous}::from_string(const std::string&, int)’
   93 | log_level from_string(const std::string& val, boost::type<log_level>) {
      |           ^~~~~~~~~~~

With GCC 14.2.1 and Boost 1.86.0 the code failed to compile due to
unknown type template `boost::type`. The include has been removed,
possibly accidentally, from the non-module build in aa1c8b3

[  1%] Building CXX object CMakeFiles/seastar.dir/src/core/program_options.cc.o
/home/krzaq/code/temp/seastar/src/core/program_options.cc:82:64: error: ‘boost::type’ has not been declared
   82 | memory::alloc_failure_kind from_string(const std::string& val, boost::type<memory::alloc_failure_kind>) {
      |                                                                ^~~~~
/home/krzaq/code/temp/seastar/src/core/program_options.cc:82:75: error: expected ‘,’ or ‘...’ before ‘<’ token
   82 | memory::alloc_failure_kind from_string(const std::string& val, boost::type<memory::alloc_failure_kind>) {
      |                                                                           ^
/home/krzaq/code/temp/seastar/src/core/program_options.cc:93:47: error: ‘boost::type’ has not been declared
   93 | log_level from_string(const std::string& val, boost::type<log_level>) {
      |                                               ^~~~~
/home/krzaq/code/temp/seastar/src/core/program_options.cc:93:58: error: expected ‘,’ or ‘...’ before ‘<’ token
   93 | log_level from_string(const std::string& val, boost::type<log_level>) {
      |                                                          ^
/home/krzaq/code/temp/seastar/src/core/program_options.cc:93:11: error: ambiguating new declaration of ‘seastar::log_level seastar::program_options::{anonymous}::from_string(const std::string&, int)’
   93 | log_level from_string(const std::string& val, boost::type<log_level>) {
      |           ^~~~~~~~~~~
@KrzaQ KrzaQ requested a review from tchaikov January 21, 2025 18:21
@avikivity avikivity merged commit 19dbc3e into scylladb:master Jan 21, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants