Fmt: LTO output from g++ confused in fmt versions >= 6.1.0; generating ODR violation warnings

Created on 20 Jan 2020  Â·  14Comments  Â·  Source: fmtlib/fmt

Even with g++9, it seems that the large refactoring is colliding with bugs in g++'s LTO.

  1. Get the latest from GitHub and build with LTO:
cd /tmp
git clone [email protected]:fmtlib/fmt.git
cd fmt
mkdir installed
mkdir build
cd build
CXX=g++-9 cmake -DCMAKE_CXX_FLAGS="-flto" -DCMAKE_INSTALL_PREFIX:PATH=/tmp/fmt/installed -DFMT_TEST=OFF ..
make install
  1. Setup test case
cd /tmp
mkdir fmt_lto
cd fmt_lto

main.cc:

#include "lib.h"
#include <fmt/core.h>
#include <fmt/format.h>

int main()
{
    fmt::print("Hello, from {}!\n", "tu0");
    tu1_function();
}

lib.h:

void tu1_function();

lib.cc:

#include <fmt/core.h>
#include <fmt/format.h>

void tu1_function()
{
    fmt::print("Hello, from {}!\n", "tu1");

    fmt::memory_buffer buf;
    format_to(buf, "{}", 42);    // replaces itoa(42, buffer, 10)
    format_to(buf, "{:x}", 42);  // replaces itoa(42, buffer, 16)
}
  1. Build with LTO:
g++-9 -std=c++17 -o main -Wall -flto -I/tmp/fmt/installed/include main.cc lib.cc -L/tmp/fmt/installed/lib -lfmt
  • Note that this was not an issue with fmt v6.0.0
  • Also with clang++9 and lld there is no issue in v6.1.2

Most helpful comment

Ok, author's choice.

For those that are scrolling to the bottom looking for a quick solution, you'll need to set CMake globals to something like this:

-DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_STANDARD=17

If you experience this LTO signature incompatibility with g++ compilers.

All 14 comments

Thanks for reporting. Could you post the actual warnings (gcc output)?

/tmp/fmt/installed/include/fmt/format.h:1447:50: warning: type ‘struct int_writer’ violates the C++ One Definition Rule [-Wodr]
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: a different type is defined in another translation unit
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1452:19: note: the first difference of corresponding definitions is field ‘abs_value’
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/include/fmt/format.h:1452:19: note: a field of same name but different type is defined in another translation unit
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: warning: type ‘struct num_writer’ violates the C++ One Definition Rule [-Wodr]
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: a different type is defined in another translation unit
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1541:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1541:21: note: a field of same name but different type is defined in another translation unit
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: warning: type ‘struct __lambda15’ violates the C++ One Definition Rule [-Wodr]
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/include/fmt/format.h:1554:13: note: a different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1554:14: note: the first difference of corresponding definitions is field ‘__this’
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/include/fmt/format.h:1554:14: note: a field of same name but different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: warning: type ‘struct int_writer’ violates the C++ One Definition Rule [-Wodr]
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: a different type is defined in another translation unit
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1452:19: note: the first difference of corresponding definitions is field ‘abs_value’
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/include/fmt/format.h:1452:19: note: a field of same name but different type is defined in another translation unit
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: warning: type ‘struct num_writer’ violates the C++ One Definition Rule [-Wodr]
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: a different type is defined in another translation unit
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1541:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1541:21: note: a field of same name but different type is defined in another translation unit
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: warning: type ‘struct __lambda16’ violates the C++ One Definition Rule [-Wodr]
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/include/fmt/format.h:1554:13: note: a different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1554:14: note: the first difference of corresponding definitions is field ‘__this’
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/include/fmt/format.h:1554:14: note: a field of same name but different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: warning: type ‘struct dec_writer’ violates the C++ One Definition Rule [-Wodr]
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: a different type is defined in another translation unit
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1474:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1474:21: note: a field of same name but different type is defined in another translation unit
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: warning: type ‘struct hex_writer’ violates the C++ One Definition Rule [-Wodr]
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: a different type is defined in another translation unit
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1489:19: note: the first difference of corresponding definitions is field ‘self’
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/include/fmt/format.h:1489:19: note: a field of same name but different type is defined in another translation unit
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: warning: type ‘struct dec_writer’ violates the C++ One Definition Rule [-Wodr]
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: a different type is defined in another translation unit
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1474:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1474:21: note: a field of same name but different type is defined in another translation unit
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: warning: type ‘struct hex_writer’ violates the C++ One Definition Rule [-Wodr]
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: a different type is defined in another translation unit
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1489:19: note: the first difference of corresponding definitions is field ‘self’
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/include/fmt/format.h:1489:19: note: a field of same name but different type is defined in another translation unit
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1197:20: warning: ‘handle_int_type_spec’ violates the C++ One Definition Rule [-Wodr]
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: type mismatch in parameter 2
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: ‘handle_int_type_spec’ was previously declared here
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/include/fmt/format.h:1569:10: warning: type of ‘on_num’ does not match original declaration [-Wlto-type-mismatch]
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: implicit this pointer type mismatch
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: ‘on_num’ was previously declared here
 1569 |     void on_num() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1546:35: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: implicit this pointer type mismatch
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1197:20: warning: ‘handle_int_type_spec’ violates the C++ One Definition Rule [-Wodr]
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: type mismatch in parameter 2
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: ‘handle_int_type_spec’ was previously declared here
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/include/fmt/format.h:1569:10: warning: type of ‘on_num’ does not match original declaration [-Wlto-type-mismatch]
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: implicit this pointer type mismatch
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: ‘on_num’ was previously declared here
 1569 |     void on_num() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1546:35: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: implicit this pointer type mismatch
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1482:10: warning: type of ‘on_dec’ does not match original declaration [-Wlto-type-mismatch]
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: implicit this pointer type mismatch
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: ‘on_dec’ was previously declared here
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1482:10: warning: type of ‘on_dec’ does not match original declaration [-Wlto-type-mismatch]
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: implicit this pointer type mismatch
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: ‘on_dec’ was previously declared here
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1527:10: warning: type of ‘on_oct’ does not match original declaration [-Wlto-type-mismatch]
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: implicit this pointer type mismatch
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: ‘on_oct’ was previously declared here
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1527:10: warning: type of ‘on_oct’ does not match original declaration [-Wlto-type-mismatch]
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: implicit this pointer type mismatch
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: ‘on_oct’ was previously declared here
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1517:10: warning: type of ‘on_bin’ does not match original declaration [-Wlto-type-mismatch]
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: implicit this pointer type mismatch
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: ‘on_bin’ was previously declared here
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1517:10: warning: type of ‘on_bin’ does not match original declaration [-Wlto-type-mismatch]
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: implicit this pointer type mismatch
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: ‘on_bin’ was previously declared here
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1498:10: warning: type of ‘on_hex’ does not match original declaration [-Wlto-type-mismatch]
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: implicit this pointer type mismatch
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: ‘on_hex’ was previously declared here
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1498:10: warning: type of ‘on_hex’ does not match original declaration [-Wlto-type-mismatch]
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: implicit this pointer type mismatch
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: ‘on_hex’ was previously declared here
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
#!/bin/sh
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1458:5: warning: type of ‘__ct_comp ’ does not match original declaration [-Wlto-type-mismatch]
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: implicit this pointer type mismatch
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: ‘__ct_comp ’ was previously declared here
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/include/fmt/format.h:1458:5: warning: type of ‘__ct_base ’ does not match original declaration [-Wlto-type-mismatch]
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: implicit this pointer type mismatch
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: ‘__ct_base ’ was previously declared here
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
kris@ubuntu:/tmp/spdlog_issue$ vi build2.sh
kris@ubuntu:/tmp/spdlog_issue$ ./build2.sh
/tmp/fmt/installed/include/fmt/format.h:1447:50: warning: type ‘struct int_writer’ violates the C++ One Definition Rule [-Wodr]
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: a different type is defined in another translation unit
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1452:19: note: the first difference of corresponding definitions is field ‘abs_value’
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/include/fmt/format.h:1452:19: note: a field of same name but different type is defined in another translation unit
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: warning: type ‘struct num_writer’ violates the C++ One Definition Rule [-Wodr]
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: a different type is defined in another translation unit
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1541:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1541:21: note: a field of same name but different type is defined in another translation unit
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: warning: type ‘struct __lambda15’ violates the C++ One Definition Rule [-Wodr]
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/include/fmt/format.h:1554:13: note: a different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1554:14: note: the first difference of corresponding definitions is field ‘__this’
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/include/fmt/format.h:1554:14: note: a field of same name but different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: warning: type ‘struct int_writer’ violates the C++ One Definition Rule [-Wodr]
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: a different type is defined in another translation unit
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1452:19: note: the first difference of corresponding definitions is field ‘abs_value’
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/include/fmt/format.h:1452:19: note: a field of same name but different type is defined in another translation unit
 1452 |     unsigned_type abs_value;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: warning: type ‘struct num_writer’ violates the C++ One Definition Rule [-Wodr]
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: a different type is defined in another translation unit
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1541:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1541:21: note: a field of same name but different type is defined in another translation unit
 1541 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: warning: type ‘struct __lambda16’ violates the C++ One Definition Rule [-Wodr]
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/include/fmt/format.h:1554:13: note: a different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1554:14: note: the first difference of corresponding definitions is field ‘__this’
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/include/fmt/format.h:1554:14: note: a field of same name but different type is defined in another translation unit
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |              ^
/tmp/fmt/installed/include/fmt/format.h:1554:13: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
 1554 |             [this, s, &group, &digit_index](char_type*& buffer) {
      |             ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: warning: type ‘struct dec_writer’ violates the C++ One Definition Rule [-Wodr]
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: a different type is defined in another translation unit
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1474:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1474:21: note: a field of same name but different type is defined in another translation unit
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: warning: type ‘struct hex_writer’ violates the C++ One Definition Rule [-Wodr]
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: a different type is defined in another translation unit
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1489:19: note: the first difference of corresponding definitions is field ‘self’
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/include/fmt/format.h:1489:19: note: a field of same name but different type is defined in another translation unit
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: warning: type ‘struct dec_writer’ violates the C++ One Definition Rule [-Wodr]
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: a different type is defined in another translation unit
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1474:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1474:21: note: a field of same name but different type is defined in another translation unit
 1474 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: warning: type ‘struct hex_writer’ violates the C++ One Definition Rule [-Wodr]
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: a different type is defined in another translation unit
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1489:19: note: the first difference of corresponding definitions is field ‘self’
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/include/fmt/format.h:1489:19: note: a field of same name but different type is defined in another translation unit
 1489 |       int_writer& self;
      |                   ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: warning: type ‘struct bin_writer’ violates the C++ One Definition Rule [-Wodr]
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: a different type is defined in another translation unit
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1509:21: note: the first difference of corresponding definitions is field ‘abs_value’
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/include/fmt/format.h:1509:21: note: a field of same name but different type is defined in another translation unit
 1509 |       unsigned_type abs_value;
      |                     ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: warning: type ‘struct padded_int_writer’ violates the C++ One Definition Rule [-Wodr]
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: a different type is defined in another translation unit
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1398:7: note: the first difference of corresponding definitions is field ‘f’
 1398 |     F f;
      |       ^
/tmp/fmt/include/fmt/format.h:1398:7: note: a field of same name but different type is defined in another translation unit
 1398 |     F f;
      |       ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1197:20: warning: ‘handle_int_type_spec’ violates the C++ One Definition Rule [-Wodr]
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: type mismatch in parameter 2
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: ‘handle_int_type_spec’ was previously declared here
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/include/fmt/format.h:1569:10: warning: type of ‘on_num’ does not match original declaration [-Wlto-type-mismatch]
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: implicit this pointer type mismatch
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: ‘on_num’ was previously declared here
 1569 |     void on_num() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1546:35: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: implicit this pointer type mismatch
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1197:20: warning: ‘handle_int_type_spec’ violates the C++ One Definition Rule [-Wodr]
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: type mismatch in parameter 2
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1197:20: note: ‘handle_int_type_spec’ was previously declared here
 1197 | FMT_CONSTEXPR void handle_int_type_spec(char spec, Handler&& handler) {
      |                    ^
/tmp/fmt/include/fmt/format.h:1569:10: warning: type of ‘on_num’ does not match original declaration [-Wlto-type-mismatch]
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: implicit this pointer type mismatch
 1569 |     void on_num() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1569:10: note: ‘on_num’ was previously declared here
 1569 |     void on_num() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1540:12: note: type ‘struct num_writer’ itself violates the C++ One Definition Rule
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1540:12: note: the incompatible type is defined here
 1540 |     struct num_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1546:35: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: implicit this pointer type mismatch
 1546 |       template <typename It> void operator()(It&& it) const {
      |                                   ^
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: type ‘const struct num_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1546:35: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1482:10: warning: type of ‘on_dec’ does not match original declaration [-Wlto-type-mismatch]
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: implicit this pointer type mismatch
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: ‘on_dec’ was previously declared here
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1482:10: warning: type of ‘on_dec’ does not match original declaration [-Wlto-type-mismatch]
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: implicit this pointer type mismatch
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1482:10: note: ‘on_dec’ was previously declared here
 1482 |     void on_dec() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1473:12: note: type ‘struct dec_writer’ itself violates the C++ One Definition Rule
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1473:12: note: the incompatible type is defined here
 1473 |     struct dec_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1527:10: warning: type of ‘on_oct’ does not match original declaration [-Wlto-type-mismatch]
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: implicit this pointer type mismatch
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: ‘on_oct’ was previously declared here
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1527:10: warning: type of ‘on_oct’ does not match original declaration [-Wlto-type-mismatch]
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: implicit this pointer type mismatch
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1527:10: note: ‘on_oct’ was previously declared here
 1527 |     void on_oct() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1517:10: warning: type of ‘on_bin’ does not match original declaration [-Wlto-type-mismatch]
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: implicit this pointer type mismatch
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: ‘on_bin’ was previously declared here
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1517:10: warning: type of ‘on_bin’ does not match original declaration [-Wlto-type-mismatch]
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: implicit this pointer type mismatch
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1517:10: note: ‘on_bin’ was previously declared here
 1517 |     void on_bin() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1508:32: note: type ‘struct bin_writer’ itself violates the C++ One Definition Rule
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1508:32: note: the incompatible type is defined here
 1508 |     template <int BITS> struct bin_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1403:33: warning: type of ‘operator()’ does not match original declaration [-Wlto-type-mismatch]
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: implicit this pointer type mismatch
 1403 |     template <typename It> void operator()(It&& it) const {
      |                                 ^
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: type ‘const struct padded_int_writer’ itself violates the C++ One Definition Rule
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: ‘operator()’ was previously declared here
/tmp/fmt/installed/include/fmt/format.h:1403:33: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
/tmp/fmt/include/fmt/format.h:1498:10: warning: type of ‘on_hex’ does not match original declaration [-Wlto-type-mismatch]
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: implicit this pointer type mismatch
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: ‘on_hex’ was previously declared here
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1498:10: warning: type of ‘on_hex’ does not match original declaration [-Wlto-type-mismatch]
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: implicit this pointer type mismatch
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1498:10: note: ‘on_hex’ was previously declared here
 1498 |     void on_hex() {
      |          ^
/tmp/fmt/include/fmt/format.h:1415:8: warning: ‘write_int’ violates the C++ One Definition Rule [-Wodr]
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: type mismatch in parameter 4
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/installed/include/fmt/format.h:1488:12: note: type ‘struct hex_writer’ itself violates the C++ One Definition Rule
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/include/fmt/format.h:1488:12: note: the incompatible type is defined here
 1488 |     struct hex_writer {
      |            ^
/tmp/fmt/installed/include/fmt/format.h:1415:8: note: ‘write_int’ was previously declared here
 1415 |   void write_int(int num_digits, string_view prefix, format_specs specs, F f) {
      |        ^
/tmp/fmt/include/fmt/format.h:1631:30: warning: ‘write_padded’ violates the C++ One Definition Rule [-Wodr]
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: type mismatch in parameter 2
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/installed/include/fmt/format.h:1393:32: note: type ‘struct padded_int_writer’ itself violates the C++ One Definition Rule
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/include/fmt/format.h:1393:32: note: the incompatible type is defined here
 1393 |   template <typename F> struct padded_int_writer {
      |                                ^
/tmp/fmt/installed/include/fmt/format.h:1631:30: note: ‘write_padded’ was previously declared here
 1631 |   template <typename F> void write_padded(const format_specs& specs, F&& f) {
      |                              ^
/tmp/fmt/include/fmt/format.h:1458:5: warning: type of ‘__ct_comp ’ does not match original declaration [-Wlto-type-mismatch]
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: implicit this pointer type mismatch
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: ‘__ct_comp ’ was previously declared here
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/include/fmt/format.h:1458:5: warning: type of ‘__ct_base ’ does not match original declaration [-Wlto-type-mismatch]
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: implicit this pointer type mismatch
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^
/tmp/fmt/installed/include/fmt/format.h:1447:50: note: type ‘struct int_writer’ itself violates the C++ One Definition Rule
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/include/fmt/format.h:1447:50: note: the incompatible type is defined here
 1447 |   template <typename Int, typename Specs> struct int_writer {
      |                                                  ^
/tmp/fmt/installed/include/fmt/format.h:1458:5: note: ‘__ct_base ’ was previously declared here
 1458 |     int_writer(basic_writer<Range>& w, Int value, const Specs& s)
      |     ^

The warnings were introduced by this commit: 6de0454b42a8d0f72d443af09eed30df86c161a4

For some reason gcc thinks that __uint128_t is incompatible when compiled with -std=gnu++11 vs -std=c++17. The solution is to compile your code with the same or compatible options as the library (e.g. compiling with -std=gnu++11 makes the warnings go away) which is generally recommended anyway. Closing as this doesn't appear to be a bug in {fmt} but suggestions how to work around this (or a PR) are welcome.

Thank you for pointing me in the right direction. Unfortunately, there is a very subtle issue here that should be noted. When directing CMake to use C++17, for example replacing step 1 in the test case above with (added -DCMAKE_CXX_STANDARD=17):

cd /tmp
git clone [email protected]:fmtlib/fmt.git
cd fmt
mkdir installed
mkdir build
cd build
CXX=g++-9 cmake -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-flto" -DCMAKE_INSTALL_PREFIX:PATH=/tmp/fmt/installed -DFMT_TEST=OFF ..
make install

The remainder of the test case will still fail because CMake will append -std=gnu++17 instead of -std=c++17. This seems to be the root of the problem when using LTO, a difference between the gnu and std LTO intermediate output.

What does work though is disabling CMake's CXX_EXTENSIONS so that it uses -std=c++17 instead of -std=gnu++17.

I propose that you make this modification to support/cmake/cxx14.cmake because this is why the issue is hidden. While it appears to detect C++17 and set -std=c++17, behind the scenes, CMake is appending -std=gnu++17.

To verify, you can change step 1 in the test case to:

cd /tmp
git clone [email protected]:fmtlib/fmt.git
cd fmt
mkdir installed
mkdir build
cd build
CXX=g++-9 cmake -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-flto -std=c++17" -DCMAKE_INSTALL_PREFIX:PATH=/tmp/fmt/installed -DFMT_TEST=OFF ..
make install

Thanks for the suggestion. I think CMAKE_CXX_EXTENSIONS should be controlled by users and not by {fmt}. Overriding the default won't solve the issue, just make it more likely to occur. BTW using CMake can help avoid such issues via propagation of compiler options between targets.

Yes, ideally that's one of the great features of CMake, unless you override it with a custom version/flags lookup, such as support/cmake/cxx14.cmake.

What I am trying to point out is that the actual result after processing of support/cmake/cxx14.cmake is not what it is expected to be. cxx14.cmake attempts to set the standard to c++17, under CMAKE_CXX_STANDARD=17, but because of the way CMake interprets CMAKE_CXX_STANDARD when CMAKE_CXX_EXTENSION is ON, the result does not match the intent and you end up with a hidden change that while many may not notice, as you can see, it revealed an unrelated conflict.

Notice the attempt to preference choosing the actual standard c++17 first:
support/cmake/cxx14.cmake:

elseif (CMAKE_CXX_STANDARD EQUAL 17)
  check_cxx_compiler_flag(-std=c++17 has_std_17_flag)
  check_cxx_compiler_flag(-std=c++1z has_std_1z_flag)

  if (has_std_17_flag)
    set(CXX_STANDARD_FLAG -std=c++17)
  elseif (has_std_1z_flag)
    set(CXX_STANDARD_FLAG -std=c++1z)
  endif ()

Example:

CXX=g++-9 cmake -DCMAKE_CXX_STANDARD=17  ..
...
-- Build type: Release
-- CXX_STANDARD: 17
-- Performing Test has_std_17_flag
-- Performing Test has_std_17_flag - Success
-- Performing Test has_std_1z_flag
-- Performing Test has_std_1z_flag - Success
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
...

Actual output:

make VERBOSE=1
...
/usr/bin/g++-9  -DFMT_LOCALE -I/tmp/fmt/include  -O3 -DNDEBUG   -std=gnu++17 -o CMakeFiles/fmt.dir/src/format.cc.o -c /tmp/fmt/src/format.cc
...

Where did that gnu++17 come from? That certainly wasn't the intent of cxx14.cmake which tries to explicitly set the value to c++17.

Expected output based on INTENT of support/cmake/cxx14.cmake:

make VERBOSE=1
...
/usr/bin/g++-9  -DFMT_LOCALE -I/tmp/fmt/include  -O3 -DNDEBUG   -std=c++17 -o CMakeFiles/fmt.dir/src/format.cc.o -c /tmp/fmt/src/format.cc
...

So what happens in larger projects, is that because of the manual flag overriding happening in support/cmake/cxx14.cmake you will likely end up with unexpected flags appended as the logic is not actually respected by CMake when CXX_EXTENSIONS is ON (default).

A better solution, especially for a library, is to toggle the CMake flags: CXX_STANDARD_REQUIRED and CXX_EXTENSIONS if you truly need to manually set the CXX_STANDARD_FLAG and you can do so only under those conditions in support/cmake/cxx14.cmake.

support/cmake/cxx14.cmake originates from supporting ancient CMake and should mostly go away so I wouldn't try to draw any conclusions from logic there. The intent is to preserve the defaults as much as possible which means that CMAKE_CXX_EXTENSIONS shouldn't be overridden by {fmt}.

It does not produce the expected output.

If you would please consider changing this concept:

  if (has_std_17_flag)
    set(CXX_STANDARD_FLAG -std=c++17)
  elseif (has_std_1z_flag)
    message("Has x++1z")
    set(CXX_STANDARD_FLAG -std=c++1z)
  endif ()

To this concept:

  if (has_std_17_flag)
    set(CMAKE_CXX_STANDARD_REQUIRED ON)
    set(CMAKE_CXX_EXTENSIONS OFF)
    set(CXX_STANDARD_FLAG -std=c++17)
  elseif (has_std_1z_flag)
    message("Has x++1z")
    set(CXX_STANDARD_FLAG -std=c++1z)
  endif ()

The problems will go away and cxx14.cmake will behave as intended.

It will go away for you because you are using custom compile option but will be introduced for everyone who uses the defaults which is a much bigger problem. -std=gnu++17 is exactly the intended default if GNU extensions are supported.

BTW it would be nice to narrow down the issue to a small repro and report to GCC developers because this is potentially a bug.

While CMAKE_CXX_EXTENSIONS is defaulted to ON, it was never designed to resolve this sort of debate. The idea of it was to allow for evolving standards, but when we have two implementations, that are in conflict with each other (c++17 and gnu++17), and a library attempts to resolve them by checking compiler flags, we end up with a misleading result in the case of {fmt}.

Of course for myself there are many resolutions, but as I was showing by using g++9, the issues are deep in GCC and the breakage in {fmt} only happened very recently. My intent was to preserve the out of the box usability of {fmt}.

If you wish to purely rely on top-level ({fmt} library users) settings, then there shouldn't be any -std overriding in cxx14.cmake at all because nothing else is being done in there except adding risk by setting flags manually. In reality, cxx14.cmake has the clear intention to resolve the ambiguity of CMake when it comes to overlapping version implementations that are in conflict, EDIT: and select the standard over the evolving one, that is what I am trying to correct.

there shouldn't be any -std overriding in cxx14.cmake at all

Yes, those will eventually go away replaced by modern CMake constructs. It won't make any difference for the warnings though.

cxx14.cmake has the clear intention to resolve the ambiguity of CMake

As someone who introduced this file I can assure you that's definitely not the intent =). Also CMake is very clear about its defaults so I don't think there is an ambiguity: https://cmake.org/cmake/help/latest/prop_tgt/CXX_EXTENSIONS.html

Ok, author's choice.

For those that are scrolling to the bottom looking for a quick solution, you'll need to set CMake globals to something like this:

-DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_STANDARD=17

If you experience this LTO signature incompatibility with g++ compilers.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gabime picture gabime  Â·  12Comments

jk-jeon picture jk-jeon  Â·  15Comments

arthurdead picture arthurdead  Â·  12Comments

abrownsword picture abrownsword  Â·  15Comments

sab24 picture sab24  Â·  21Comments