Skip to content

Comments

crimson: fix compile errors in clang 19#61890

Merged
Matan-B merged 4 commits intoceph:mainfrom
zhscn:fix-clang-19
Feb 19, 2025
Merged

crimson: fix compile errors in clang 19#61890
Matan-B merged 4 commits intoceph:mainfrom
zhscn:fix-clang-19

Conversation

@zhscn
Copy link
Contributor

@zhscn zhscn commented Feb 19, 2025

Tested with clang 19 and gcc 13.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@zhscn zhscn requested a review from a team as a code owner February 19, 2025 08:17
Copy link
Contributor

@Matan-B Matan-B left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The errors were addressed here: https://github.com/ceph/ceph/pull/61740/commits though it's probably better to have a sperated PR - Thanks for addressing that!

Can you please also cherry pick b08b1f5?

std::forward<OpFunc>(opfunc),
std::forward<Params>(params)...
).template handle_interruption(std::move(efunc));
).template handle_interruption<OnInterrupt>(std::move(efunc));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing template should work, what do you think?
).handle_interruption(std::move(efunc));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this affect the old compiler? I' not sure whether clang-16 could work.

class TriggerContainer final : public TriggerI::TriggerContainerI {
AggregateBlockingEvent& event;
typename decltype(event.events)::iterator iter;
typename decltype(std::declval<AggregateBlockingEvent<T>>().events)::iterator iter;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
we could also use std::list<T> instead of declval

zhscn and others added 4 commits February 19, 2025 18:21
```
ceph/src/crimson/common/operation.cc
In file included from /home/matan/ceph/src/crimson/common/operation.cc:4:
/home/matan/ceph/src/crimson/common/operation.h:312:31: error: no member named 'events' in 'AggregateBlockingEvent<T>'
  312 |       typename decltype(event.events)::iterator iter;
      |                         ~~~~~ ^
1 error generated.
```

Signed-off-by: Matan Breizman <[email protected]>
See: llvm/llvm-project@f46d146
```
common/interruptible_future.h:1182:16: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
 1182 |     ).template handle_interruption(std::move(efunc));
      |                ^
1 error generated.
```

Signed-off-by: Matan Breizman <[email protected]>
@zhscn
Copy link
Contributor Author

zhscn commented Feb 19, 2025

tested with gcc 13 and clang 19

@Matan-B
Copy link
Contributor

Matan-B commented Feb 19, 2025

@Matan-B Matan-B merged commit 0401493 into ceph:main Feb 19, 2025
11 checks passed
@zhscn zhscn deleted the fix-clang-19 branch February 20, 2025 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merged (Pre Tentacle Freeze)

Development

Successfully merging this pull request may close these issues.

2 participants