Bug #64254
openPR check builds fail because clang isn't available
0%
Description
from https://jenkins.ceph.com/job/ceph-pull-requests/128387/consoleFull
during src/script/run-make.sh
, install-deps.sh
fails to install clang:
The following packages have unmet dependencies: libclang-common-14-dev : Depends: libllvm14 (= 1:14.0.0-1ubuntu1.1) but 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127 is to be installed libclang-cpp14 : Depends: libllvm14 (= 1:14.0.0-1ubuntu1.1) but 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127 is to be installed E: Unable to correct problems, you have held broken packages.
discover_compiler()
looks for the latest clang version, but doesn't find any so defaults to gcc:
CI_DEBUG: Finding compiler for ci-build CI_DEBUG: Our cmake_opts are: -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
the build ends up failing due to warnings from the cpp_redis submodule:
[243/2719] Building CXX object src/cpp_redis/CMakeFiles/cpp_redis.dir/sources/core/client.cpp.o FAILED: src/cpp_redis/CMakeFiles/cpp_redis.dir/sources/core/client.cpp.o /usr/bin/ccache /usr/bin/g++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_HAS_IO_URING -DBOOST_ASIO_NO_TS_EXECUTORS -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__linux__ -I/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/include -I/home/jenkins-build/build/workspace/ceph-pull-requests/src -I/home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/includes -I/home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/deps/include -I/home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/tacopie/includes -isystem /opt/ceph/include -isystem /home/jenkins-build/build/workspace/ceph-pull-requests/build/include -std=c++11 -W -Wall -Wextra -O3 -Og -Werror -fPIC -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DBOOST_PHOENIX_STL_TUPLE_H_ -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 -Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel -Woverloaded-virtual -DCEPH_DEBUG_MUTEX -fstack-protector-strong -D_GLIBCXX_ASSERTIONS -fdiagnostics-color=auto -std=c++20 -MD -MT src/cpp_redis/CMakeFiles/cpp_redis.dir/sources/core/client.cpp.o -MF src/cpp_redis/CMakeFiles/cpp_redis.dir/sources/core/client.cpp.o.d -o src/cpp_redis/CMakeFiles/cpp_redis.dir/sources/core/client.cpp.o -c /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/sources/core/client.cpp In file included from /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/includes/cpp_redis/core/client.hpp:35, from /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/sources/core/client.cpp:23: /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/includes/cpp_redis/core/sentinel.hpp: In lambda function: /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/includes/cpp_redis/core/sentinel.hpp:109:58: error: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Werror=deprecated] 109 | if (!m_sync_condvar.wait_for(lock_callback, timeout, [=] { | ^ /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/includes/cpp_redis/core/sentinel.hpp:109:58: note: add explicit ‘this’ or ‘*this’ capture In file included from /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/sources/core/client.cpp:23: (snip) /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/sources/core/client.cpp: In lambda function: /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/sources/core/client.cpp:4031:19: error: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Werror=deprecated] 4031 | return exec_cmd([=](const reply_callback_t& cb) -> client& { return zunionstore(destination, numkeys, keys, weights, method, cb); }); | ^ /home/jenkins-build/build/workspace/ceph-pull-requests/src/cpp_redis/sources/core/client.cpp:4031:19: note: add explicit ‘this’ or ‘*this’ capture cc1plus: all warnings being treated as errors
in earlier successful builds (ex. https://jenkins.ceph.com/job/ceph-pull-requests/128316/consoleFull):
clang is already the newest version (1:14.0-55~exp2). ... CI_DEBUG: Finding compiler for ci-build CI_DEBUG: Our cmake_opts are: -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang-14
and cpp_redis compiles/links without warnings/errors
[317/2719] Linking CXX static library lib/libcpp_redis.a
Updated by Zack Cerza 3 months ago
Version numbers like 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127
don't look like something Ubuntu would ship, so I logged into irvingi05 to take a look.
Sure enough:
# apt-cache policy libllvm14 libllvm14: Installed: 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127 Candidate: 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127 Version table: *** 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127 100 100 /var/lib/dpkg/status 1:14.0.0-1ubuntu1.1 500 500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages 1:14.0.0-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
From /var/log/apt/history.log
:
Start-Date: 2024-01-24 09:37:54 Commandline: apt-get -y --fix-missing remove libclang-common-12-dev libclang-common-13-dev libclang-common-14-dev libclang-common-16-dev libclang-cpp12 libclang-cpp13 libclang-cpp14 libclang-cpp16 li bclang1-12 libclang1-13 libclang1-14 libclang1-16 clang-12 clang-14 clang Requested-By: jenkins-build (1109) Upgrade: lld-14:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116, 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127), llvm-14-tools:amd64 (1:14.0.6~++20221020091 828+f28c006a5895-1~exp1~20221020211906.116, 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127), libllvm13:amd64 (1:13.0.1-2ubuntu2, 1:13.0.1-2ubuntu2.2), libllvm14:amd64 (1:14.0.6~++20 221020091828+f28c006a5895-1~exp1~20221020211906.116, 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127), llvm-14-runtime:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~2022102021 1906.116, 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127), llvm-13-tools:amd64 (1:13.0.1-2ubuntu2, 1:13.0.1-2ubuntu2.2), llvm-13-runtime:amd64 (1:13.0.1-2ubuntu2, 1:13.0.1-2ubuntu2. 2), llvm-14-linker-tools:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116, 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127), llvm-13:amd64 (1:13.0.1-2ubuntu2, 1:13.0.1-2ubuntu2.2), llvm-14:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116, 1:14.0.6~++20230131082223+f28c006a5895-1~exp1~20230131082249.127), llvm-13-linker-tools:amd64 (1 :13.0.1-2ubuntu2, 1:13.0.1-2ubuntu2.2) Remove: llvm-12-dev:amd64 (1:12.0.1-19ubuntu3), lldb-14:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116), llvm-13-dev:amd64 (1:13.0.1-2ubuntu2), llvm-14-dev:amd64 (1:14.0.6~++ 20221020091828+f28c006a5895-1~exp1~20221020211906.116), llvm-16-dev:amd64 (1:16~++20220810053019+e3b5254d7160-1~exp1~20220810173118.341), libclang1-12:amd64 (1:12.0.1-19ubuntu3), libclang1-13:amd64 ( 1:13.0.1-2ubuntu2), libclang1-14:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116), libclang1-16:amd64 (1:16~++20220810053019+e3b5254d7160-1~exp1~20220810173118.341), doxygen:a md64 (1.9.1-2ubuntu2), libclang-common-12-dev:amd64 (1:12.0.1-19ubuntu3), libclang-cpp12:amd64 (1:12.0.1-19ubuntu3), libclang-cpp13:amd64 (1:13.0.1-2ubuntu2), libclang-cpp14:amd64 (1:14.0.6~++2022102 0091828+f28c006a5895-1~exp1~20221020211906.116), libclang-cpp16:amd64 (1:16~++20220810053019+e3b5254d7160-1~exp1~20220810173118.341), libclang-common-13-dev:amd64 (1:13.0.1-2ubuntu2), libclang-common -14-dev:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116), clang-12:amd64 (1:12.0.1-19ubuntu3), clang-14:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116 ), libclang-common-16-dev:amd64 (1:16~++20220810053019+e3b5254d7160-1~exp1~20220810173118.341), clang:amd64 (1:14.0-55~exp2), python3-lldb-14:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~2022 1020211906.116), liblldb-14:amd64 (1:14.0.6~++20221020091828+f28c006a5895-1~exp1~20221020211906.116) End-Date: 2024-01-24 09:37:59
I manually removed libllvm14
, which may allow the next build to proceed.
It'd be helpful if the various scripts in ceph.git were a little more verbose, in particular around when they add extra repos to the machine.
Updated by Leonid Usov 3 months ago
While it's a good thing to keep our workers behaving, I am not sure that cherry-picking a compiler to avoid a legitimate C++ warning is the right approach to fixing the failure that triggered this issue. See https://github.com/ceph/ceph/pull/55383 for an alternative way of resolving the build problem which otherwise could reappear on workers that only have access to a GCC compiler