Bug #48453
src/librbd/migration/S3Stream.cc:22:10: fatal error: fmt/chrono.h: No such file or directory
% Done:
0%
Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Compiling ceph on a system such as fedora 30 with the latest fmt-devel package available installed results in the following error.
[ 55%] Building CXX object src/librbd/CMakeFiles/rbd_internal.dir/migration/S3Stream.cc.o cd /ceph/build/src/librbd && /usr/bin/c++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -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/ceph/build/src/include -I/ceph/src -isystem /ceph/build/boost/include -isystem /ceph/build/include -isystem /ceph/src/xxHash -isystem /ceph/src/rapidjson/include -g -fPIC -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 -fno-new-ttp-matching -DCEPH_DEBUG_MUTEX -fstack-protector-strong -D_GLIBCXX_ASSERTIONS -fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -std=c++17 -o CMakeFiles/rbd_internal.dir/migration/S3Stream.cc.o -c /ceph/src/librbd/migration/S3Stream.cc /ceph/src/librbd/migration/S3Stream.cc:22:10: fatal error: fmt/chrono.h: No such file or directory 22 | #include <fmt/chrono.h> | ^~~~~~~~~~~~~~ compilation terminated. make[3]: *** [src/librbd/CMakeFiles/rbd_internal.dir/build.make:1643: src/librbd/CMakeFiles/rbd_internal.dir/migration/S3Stream.cc.o] Error 1 make[3]: Leaving directory '/ceph/build' make[2]: *** [CMakeFiles/Makefile2:22855: src/librbd/CMakeFiles/rbd_internal.dir/all] Error 2 make[2]: Leaving directory '/ceph/build' make[1]: *** [CMakeFiles/Makefile2:9528: src/tools/rbd/CMakeFiles/rbd.dir/rule] Error 2 make[1]: Leaving directory '/ceph/build' make: *** [Makefile:2652: rbd] Error 2
History
#1 Updated by Brad Hubbard over 3 years ago
This is due to the code in src/CMakeLists.txt
303 find_package(fmt 5.2.1 QUIET) 304 if(fmt_FOUND) 305 include_directories(SYSTEM "${fmt_INCLUDE_DIR}") 306 else() 307 message(STATUS "Could not find fmt, will build it") 308 add_subdirectory(fmt) 309 include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/fmt/include") 310 endif()
It considers version 5.2.1 acceptable but the commit that introduced fmt/chrono.h landed after 5.2.1
$ git log --oneline ./include/fmt/chrono.h |tail -1 f54f3d0f Move chrono-specific code to a separate header $ git describe --tags f54f3d0f 5.2.1-147-gf54f3d0f
The solution seems to be to bump the minimum version we accept.
#2 Updated by Brad Hubbard over 3 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 38442
#3 Updated by Kefu Chai over 3 years ago
- Status changed from Fix Under Review to Resolved