Skip to content

cmake: work around xxhash 'inlining failed' errors in debug builds#58429

Merged
cbodley merged 1 commit intoceph:mainfrom
cbodley:wip-rgw-xxhash-debug
Jul 4, 2024
Merged

cmake: work around xxhash 'inlining failed' errors in debug builds#58429
cbodley merged 1 commit intoceph:mainfrom
cbodley:wip-rgw-xxhash-debug

Conversation

@cbodley
Copy link
Copy Markdown
Contributor

@cbodley cbodley commented Jul 4, 2024

rgw enables the XXH_INLINE_ALL define, but this causes debug builds to fail with errors like:

In file included from /home/cbodley/ceph/src/rgw/rgw_blake3_digest.h:23,
                 from /home/cbodley/ceph/src/rgw/rgw_cksum_digest.h:19:
In function ‘void XXH3_hashLong_internal_loop(xxh_u64*, const xxh_u8*, size_t, const xxh_u8*, size_t, XXH3_f_accumulate, XXH3_f_scrambleAcc)’,
    inlined from ‘XXH64_hash_t XXH3_hashLong_64b_internal(const void*, size_t, const void*, size_t, XXH3_f_accumulate, XXH3_f_scrambleAcc)’ at /home/cbodley/ceph/src/xxHash/xxhash.h:5607:32,
    inlined from ‘XXH64_hash_t XXH3_hashLong_64b_withSeed_internal(const void*, size_t, XXH64_hash_t, XXH3_f_accumulate, XXH3_f_scrambleAcc, XXH3_f_initCustomSecret)’ at /home/cbodley/ceph/src/xxHash/xxhash.h:5666:42,
    inlined from ‘XXH64_hash_t XXH3_hashLong_64b_withSeed(const void*, size_t, XXH64_hash_t, const xxh_u8*, size_t)’ at /home/cbodley/ceph/src/xxHash/xxhash.h:5685:47:
/home/cbodley/ceph/src/xxHash/xxhash.h:4822:1: error: inlining failed in call to ‘always_inline’ ‘void XXH3_scrambleAcc_sse2(void*, const void*)’: function not considered for inlining
 4822 | XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
      | ^~~~~~~~~~~~~~~~~~~~~
/home/cbodley/ceph/src/xxHash/xxhash.h:5545:19: note: called from here
 5545 |         f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
      |         ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

for build types Debug and RelWithDebInfo, add extra define XXH_NO_INLINE_HINTS to remove the always_inline hints causing this error

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

rgw enables the XXH_INLINE_ALL define, but this causes debug builds to
fail with errors like "inlining failed in call to ‘always_inline’"

for build types Debug and RelWithDebInfo, add extra define
XXH_NO_INLINE_HINTS to remove the always_inline hints causing this error

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley cbodley requested a review from a team as a code owner July 4, 2024 16:32
@cbodley cbodley requested a review from mattbenjamin July 4, 2024 16:33
@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Jul 4, 2024

https://jenkins.ceph.com/job/ceph-pull-requests/138265

/home/jenkins-build/build/workspace/ceph-pull-requests/src/seastar/include/seastar/core/sstring.hh:719:43: error: missing 'typename' prior to dependent type name 'string_type::value_type'
        ret.resize_and_overwrite(size, [](string_type::value_type*, string_type::size_type n) { return n; });
                                          ^~~~~~~~~~~~~~~~~~~~~~~
/home/jenkins-build/build/workspace/ceph-pull-requests/src/seastar/include/seastar/core/sstring.hh:719:69: error: missing 'typename' prior to dependent type name 'string_type::size_type'
        ret.resize_and_overwrite(size, [](string_type::value_type*, string_type::size_type n) { return n; });
                                                                    ^~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

@cbodley
Copy link
Copy Markdown
Contributor Author

cbodley commented Jul 4, 2024

jenkins test make check

@mattbenjamin
Copy link
Copy Markdown
Contributor

this will take hours to build currently, but will merge when it does

@cbodley cbodley merged commit d898fea into ceph:main Jul 4, 2024
@cbodley cbodley deleted the wip-rgw-xxhash-debug branch July 4, 2024 19:39
NitzanMordhai pushed a commit to NitzanMordhai/ceph that referenced this pull request Aug 1, 2024
cmake: work around xxhash 'inlining failed' errors in debug builds

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
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.

2 participants