-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including spdlog
after fmt
throws an error: no member named 'basic_runtime' in namespace 'fmt'
, but the reverse is fine
#2614
Comments
To use an external fmt library, you must define CMake variable Lines 88 to 89 in 654dbc5
|
Ah whoops, my apologies, sorry for cluttering the issues! EDIT: This still appears to be an issue even after setting the CMake variable, I have done: set(SPDLOG_FMT_EXTERNAL ON CACHE BOOL "Use external fmt library" FORCE)
# ... fetchcontent stuff
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog
GIT_TAG v1.11.0
)
FetchContent_MakeAvailable(spdlog) [build] [7/9] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.o
[build] FAILED: _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.o
[build] ccache /home/user/projects/llvm-project/build/bin/clang++ -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -I/home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include -I/home/user/projects/bustub-cpp-v2/build/sanitize/_deps/fmt-src/include -g -fcolor-diagnostics -std=c++2b -MD -MT _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.o -MF _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.o.d -o _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.o -c /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/src/spdlog.cpp
[build] In file included from /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/src/spdlog.cpp:8:
[build] In file included from /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/spdlog-inl.h:7:
[build] In file included from /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/spdlog.h:12:
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/common.h:168:111: error: no member named 'basic_runtime' in namespace 'fmt'
[build] std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value>
[build] ~~~~~^
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/common.h:168:125: error: 'Char' does not refer to a value
[build] std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value>
[build] ^
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/common.h:165:25: note: declared here
[build] template<class T, class Char = char>
[build] ^
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/common.h:168:130: error: expected '(' for function-style cast or type construction
[build] std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value>
[build] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/common.h:168:133: error: expected class name
[build] std::is_convertible<T, fmt::basic_string_view<Char>>::value || std::is_same<remove_cvref_t<T>, fmt::basic_runtime<Char>>::value>
[build] ^
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/common.h:188:123: error: no member named 'value' in 'spdlog::is_convertible_to_basic_format_string<const fmt::basic_string_view<char> &>'
[build] struct is_convertible_to_any_format_string : std::integral_constant<bool, is_convertible_to_basic_format_string<T, char>::value ||
[build] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/logger.h:106:48: note: in instantiation of template class 'spdlog::is_convertible_to_any_format_string<const fmt::basic_string_view<char> &>' requested here
[build] template<class T, typename std::enable_if<!is_convertible_to_any_format_string<const T &>::value, int>::type = 0>
[build] ^
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/logger.h:107:10: note: while substituting prior template arguments into non-type template parameter [with T = string_view_t]
[build] void log(source_loc loc, level::level_enum lvl, const T &msg)
[build] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[build] /home/user/projects/bustub-cpp-v2/build/sanitize/_deps/spdlog-src/include/spdlog/logger.h:140:9: note: while substituting deduced template arguments into function template 'log' [with T = string_view_t, $1 = (no value)]
[build] log(source_loc{}, lvl, msg);
[build] ^
[build] 5 errors generated. |
The fmt bundled with spdlog v1.11.0 is version 9.1.0. If the latest fmt source code has incompatible changes, spdlog is not guaranteed to work. EDIT: |
Ahh okay, thank you! |
Reproduction:
The text was updated successfully, but these errors were encountered: