Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile failure on ubuntu 20.04 (gcc 9.4) #4313

Closed
rossburton opened this issue Jan 17, 2025 · 2 comments
Closed

Compile failure on ubuntu 20.04 (gcc 9.4) #4313

rossburton opened this issue Jan 17, 2025 · 2 comments

Comments

@rossburton
Copy link

When building fmt 11.1.1 and 11.1.2 on Ubuntu 20.04 (g++ 9.4.0), the tests fail:

FAILED: test/CMakeFiles/ostream-test.dir/ostream-test.cc.o
/BUILD/hosttools/g++ -DFMT_SHARED -DGTEST_HAS_STD_WSTRING=1 -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1 -I/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include -isystem /BUILD/work/x86_64-linux/fmt-native/11.1.2/git/test/gtest/. -isystem/BUILD/work/x86_64-linux/fmt-native/11.1.2/recipe-sysroot-native/usr/include -O2 -pipe -fvisibility-inlines-hidden -DNDEBUG -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT test/CMakeFiles/ostream-test.dir/ostream-test.cc.o -MF test/CMakeFiles/ostream-test.dir/ostream-test.cc.o.d -o test/CMakeFiles/ostream-test.dir/ostream-test.cc.o -c /BUILD/work/x86_64-linux/fmt-native/11.1.2/git/test/ostream-test.cc
In file included from /BUILD/work/x86_64-linux/fmt-native/11.1.2/git/test/ostream-test.cc:10:
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/format.h: In instantiation of ‘constexpr decltype (ctx.out()) fmt::v11::formatter<fmt::v11::detail::std_string_view<Char>, Char>::format(fmt::v11::detail::std_string_view<Char>, FormatContext&) const [with FormatContext = fmt::v11::context; Char = char; decltype (ctx.out()) = fmt::v11::basic_appender<char>]’:
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/base.h:1126:54:   required by substitution of ‘template<class Char, class T, class U> decltype ((fmt::v11::formatter<U, Char>().format((* p), (* ctx)), std::true_type())) fmt::v11::detail::has_formatter_impl(T*, fmt::v11::buffered_context<Char>*) [with Char = char; T = fmt::v11::detail::std_string_view<char>; U = fmt::v11::detail::std_string_view<char>]’
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/base.h:1131:43:   required from ‘constexpr bool fmt::v11::detail::has_formatter() [with T = fmt::v11::detail::std_string_view<char>; Char = char]’
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/base.h:1187:62:   required by substitution of ‘template<bool B, class T, class F> using conditional_t = typename std::conditional::type [with bool B = fmt::v11::detail::has_formatter<fmt::v11::detail::std_string_view<char>, char>(); T = fmt::v11::detail::std_string_view<char>&; F = void]’
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/base.h:1187:15:   required by substitution of ‘template<class T, typename std::enable_if<fmt::v11::detail::use_formatter<T, typename std::remove_const<_Tp>::type>::value, int>::type <anonymous> > static fmt::v11::conditional_t<has_formatter<T, char>(), T&, void> fmt::v11::detail::type_mapper<char>::map<T, <enumerator> >(T&) [with T = fmt::v11::detail::std_string_view<char>; typename std::enable_if<fmt::v11::detail::use_formatter<T, typename std::remove_const<_Tp>::type>::value, int>::type <anonymous> = 0]’
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/base.h:1195:57:   required by substitution of ‘template<class T, class Char> using is_formattable = fmt::v11::bool_constant<(! std::is_same<decltype (fmt::v11::detail::type_mapper<Char>::map(declval<typename std::conditional<std::is_void<_Tp>::value, int*, T>::type&>())), void>::value)> [with T = fmt::v11::detail::std_string_view<char>; Char = char]’
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/test/ostream-test.cc:273:3:   required from here
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/format.h:3764:43: error: no matching function for call to ‘fmt::v11::formatter<fmt::v11::detail::std_string_view<char>, char, void>::format(fmt::v11::detail::std_string_view<char>&, fmt::v11::context&) const’
 3764 |       return formatter<Base, Char>::format(value, ctx);             \
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/format.h:3775:1: note: in expansion of macro ‘FMT_FORMAT_AS’
 3775 | FMT_FORMAT_AS(detail::std_string_view<Char>, basic_string_view<Char>);
      | ^~~~~~~~~~~~~
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/format.h:3632:20: note: candidate: ‘template<class FormatContext> constexpr decltype (ctx.out()) fmt::v11::detail::native_formatter<T, Char, TYPE>::format(const T&, FormatContext&) const [with FormatContext = FormatContext; T = fmt::v11::basic_string_view<char>; Char = char; fmt::v11::detail::type TYPE = fmt::v11::detail::type::string_type]’
 3632 | FMT_CONSTEXPR auto native_formatter<T, Char, TYPE>::format(
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/format.h:3632:20: note:   template argument deduction/substitution failed:
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/format.h:3764:44: note:   cannot convert ‘value’ (type ‘fmt::v11::detail::std_string_view<char>’) to type ‘const fmt::v11::basic_string_view<char>&’
 3764 |       return formatter<Base, Char>::format(value, ctx);             \
      |                                            ^~~~~
/BUILD/work/x86_64-linux/fmt-native/11.1.2/git/include/fmt/format.h:3775:1: note: in expansion of macro ‘FMT_FORMAT_AS’
 3775 | FMT_FORMAT_AS(detail::std_string_view<Char>, basic_string_view<Char>);
      | ^~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
@vitaut
Copy link
Contributor

vitaut commented Jan 18, 2025

Fixed in 5f0572a, thanks for reporting.

@vitaut vitaut closed this as completed Jan 18, 2025
@vitaut
Copy link
Contributor

vitaut commented Jan 18, 2025

Will include the fix in the upcoming patch release since it seems important.

brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this issue Jan 19, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

(From OE-Core rev: d1e0cdfc57afccbe289bceebe80d319aa6cb3b55)

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
halstead pushed a commit to yoctoproject/poky that referenced this issue Jan 20, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

(From OE-Core rev: fba726673beb2734cba1bf24d448dd57c4f46b57)

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
halstead pushed a commit to openembedded/openembedded-core that referenced this issue Jan 20, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this issue Jan 21, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

Signed-off-by: Ross Burton <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this issue Jan 21, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

(From OE-Core rev: d1e0cdfc57afccbe289bceebe80d319aa6cb3b55)

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this issue Jan 21, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

(From OE-Core rev: 1792195b1af25478fd3760c89917a3f5acc166a6)

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this issue Jan 22, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

(From OE-Core rev: b9365a7e4b990c77778832f234947c449d321435)

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this issue Jan 22, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

(From OE-Core rev: e55bf13dcc304a7665d7e288b2f5318dc325ca16)

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
brainhoard-github pushed a commit to distro-core-curated-mirrors/poky-contrib that referenced this issue Jan 23, 2025
We don't run or install the tests so there's limited value in building
them, and one of the tests is currently failing to build in fmt-native
on ubuntu 20.04 systems, presumably due the g++ 9.4 being old.

Filed upstream as fmtlib/fmt#4313.

(From OE-Core rev: e55bf13dcc304a7665d7e288b2f5318dc325ca16)

Signed-off-by: Ross Burton <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants