Skip to content
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

deprecated warning with C++14 and external fmt lib #1439

Closed
ClausKlein opened this issue Feb 15, 2020 · 1 comment
Closed

deprecated warning with C++14 and external fmt lib #1439

ClausKlein opened this issue Feb 15, 2020 · 1 comment

Comments

@ClausKlein
Copy link

ClausKlein commented Feb 15, 2020

bash-5.0$ make
mkdir -p ../.build-spdlog-Debug
cd ../.build-spdlog-Debug && cmake -G Ninja -Wdeprecated -Wdev \
      -DUSE_LCOV=OFF -DCMAKE_BUILD_TYPE=Debug \
      -DCMAKE_PREFIX_PATH="/tmp/staging/spdlog//usr/local;/usr/local;/opt/local;/usr" \
      -DCMAKE_STAGING_PREFIX=/usr/local \
      -DSPDLOG_BUILD_EXAMPLE_HO=off -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
      -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=/opt/local/bin/gcc -DCMAKE_CXX_COMPILER=/opt/local/bin/g++ /Users/clausklein/Workspace/cpp/spdlog
-- clang-tidy found: /Users/clausklein/scripts/run-clang-tidy.py
-- cmake source dir: /Users/clausklein/Workspace/cpp/spdlog
-- check target added
-- The CXX compiler identification is GNU 10.0.0
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/g++
-- Check for working CXX compiler: /opt/local/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build spdlog: 1.5.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Build type: Debug
-- Generating examples
-- Generating tests
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'libsystemd'
--   No package 'libsystemd' found
-- Generating install
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    USE_LCOV


-- Build files have been written to: /Users/clausklein/Workspace/cpp/.build-spdlog-Debug
touch .configure-Debug
ln -sf /Users/clausklein/Workspace/cpp/spdlog/../.build-spdlog-Debug/compile_commands.json .
cmake --build ../.build-spdlog-Debug
[1/26] Building CXX object CMakeFiles/spdlog.dir/src/color_sinks.cpp.o
In file included from /Users/clausklein/Workspace/cpp/spdlog/src/color_sinks.cpp:24:
/Users/clausklein/Workspace/cpp/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h: In member function 'void spdlog::sinks::ansicolor_sink<ConsoleMutex>::print_ccode_(const string_view_t&)':
/Users/clausklein/Workspace/cpp/spdlog/include/spdlog/sinks/ansicolor_sink-inl.h:114:53: warning: 'using char_type = char' is deprecated [-Wdeprecated-declarations]
  114 |     fwrite(color_code.data(), sizeof(string_view_t::char_type), color_code.size(), target_file_);
      |                                                     ^~~~~~~~~
In file included from /Users/clausklein/Workspace/cpp/spdlog/include/spdlog/fmt/fmt.h:25,
                 from /Users/clausklein/Workspace/cpp/spdlog/include/spdlog/common.h:38,
                 from /Users/clausklein/Workspace/cpp/spdlog/include/spdlog/logger.h:17,
                 from /Users/clausklein/Workspace/cpp/spdlog/include/spdlog/async_logger.h:17,
                 from /Users/clausklein/Workspace/cpp/spdlog/include/spdlog/async.h:17,
                 from /Users/clausklein/Workspace/cpp/spdlog/src/color_sinks.cpp:11:
/usr/local/include/fmt/core.h:316:9: note: declared here
  316 |   using char_type FMT_DEPRECATED_ALIAS = Char;
      |         ^~~~~~~~~
[25/26] Building CXX object tests/CMakeFiles/spdlog-utests.dir/main.cpp.o
FAILED: tests/CMakeFiles/spdlog-utests.dir/main.cpp.o 
ccache /opt/local/bin/g++  -DFMT_LOCALE -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -I/Users/clausklein/Workspace/cpp/spdlog/include -isystem /usr/local/include -g   -Wall -Wextra -Wconversion -pedantic -Wfatal-errors -std=c++14 -MD -MT tests/CMakeFiles/spdlog-utests.dir/main.cpp.o -MF tests/CMakeFiles/spdlog-utests.dir/main.cpp.o.d -o tests/CMakeFiles/spdlog-utests.dir/main.cpp.o -c /Users/clausklein/Workspace/cpp/spdlog/tests/main.cpp
In file included from /Users/clausklein/Workspace/cpp/spdlog/tests/main.cpp:2:
/Users/clausklein/Workspace/cpp/spdlog/tests/catch.hpp: In constructor 'Catch::AssertionHandler::AssertionHandler(const Catch::StringRef&, const Catch::SourceLineInfo&, Catch::StringRef, Catch::ResultDisposition::Flags)':
/Users/clausklein/Workspace/cpp/spdlog/tests/catch.hpp:6516:5: error: incorrect sharing of tree nodes
 6516 |     AssertionHandler::AssertionHandler
      |     ^~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
ninja: build stopped: subcommand failed.
make: *** [GNUmakefile:72: all] Fehler 1
bash-5.0$ 

cc (MacPorts gcc10 10-20200105_1) 10.0.0 20200105 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bash-5.0$ 

build.log

@ClausKlein ClausKlein changed the title deprecated warning wit C++14 and external fmt lib deprecated warning with C++14 and external fmt lib Feb 15, 2020
@gabime gabime closed this as completed in 76d94e6 Feb 15, 2020
@gabime
Copy link
Owner

gabime commented Feb 15, 2020

Fixed. Thanks

gabime added a commit that referenced this issue Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants