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

chunked_vector_test fails to compile with recent boost versions #18746

Closed
lkshminarayanan opened this issue May 20, 2024 · 2 comments
Closed
Assignees
Labels
backport/5.4 Issues that should be backported to 5.4 branch once they'll be fixed backport/6.0

Comments

@lkshminarayanan
Copy link
Member

When compiled with boost version 1.82+, chunked_vector_test fails with the following error :

/Scylla/scylladb/test/boost/chunked_vector_test.cc:378:24: error: no member named 'optional' in namespace 'std'
    auto filler = std::optional<exception_safe_class>(checker);
                  ~~~~~^
/Scylla/scylladb/test/boost/chunked_vector_test.cc:378:33: error: 'exception_safe_class' does not refer to a value
    auto filler = std::optional<exception_safe_class>(checker);
                                ^
/Scylla/scylladb/test/boost/chunked_vector_test.cc:139:7: note: declared here
class exception_safe_class {
      ^
2 errors generated.
ninja: build stopped: subcommand failed.

This does compiles with older versions of boost. Although the code is unrelated to boost, the optional library seems to get implicitly included in older versions and not in the newer versions causing this issue. I have verified this by generating the dependency graph with version 78, which has the optional header in the list vs the graph with version 83, which doesn't have that header in the list.

@lkshminarayanan lkshminarayanan self-assigned this May 20, 2024
@lkshminarayanan
Copy link
Member Author

Note that this is a followup to 4bbb66f, so it needs to be backported to older versions.

@lkshminarayanan lkshminarayanan added backport/5.2 backport/5.4 Issues that should be backported to 5.4 branch once they'll be fixed backport/6.0 labels May 20, 2024
lkshminarayanan added a commit to lkshminarayanan/scylladb that referenced this issue May 20, 2024
The chunked_vector_test fails to compile with latest versions of boost
(1.82 and above) due to missing include file. This patch fixes that by
including the appropriate header file to the test.

Fixes scylladb#18746

Signed-off-by: Lakshmi Narayanan Sreethar <lakshmi.sreethar@scylladb.com>
@lkshminarayanan
Copy link
Member Author

Fixed by #18739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/5.4 Issues that should be backported to 5.4 branch once they'll be fixed backport/6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant