Skip to content

Fix FTBFS on gcc 13#50438

Merged
idryomov merged 2 commits intoceph:mainfrom
SUSE:wip-fix-58477
May 23, 2023
Merged

Fix FTBFS on gcc 13#50438
idryomov merged 2 commits intoceph:mainfrom
SUSE:wip-fix-58477

Conversation

@tserong
Copy link
Copy Markdown
Member

@tserong tserong commented Mar 8, 2023

There's a few things in here:

These fix a bunch of gcc 13 build failures. Unfortunately there remains at least one outstanding issue:

[ 5881s] /home/abuild/rpmbuild/BUILD/ceph-18.0.0-2849-g2dba3d74341/src/rgw/driver/rados/rgw_sync_trace.cc: In member function 'int RGWSyncTraceManager::hook_to_admin_command()':
[ 5881s] /home/abuild/rpmbuild/BUILD/ceph-18.0.0-2849-g2dba3d74341/src/rgw/driver/rados/rgw_sync_trace.cc:149:137: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3058
[ 5881s]   149 |                      { "sync trace active_short name=search,type=CephString,req=false", "show active multisite sync entities entries" } };

This was already reported to the GCC folks a few weeks ago:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108773

Hopefully we're good once that ICE is fixed, but in case we're not, I'll leave this PR in draft status for the time being.

Contribution Guidelines

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

SOURCE_DIR "${rocksdb_SOURCE_DIR}"
CMAKE_ARGS ${rocksdb_CMAKE_ARGS}
BINARY_DIR "${rocksdb_BINARY_DIR}"
PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 -i ${_build_rocksdb_list_dir}/rocksdb-gcc-13.patch
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to patch rocksdb on our own? How about merging those changes with the rockdb's upsteam and moving forward the ceph/rocksdb fork?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

agreed, we shouldn't need to patch our own submodule; we could start by merging this change to the ceph/rocksdb fork and carry it there until it merges upstream

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Right, good point. The patch was because I actually started working on fixing gcc 13 issues in SUSE's downstream pacific version, and I wasn't sure I wanted to touch the rocksdb submodule in that context.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Submitted in ceph/rocksdb#44

@rzarzynski rzarzynski requested a review from ronen-fr March 8, 2023 12:10
@tserong
Copy link
Copy Markdown
Member Author

tserong commented Mar 9, 2023

OK, that's a bit cleaner now - thanks everyone!

Still need to sort out rocksdb separately and see how the GCC folks go with that ICE.

@cbodley cbodley mentioned this pull request May 8, 2023
14 tasks
@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented May 15, 2023

is it maybe worth splitting the rocksdb submodule part into a separate PR, so we can merge the rest of it?

@tserong tserong marked this pull request as ready for review May 18, 2023 02:56
@tserong
Copy link
Copy Markdown
Member Author

tserong commented May 18, 2023

is it maybe worth splitting the rocksdb submodule part into a separate PR, so we can merge the rest of it?

good idea - I've just removed the rocksdb patch bits

Copy link
Copy Markdown
Contributor

@idryomov idryomov left a comment

Choose a reason for hiding this comment

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

  • "osd: use std::format_to(...) to fix FTBFS on gcc 13" commit title needs updating since it's switching to fmt::format_to(), not std::format_to()

  • fold "test/librados: fix FTBFS on gcc 13" commit into "common, librbd, msg, test: fix FTBFS on gcc 13" -- no need to have two commits for the same cstdint include issue

This is based on 0024-gcc-13.patch from https://tracker.ceph.com/issues/58477
but with an extra #include <cstdint> to avoid dropping std:: prefixes on
integer types.

Fixes: https://tracker.ceph.com/issues/58477
Signed-off-by: Tim Serong <tserong@suse.com>
@tserong
Copy link
Copy Markdown
Member Author

tserong commented May 19, 2023

jenkins test make check

Copy link
Copy Markdown
Contributor

@idryomov idryomov left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

Without this the build will fail on gcc 13 with errors like:

src/osd/scrubber/scrub_backend.cc:1309:14: error: call of overloaded 'format_to(std::back_insert_iterator<fmt::v9::basic_memory_buffer<char> >, const char [35], const char*, const uint64_t&, const uint64_t&, pg_shard_t&)' is ambiguous
  1309 |     format_to(std::back_inserter(out),
       |     ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
  1310 |               "{}size {} != size {} from shard {}",
       |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1311 |               sep(error),
       |               ~~~~~~~~~~~
  1312 |               candidate.size,
       |               ~~~~~~~~~~~~~~~
  1313 |               auth.size,
       |               ~~~~~~~~~~
  1314 |               auth_shard);
       |               ~~~~~~~~~~~
 /usr/include/fmt/core.h:3233:17: note: candidate: 'OutputIt fmt::v9::format_to(OutputIt, format_string<T ...>, T&& ...) [with OutputIt = std::back_insert_iterator<basic_memory_buffer<char> >; T = {const char*, const long unsigned int&, const long unsigned int&, pg_shard_t&}; typename std::enable_if<detail::is_output_iterator<OutputIt, char>::value, int>::type <anonymous> = 0; format_string<T ...> = basic_format_string<char, const char*, const long unsigned int&, const long unsigned int&, pg_shard_t&>]'
 3233 | FMT_INLINE auto format_to(OutputIt out, format_string<T...> fmt, T&&... args)
      |                 ^~~~~~~~~
 /usr/include/c++/13/format:3761:5: note: candidate: '_Out std::format_to(_Out, format_string<_Args ...>, _Args&& ...) [with _Out = back_insert_iterator<fmt::v9::basic_memory_buffer<char> >; _Args = {const char*, const long unsigned int&, const long unsigned int&, pg_shard_t&}; format_string<_Args ...> = basic_format_string<char, const char*, const long unsigned int&, const long unsigned int&, pg_shard_t&>]'
  3761 |     format_to(_Out __out, format_string<_Args...> __fmt, _Args&&... __args)
       |     ^~~~~~~~~

Fixes: https://tracker.ceph.com/issues/58477
Signed-off-by: Tim Serong <tserong@suse.com>
@cbodley
Copy link
Copy Markdown
Contributor

cbodley commented May 23, 2023

@idryomov do you think this needs full qa? all of the builds except arm64 succeeded in https://shaman.ceph.com/builds/ceph/pr-50438/

@idryomov
Copy link
Copy Markdown
Contributor

@idryomov do you think this needs full qa? all of the builds except arm64 succeeded in https://shaman.ceph.com/builds/ceph/pr-50438/

Probably not. If the builds succeed, it should be fine to merge.

@idryomov idryomov merged commit 9363297 into ceph:main May 23, 2023
@tserong tserong deleted the wip-fix-58477 branch May 24, 2023 06:16
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Jun 23, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Jun 23, 2023
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Jun 23, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Jun 23, 2023
pld-gitsync pushed a commit to pld-linux/ceph that referenced this pull request Jul 2, 2023
@irq0 irq0 mentioned this pull request Jul 5, 2023
11 tasks
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Jul 7, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Jul 7, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Aug 11, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Aug 11, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Aug 26, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Aug 26, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Sep 2, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Sep 7, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Sep 7, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Sep 9, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
bazaah added a commit to bazaah/aur-ceph that referenced this pull request Sep 9, 2023
The changes within are now included in the upstream, and are no longer
needed

Upstream-ref: ceph/ceph#50438
@apteryks
Copy link
Copy Markdown

Is ceph going to be updated to a newer rocksdb version? The 7.9 ish patched old copy it's using doesn't make it easy for downstream users that care about untangling the build (packaging it separately).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants