In spdlog 1.3.1: apt-file spdlog/fmt/bundled/core.h libspdlog-devel: /usr/include/spdlog/fmt/bundled/core.h In spdlog 1.5.0: rpm -ql libspdlog-devel-1.5.0-alt1 | fgrep /fmt/ /usr/include/spdlog/fmt/bin_to_hex.h /usr/include/spdlog/fmt/fmt.h /usr/include/spdlog/fmt/ostr.h No spdlog/fmt/bundled/ directory at all. But in 1.5.0 source tree it still exists: [spdlog.git] / spdlog / include / spdlog / fmt / bundled / drwxr-xr-x .. -rw-r--r-- 1408 LICENSE.rst blob | history | raw -rw-r--r-- 34870 chrono.h blob | history | raw -rw-r--r-- 22421 color.h blob | history | raw -rw-r--r-- 19797 compile.h blob | history | raw -rw-r--r-- 50302 core.h blob | history | raw -rw-r--r-- 50189 format-inl.h blob | history | raw -rw-r--r-- 116422 format.h blob | history | raw -rw-r--r-- 2870 locale.h blob | history | raw -rw-r--r-- 4607 ostream.h blob | history | raw -rw-r--r-- 9025 posix.h blob | history | raw -rw-r--r-- 21679 printf.h blob | history | raw -rw-r--r-- 11858 ranges.h blob | history | raw
This is due to the following addition in spec: -%cmake +%cmake -DSPDLOG_BUILD_SHARED=ON \ + -DSPDLOG_FMT_EXTERNAL=ON Is there real need for having SPDLOG_FMT_EXTERNAL=ON ?
Опишите, в чём проблема у вас при сборке с новой версией spdlog.
As a result the building of lizardfs failed with the following error: make[2]: Entering directory '/usr/src/RPM/BUILD/lizardfs-3.13.0/BUILD' [ 0%] Building CXX object src/protocol/CMakeFiles/lzfsprotocol.dir/packet.cc.o In file included from /usr/include/spdlog/common.h:38, from /usr/include/spdlog/spdlog.h:12, from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/common/slogger.h:29, from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/common/massert.h:28, from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/common/serialization.h:37, from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/protocol/packet.h:28, from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/protocol/packet.cc:20: /usr/include/spdlog/fmt/fmt.h:22:10: fatal error: spdlog/fmt/bundled/core.h: No such file or directory 22 | #include <spdlog/fmt/bundled/core.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/protocol/CMakeFiles/lzfsprotocol.dir/build.make:63: src/protocol/CMakeFiles/lzfsprotocol.dir/packet.cc.o] Error 1 From /usr/include/spdlog/fmt/fmt.h: #if !defined(SPDLOG_FMT_EXTERNAL) #ifdef SPDLOG_HEADER_ONLY #ifndef FMT_HEADER_ONLY #define FMT_HEADER_ONLY #endif #endif #ifndef FMT_USE_WINDOWS_H #define FMT_USE_WINDOWS_H 0 #endif #include <spdlog/fmt/bundled/core.h> #include <spdlog/fmt/bundled/format.h> #else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib #include <fmt/core.h> #include <fmt/format.h> #endif The problem caused by missed definition of macros SPDLOG_FMT_EXTERNAL, which should be probably defined in libspdlog-devel includes when built with external libfmt. There is /usr/include/spdlog/tweakme.h with SPDLOG_FMT_EXTERNAL comment out. If define SPDLOG_FMT_EXTERNAL while building lizardfs, the compilation succeeds. But it is not the right solution, isn't it?
(Ответ для Andrew Vasilyev на комментарий #3) ... > There is /usr/include/spdlog/tweakme.h with SPDLOG_FMT_EXTERNAL comment > out. > > If define SPDLOG_FMT_EXTERNAL while building lizardfs, the compilation > succeeds. But it is not the right solution, isn't it? Хорошо, я проверяю, чтобы этот макрос был раскомментирован в пакете.
spdlog-1.5.0-alt2 -> sisyphus: Thu Jan 30 2020 Vitaly Lipatov <lav@altlinux.ru> 1.5.0-alt2 - patch tweakme.h to use external libfmt for the library clients (ALT bug 37969)
Спасибо!