Bug #57074
common: Latest version of main experiences build failures
0%
Description
Built on:
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
[lflores@folio01 build]$ ninja vstart -j$(nproc)
...
[88/1273] Building CXX object src/common/CMakeFiles/common-common-objs.dir/ceph_fs.cc.o
FAILED: src/common/CMakeFiles/common-common-objs.dir/ceph_fs.cc.o
/usr/bin/g++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DCEPH_INSTALL_DATADIR=\"/usr/local/share/ceph\" -DCEPH_INSTALL_FULL_PKGLIBDIR=\"/usr/local/lib64/ceph\" -DCMAKE_INSTALL_LIBDIR=\"lib64\" -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -Isrc/include -I../src -isystem boost/include -isystem include -isystem ../src/xxHash -isystem ../src/rapidjson/include -isystem ../src/fmt/include -Og -g -fPIC -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wstrict-null-sentinel -Woverloaded-virtual -fno-new-ttp-matching -DCEPH_DEBUG_MUTEX -fstack-protector-strong -D_GLIBCXX_ASSERTIONS -fdiagnostics-color=auto -std=c++2a -MD -MT src/common/CMakeFiles/common-common-objs.dir/ceph_fs.cc.o -MF src/common/CMakeFiles/common-common-objs.dir/ceph_fs.cc.o.d -o src/common/CMakeFiles/common-common-objs.dir/ceph_fs.cc.o -c ../src/common/ceph_fs.cc
In file included from ../src/include/types.h:58,
from ../src/common/ceph_fs.cc:10:
../src/include/object.h:44:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const object_t&) const noexcept = default;
^~
../src/include/object.h:44:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const object_t&) const noexcept = default;
^~
;
../src/include/object.h:44:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const object_t&) const noexcept = default;
^
../src/include/object.h:154:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const sobject_t&) const noexcept = default;
^~
../src/include/object.h:154:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const sobject_t&) const noexcept = default;
^~
;
../src/include/object.h:154:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const sobject_t&) const noexcept = default;
^
In file included from ../src/common/ceph_fs.cc:10:
../src/include/types.h:522:46: error: ‘bool shard_id_t::operator==(const shard_id_t&) const’ cannot be defaulted
bool operator==(const shard_id_t&) const = default;
^~~~~~~
../src/include/types.h:523:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const shard_id_t&) const = default;
^~
../src/include/types.h:523:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const shard_id_t&) const = default;
^~
;
../src/include/types.h:523:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const shard_id_t&) const = default;
^
../src/include/types.h:552:49: error: ‘bool errorcode32_t::operator==(const errorcode32_t&) const’ cannot be defaulted
bool operator==(const errorcode32_t&) const = default;
^~~~~~~
../src/include/types.h:553:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const errorcode32_t&) const = default;
^~
../src/include/types.h:553:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const errorcode32_t&) const = default;
^~
;
../src/include/types.h:553:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const errorcode32_t&) const = default;
^
[89/1273] Building CXX object src/common/CMakeFiles/common-common-objs.dir/CDC.cc.o
FAILED: src/common/CMakeFiles/common-common-objs.dir/CDC.cc.o
/usr/bin/g++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DCEPH_INSTALL_DATADIR=\"/usr/local/share/ceph\" -DCEPH_INSTALL_FULL_PKGLIBDIR=\"/usr/local/lib64/ceph\" -DCMAKE_INSTALL_LIBDIR=\"lib64\" -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -Isrc/include -I../src -isystem boost/include -isystem include -isystem ../src/xxHash -isystem ../src/rapidjson/include -isystem ../src/fmt/include -Og -g -fPIC -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wstrict-null-sentinel -Woverloaded-virtual -fno-new-ttp-matching -DCEPH_DEBUG_MUTEX -fstack-protector-strong -D_GLIBCXX_ASSERTIONS -fdiagnostics-color=auto -std=c++2a -MD -MT src/common/CMakeFiles/common-common-objs.dir/CDC.cc.o -MF src/common/CMakeFiles/common-common-objs.dir/CDC.cc.o.d -o src/common/CMakeFiles/common-common-objs.dir/CDC.cc.o -c ../src/common/CDC.cc
In file included from ../src/include/types.h:58,
from ../src/common/CDC.h:9,
from ../src/common/CDC.cc:6:
../src/include/object.h:44:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const object_t&) const noexcept = default;
^~
../src/include/object.h:44:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const object_t&) const noexcept = default;
^~
;
../src/include/object.h:44:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const object_t&) const noexcept = default;
^
../src/include/object.h:154:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const sobject_t&) const noexcept = default;
^~
../src/include/object.h:154:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const sobject_t&) const noexcept = default;
^~
;
../src/include/object.h:154:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const sobject_t&) const noexcept = default;
^
In file included from ../src/common/CDC.h:9,
from ../src/common/CDC.cc:6:
../src/include/types.h:522:46: error: ‘bool shard_id_t::operator==(const shard_id_t&) const’ cannot be defaulted
bool operator==(const shard_id_t&) const = default;
^~~~~~~
../src/include/types.h:523:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const shard_id_t&) const = default;
^~
../src/include/types.h:523:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const shard_id_t&) const = default;
^~
;
../src/include/types.h:523:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const shard_id_t&) const = default;
^
../src/include/types.h:552:49: error: ‘bool errorcode32_t::operator==(const errorcode32_t&) const’ cannot be defaulted
bool operator==(const errorcode32_t&) const = default;
^~~~~~~
../src/include/types.h:553:16: error: declaration of ‘operator<=’ as non-function
auto operator<=>(const errorcode32_t&) const = default;
^~
../src/include/types.h:553:16: error: expected ‘;’ at end of member declaration
auto operator<=>(const errorcode32_t&) const = default;
^~
;
../src/include/types.h:553:18: error: expected unqualified-id before ‘>’ token
auto operator<=>(const errorcode32_t&) const = default;
Confirmed that the build is "fixed" when reverting commits from https://github.com/ceph/ceph/pull/47427.
Related issues
History
#1 Updated by Casey Bodley over 1 year ago
one thing that stands out from the command line is '-std=c++2a' instead of '-std=c++20'. what compiler version is running here?
#2 Updated by Laura Flores over 1 year ago
- Related to Bug #57073: install-deps.sh fails with 'Unable to find a match: centos-release-scl' added
#3 Updated by Laura Flores over 1 year ago
The gcc version running here is 8.5.0:
$ gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-15)
For the output above, I had reset the main branch to the latest version, removed the build directory, rerun do_cmake.sh, and compiled.
#4 Updated by Laura Flores over 1 year ago
'-std=c++2a' seems to be the way that gcc versions < 9 add support for C++20, per https://gcc.gnu.org/projects/cxx-status.html:
C++20 Support in GCC
GCC has experimental support for the latest revision of the C++ standard, which was published in 2020.
C++20 features are available since GCC 8. To enable C++20 support, add the command-line parameter -std=c++20 (use -std=c++2a in GCC 9 and earlier) to your g++ command line. Or, to enable GNU extensions in addition to C++20 features, add -std=gnu++20.
This very well could be a dependency issue on my end, I just want to provide all the info.
#5 Updated by Laura Flores over 1 year ago
Per https://en.cppreference.com/w/cpp/compiler_support/20 (found by Mark Nelson), only some features were enabled in GCC 8. The three-way comparison operator was not enabled until GCC 10.
#6 Updated by Laura Flores over 1 year ago
- Related to deleted (Bug #57073: install-deps.sh fails with 'Unable to find a match: centos-release-scl')
#7 Updated by Prashant D over 1 year ago
I have encountered these compilation errors on Ubuntu 20.4.0. Basically you need gcc version >= 10.1 Using install-deps.sh, the gcc version got upgraded from 9.4.0 to 11 on ubuntu 20.4 which resolved the issue for me.
Here is package diff when observed this compilation issue and after running install-deps.sh to upgrade gcc version :
$ diff dpkglist.selections dpkglist.selections.after-install-deps 122a123 > cpp-11 329a331 > g++-11 334a337,338 > gcc-11 > gcc-11-base:amd64 615a620 > libasan6:amd64 882a888 > libgcc-11-dev:amd64 1469a1476 > libstdc++-11-dev:amd64
The default gcc (g++) will be pointing to older gcc version so check what gcc version is picked up by cmake compiler launcher.
$ g++ --version g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Check which compiler has been picked up by CMake :
$ cat build/CMakeFiles/CMakeOutput.log|grep "Compiler:" Compiler: /usr/bin/g++-11 Compiler: /usr/bin/gcc-11
On CentOS 8, the latest gcc available is 8.5.0. This will put limitation for install-deps.sh on centos 8. We need to look for a alternative way like manually installing gcc version 10/11 from source code on centos 8 or limiting the scope of ceph code from compiler perspective.
#8 Updated by Kefu Chai over 1 year ago
Laura, i am sorry for the inconvenience.
this is expected if the stock gcc compiler on an aged (even not ancient) distro is used to compile the tree. that's why we updated our CI/CD workflows to use gcc-11 from ppa repo on ubuntu focal and gcc-toolset-11 on centos 8.
when it comes to developers, i think we should have sent a mail to ceph-devel to update them on this. i.e., in addition Casey mail announcing the C++20 change, we need to tell them the tree needs to compile using a more C++20 compliant compiler.
i will send the mail tonight.
#9 Updated by Kefu Chai over 1 year ago
probably another thing i can do is to enable cmake to error out if a C++ compiler not compliant with C++20 standard is configured to compile the tree.
#10 Updated by Laura Flores over 1 year ago
- Related to Bug #57073: install-deps.sh fails with 'Unable to find a match: centos-release-scl' added
#11 Updated by Laura Flores over 1 year ago
@Kefu the main issue seems to be that install-deps is broken for Centos 8 Stream; currently, it halts when trying to install `centos-release-scl`. We need to get install-deps working in order to get the right compiler version for Centos 8 Stream.
I have linked the related issue (#57073).
#12 Updated by Laura Flores over 1 year ago
- Status changed from New to Duplicate
#13 Updated by Laura Flores over 1 year ago
- Related to deleted (Bug #57073: install-deps.sh fails with 'Unable to find a match: centos-release-scl')
#14 Updated by Laura Flores over 1 year ago
- Duplicates Bug #57073: install-deps.sh fails with 'Unable to find a match: centos-release-scl' added