Conversation
|
22.04.4 (apt) has only clang 14 support so we fallback to gcc(11) instead when requiring 16. |
|
We could also switch off of clang for the make check bots if it's easier to get a more recent gcc. |
the gcc-toolset makes this easy for rpm builds, but ubuntu's toolchain ppa for jammy only goes up to |
ffa750e to
ebafea4
Compare
|
clang 16 is installed successfully but we seem to hit new deprecation issues: irvingi07 will fail make check until this is fixed or #61769 is merged. |
In attempt to update to clang16 some of the code is not yet adapted due to deprecated functions. Let's disable clang 16 usage until ceph#61740 is merged. Signed-off-by: Matan Breizman <[email protected]>
|
I'd argue against We can go through and clean up warnings now and then, that's not a problem. |
once someone cleans up these warnings - how do we ensure that we dont have regressions? (that someone else has to then go clean up?) |
I agree we shouldn't |
I think what I would be happier with is something like this:
I think that would address my main concern of some interaction or minor upgrade breaking things. |
Generally speaking, a compiler upgrade is always going to uncover something new if |
dmick
left a comment
There was a problem hiding this comment.
a few substantive comments, bunch of nits about clean commit titles and messages
| # build a static library with -fPIC that we can link into crypto/compressor plugins | ||
| list(APPEND configure_cmd --with-pic --enable-static --disable-shared) | ||
|
|
||
| set(CFLAGS "-Wno-error=strict-prototypes -Wno-error=unused-but-set-variable") |
There was a problem hiding this comment.
do you have an idea for how we will be able to go remove these workarounds if/when the QATzip library gets fixed? (I know this isn't a new problem, but introducing more things that never get revisited always stings)
There was a problem hiding this comment.
We have dozens of -Wno flags set throughout our cmake/modules and many more in other cmake files. Going over each and every warning disabled / how should we treat each disabled warning is out of the scope of this PR IMO.
There was a problem hiding this comment.
I agree it's out of scope for this PR, but saying that doesn't address the problem. Maybe there's no solution.
|
ACK from core. |
Currently our jammy ci (jenkins) builders are only able to
(apt) install clang 14 as the latest version available.
Clang stable is already at 19 today (i.e we're 5 major releases behind).
Meaning, full support of C++20 and some bugs [1] requiring us to update
the compiler used for make check.
As updating to Ubuntu 24 is not feasable in the near future and
containerized builds is not yet merged - with this patch, we
would get clang-16 directly form llvm installation script.
Note: discover_compiler() would prefer clang-16 even if
clang-14 will be installed by apt in INSTALL_EXTRA_PACKAGES
defined below.
[1] llvm/llvm-project#52696
Signed-off-by: Matan Breizman <[email protected]>
qatzip/configure.ac enables -Werror. However, newer compilers (e.g clang 16) will not compile with the existing warnings identified. The fixes for the warnings are not merged yet [1] in the submodule. Until then, in order to allow for compiler upgrade - we should disable the problematic errors. [1] intel/QATzip#119 Signed-off-by: Matan Breizman <[email protected]>
Signed-off-by: Matan Breizman <[email protected]>
clang16 hides std::format behind `-fexperimental-library` [1]. This is no longer the case with clang 17 [2]. As std::fmt is not used in this file we can clean it up for now. Note: Future commits will aim to switch to clang17. [1] https://prereleases.llvm.org/16.0.0/rc3/projects/libcxx/docs/UsingLibcxx.html#extensions-to-format [2] https://releases.llvm.org/17.0.1/projects/libcxx/docs/ReleaseNotes/17.html Signed-off-by: Matan Breizman <[email protected]>
…er than 14 Signed-off-by: Matan Breizman <[email protected]>
Signed-off-by: Matan Breizman <[email protected]> Signed-off-by: Samuel Just <[email protected]>
Supporting new stable compilers releases early on
should make it easier in the future by preventing introduction of
deperacted code.
As this PR already upgrades to 16 with the relevant fixes, we can
use this opportunity to upgrade to the last stable release available.
Note: Most distinct change here is that -Wvla-extension enabled
by default and will result in lots of warnings.
Signed-off-by: Matan Breizman <[email protected]>
The following warning of: ``` error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] ``` is enabled by default in clang 18 and above. Disable it in our builds due to large anmount of warnings. We can revert this once we handle some of the warnings in future PRs. Signed-off-by: Matan Breizman <[email protected]>
…riable
```
[460/1945] Building C object src/erasure-code/jerasure/CMakeFiles/jerasure_objs.dir/jerasure/src/jerasure.c.o
ceph/src/erasure-code/jerasure/jerasure/src/jerasure.c:722:7: warning: variable 'ddf' set but not used [-Wunused-but-set-variable]
722 | int ddf, cdf;
| ^
ceph/src/erasure-code/jerasure/jerasure/src/jerasure.c:722:12: warning: variable 'cdf' set but not used [-Wunused-but-set-variable]
722 | int ddf, cdf;
| ^
ceph/src/erasure-code/jerasure/jerasure/src/jerasure.c:777:7: warning: variable 'ddf' set but not used [-Wunused-but-set-variable]
777 | int ddf, cdf;
| ^
ceph/src/erasure-code/jerasure/jerasure/src/jerasure.c:777:12: warning: variable 'cdf' set but not used [-Wunused-but-set-variable]
777 | int ddf, cdf;
| ^
4 warnings generated.
```
Signed-off-by: Matan Breizman <[email protected]>
```
Building C object src/libcephfs_proxy/CMakeFiles/cephfs_proxy.dir/proxy_link.c.o
/home/./ceph/src/libcephfs_proxy/proxy_link.c:198:10: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
198 | buffer += len;
| ~~~~~~ ^
/home/./ceph/src/libcephfs_proxy/proxy_link.c:232:18: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
232 | iov->iov_base += len;
| ~~~~~~~~~~~~~ ^
/home/./ceph/src/libcephfs_proxy/proxy_link.c:268:18: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
268 | iov->iov_base += len;
| ~~~~~~~~~~~~~ ^
/home/./ceph/src/libcephfs_proxy/proxy_link.c:328:17: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
328 | iov->iov_base += sizeof(proxy_link_req_t);
| ~~~~~~~~~~~~~ ^
/home/./ceph/src/libcephfs_proxy/proxy_link.c:391:17: warning: arithmetic on a pointer to void is a GNU extension [-Wgnu-pointer-arith]
391 | iov->iov_base += sizeof(proxy_link_ans_t);
| ~~~~~~~~~~~~~ ^
5 warnings generated.
```
Signed-off-by: Matan Breizman <[email protected]>
33e338c to
084d14d
Compare
|
@dmick all comments addressed. Thanks for reviewing. |
|
Another thing to remember to do: C++ changes to accommodate the new checks will need backporting to earlier branches, so that make-check doesn't fail there |
This is handled already. See #61869, squid shouldn't try to compile w/ clang later than 14 so there's no need to backport the changes here. Reef and older already are not using later than 14. |
|
Are you saying that the builders will have multiple versions of clang installed? That'll work |
Yes, I haven't deleted existing clang 14 from any of the builders. discover_compiler is responsible for using the latest possible release available - which in S / R / Q (releases) cases is 14. |
|
jenkins test make check arm64 |
``` error: unknown warning option '-Wno-vla-cxx-extension'; did you mean '-Wno-vla-extension'? [-Werror,-Wunknown-warning-option] ``` Signed-off-by: Matan Breizman <[email protected]>
avoid the following error by disabling clang assembler:
```
[670/2691] Performing build step for 'isal_ext'
FAILED: src/erasure-code/isa/isal_ext-prefix/src/isal_ext-stamp/isal_ext-build src/isa-l/install/lib/libisal.a /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/erasure-code/isa/isal_ext-prefix/src/isal_ext-stamp/isal_ext-build /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/isa-l/install/lib/libisal.a
cd /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/isa-l && /usr/bin/cmake -P /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/erasure-code/isa/isal_ext-prefix/src/isal_ext-stamp/isal_ext-build-Debug.cmake && /usr/bin/cmake -E touch /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/erasure-code/isa/isal_ext-prefix/src/isal_ext-stamp/isal_ext-build
CMake Error at /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/erasure-code/isa/isal_ext-prefix/src/isal_ext-stamp/isal_ext-build-Debug.cmake:37 (message):
Command failed: 2
'/usr/bin/cmake' '-E' 'env' '--unset=DESTDIR' 'make' '-j3'
See also
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/build/src/erasure-code/isa/isal_ext-prefix/src/isal_ext-stamp/isal_ext-build.log
-- Log output is:
...skipping to end...
hile in macro instantiation
crc64_refl_func crc64_ecma_refl_pmull
^
<instantiation>:2:26: error: unexpected token in argument list
movk x7, p1_low_b1, lsl 16
^
<instantiation>:54:2: note: while in macro instantiation
crc64_fold_512b_to_128b
^
crc/aarch64/crc64_ecma_refl_pmull.S:33:1: note: while in macro instantiation
crc64_refl_func crc64_ecma_refl_pmull
^
<instantiation>:3:26: error: unexpected token in argument list
movk x7, p1_low_b2, lsl 32
^
```
Signed-off-by: Matan Breizman <[email protected]>
084d14d to
0ceefb4
Compare
In attempt to update to clang16 some of the code is not yet adapted due to deprecated functions. Let's disable clang 16 usage until ceph/ceph#61740 is merged. Signed-off-by: Matan Breizman <[email protected]>
prerequisites:
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e