Cannot build on ubuntu20
MenosGrandes opened this issue · 1 comments
MenosGrandes commented
mg@E-5CG1500PCG:~/a/format-benchmark$ cat a
[ 14%] Built target benchmark
[ 16%] Built target fmt
[ 17%] Built target concat-benchmark
[ 18%] Building CXX object CMakeFiles/file-benchmark.dir/src/file-benchmark.cc.o
In file included from /home/mg/a/format-benchmark/fmt/include/fmt/compile.h:11,
from /home/mg/a/format-benchmark/src/file-benchmark.cc:2:
/home/mg/a/format-benchmark/src/file-benchmark.cc: In function ‘void fmt_print_compile(benchmark::State&)’:
/home/mg/a/format-benchmark/fmt/include/fmt/format.h:2371:4: error: cannot convert ‘fmt_print_compile(benchmark::State&)::<lambda()>::FMT_COMPILE_STRING’ to ‘fmt::v8::format_string<const char*&>’ {aka ‘fmt::v8::basic_format_string<char, const char*&>’}
2360 | [] { \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2361 | /* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2362 | /* Use a macro-like name to avoid shadowing warnings. */ \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2363 | struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base { \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2364 | using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2365 | FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2366 | operator fmt::basic_string_view<char_type>() const { \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2367 | return fmt::detail_exported::compile_string_to_view<char_type>(s); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2368 | } \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2369 | }; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2370 | return FMT_COMPILE_STRING(); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2371 | }()
| ~^~
| |
| fmt_print_compile(benchmark::State&)::<lambda()>::FMT_COMPILE_STRING
/home/mg/a/format-benchmark/fmt/include/fmt/compile.h:161:5: note: in expansion of macro ‘FMT_STRING_IMPL’
161 | FMT_STRING_IMPL(s, fmt::detail::compiled_string, explicit)
| ^~~~~~~~~~~~~~~
/home/mg/a/format-benchmark/src/file-benchmark.cc:43:15: note: in expansion of macro ‘FMT_COMPILE’
43 | f.print(FMT_COMPILE("{}\n"), test_data);
| ^~~~~~~~~~~
In file included from /home/mg/a/format-benchmark/src/file-benchmark.cc:3:
/home/mg/a/format-benchmark/fmt/include/fmt/os.h:453:59: note: initializing argument 1 of ‘void fmt::v8::ostream::print(fmt::v8::format_string<T ...>, T&& ...) [with T = {const char*&}; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, const char*&>]’
453 | template <typename... T> void print(format_string<T...> fmt, T&&... args) {
| ~~~~~~~~~~~~~~~~~~~~^~~
In file included from /home/mg/a/format-benchmark/fmt/include/fmt/compile.h:11,
from /home/mg/a/format-benchmark/src/file-benchmark.cc:2:
/home/mg/a/format-benchmark/src/file-benchmark.cc: In function ‘void fmt_print_compile_default(benchmark::State&)’:
/home/mg/a/format-benchmark/fmt/include/fmt/format.h:2371:4: error: cannot convert ‘fmt_print_compile_default(benchmark::State&)::<lambda()>::FMT_COMPILE_STRING’ to ‘fmt::v8::format_string<const char*&>’ {aka ‘fmt::v8::basic_format_string<char, const char*&>’}
2360 | [] { \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2361 | /* Use the hidden visibility as a workaround for a GCC bug (#1973). */ \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2362 | /* Use a macro-like name to avoid shadowing warnings. */ \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2363 | struct FMT_GCC_VISIBILITY_HIDDEN FMT_COMPILE_STRING : base { \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2364 | using char_type = fmt::remove_cvref_t<decltype(s[0])>; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2365 | FMT_MAYBE_UNUSED FMT_CONSTEXPR explicit \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2366 | operator fmt::basic_string_view<char_type>() const { \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2367 | return fmt::detail_exported::compile_string_to_view<char_type>(s); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2368 | } \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2369 | }; \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2370 | return FMT_COMPILE_STRING(); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2371 | }()
| ~^~
| |
| fmt_print_compile_default(benchmark::State&)::<lambda()>::FMT_COMPILE_STRING
/home/mg/a/format-benchmark/fmt/include/fmt/compile.h:161:5: note: in expansion of macro ‘FMT_STRING_IMPL’
161 | FMT_STRING_IMPL(s, fmt::detail::compiled_string, explicit)
| ^~~~~~~~~~~~~~~
/home/mg/a/format-benchmark/src/file-benchmark.cc:63:15: note: in expansion of macro ‘FMT_COMPILE’
63 | f.print(FMT_COMPILE("{}\n"), test_data);
| ^~~~~~~~~~~
In file included from /home/mg/a/format-benchmark/src/file-benchmark.cc:3:
/home/mg/a/format-benchmark/fmt/include/fmt/os.h:453:59: note: initializing argument 1 of ‘void fmt::v8::ostream::print(fmt::v8::format_string<T ...>, T&& ...) [with T = {const char*&}; fmt::v8::format_string<T ...> = fmt::v8::basic_format_string<char, const char*&>]’
453 | template <typename... T> void print(format_string<T...> fmt, T&&... args) {
| ~~~~~~~~~~~~~~~~~~~~^~~
make[2]: *** [CMakeFiles/file-benchmark.dir/build.make:63: CMakeFiles/file-benchmark.dir/src/file-benchmark.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:286: CMakeFiles/file-benchmark.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
mg@E-5CG1500PCG:~/a/format-benchmark$ gcc --version
gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mg@E-5CG1500PCG:~/a/format-benchmark$ g++ --version
g++ (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mg@E-5CG1500PCG:~/a/format-benchmark$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
mg@E-5CG1500PCG:~/a/format-benchmark$ git log -1
commit 5d43f40f588fc11182e7e5fb86cebe85a0c21992 (HEAD -> master, origin/master, origin/HEAD)
Author: Victor Zverovich <viz@fb.com>
Date: Tue Feb 15 15:42:27 2022 -0800
Update fmt
Why I cannot build it on Ubuntu 20.04 LTS?
Any ideas?