You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to build spdlog 1.12.0 with gcc 5.4.0 in C++14, we get
bash-5.2# cmake -B build -DSPDLOG_BUILD_BENCH=OFF -DSPDLOG_BUILD_EXAMPLE=OFF -DSPDLOG_BUILD_TESTS=OFF -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_COMPILER=<path_to_gcc_54>
-- The CXX compiler identification is GNU 5.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: <path_to_gcc_54> - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build spdlog: 1.12.0
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Build type: Release
-- Generating install
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /spdlog-1.12.0/build
bash-5.2# cmake --build build
[ 12%] Building CXX object CMakeFiles/spdlog.dir/src/spdlog.cpp.o
In file included from /spdlog-1.12.0/include/spdlog/spdlog.h:12:0,
from /spdlog-1.12.0/include/spdlog/spdlog-inl.h:7,
from /spdlog-1.12.0/src/spdlog.cpp:8:
/spdlog-1.12.0/include/spdlog/common.h: In function 'constexpr spdlog::string_view_t spdlog::details::to_string_view(const memory_buf_t&)':
/spdlog-1.12.0/include/spdlog/common.h:351:42: error: call to non-constexpr function 'const T* fmt::v9::detail::buffer<T>::data() const [with T = char]'
return spdlog::string_view_t{buf.data(), buf.size()};
^
gmake[2]: *** [CMakeFiles/spdlog.dir/build.make:76: CMakeFiles/spdlog.dir/src/spdlog.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/spdlog.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
bash-5.2#
When trying to build spdlog 1.12.0 with gcc 5.4.0 in C++14, we get
The problem being that fmt only defines FMT_CONSTEXPR in gcc 6+ (https://github.com/gabime/spdlog/blob/v1.12.0/include/spdlog/fmt/bundled/core.h#L95) while spdlog just does a C++14 support check (https://github.com/gabime/spdlog/blob/v1.12.0/include/spdlog/common.h#L71).
Given https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371, and spdlog using fmt functions supposedly affected by it, I guess spdlog should do the same check?
The text was updated successfully, but these errors were encountered: