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

8.0.0 fails to compile with Debian Jessie's GCC 4.9.2 #2386

Closed
patlkli opened this issue Jun 25, 2021 · 1 comment
Closed

8.0.0 fails to compile with Debian Jessie's GCC 4.9.2 #2386

patlkli opened this issue Jun 25, 2021 · 1 comment

Comments

@patlkli
Copy link
Contributor

patlkli commented Jun 25, 2021

I just tried updating {fmt} from 7.1.3 to 8.0.0 and ran into an issue when building our project on Debian Jessie which sits on GCC 4.9.2.

{fmt} 8.0.0 fails to compile with the following errors:

[  1%] Building CXX object CMakeFiles/fmt.dir/src/format.cc.o
In file included from /fmt/include/fmt/format-inl.h:29:0,
                 from /fmt/src/format.cc:8:
/fmt/include/fmt/format.h: In instantiation of 'constexpr const char fmt::v7::detail::basic_data<>::digits [][2]':
/fmt/include/fmt/format.h:1066:22:   required from here
/fmt/include/fmt/format.h:862:39: error: initializer fails to determine size of 'fmt::v7::detail::basic_data<>::digits'
   FMT_API static constexpr const char digits[][2] = {
                                       ^
/fmt/include/fmt/format.h:862:39: error: array must be initialized with a brace-enclosed initializer
/fmt/include/fmt/format.h: In instantiation of 'constexpr const char fmt::v7::detail::basic_data<>::left_padding_shifts []':
/fmt/include/fmt/format.h:1283:47:   required from here
/fmt/include/fmt/format.h:885:39: error: initializer fails to determine size of 'fmt::v7::detail::basic_data<>::left_padding_shifts'
   FMT_API static constexpr const char left_padding_shifts[] = {31, 31, 0, 1, 0};
                                       ^
/fmt/include/fmt/format.h:885:39: error: array must be initialized with a brace-enclosed initializer
/fmt/include/fmt/format.h: In instantiation of 'constexpr const char fmt::v7::detail::basic_data<>::right_padding_shifts []':
/fmt/include/fmt/format.h:1284:47:   required from here
/fmt/include/fmt/format.h:886:39: error: initializer fails to determine size of 'fmt::v7::detail::basic_data<>::right_padding_shifts'
   FMT_API static constexpr const char right_padding_shifts[] = {0, 31, 0, 1, 0};
                                       ^
/fmt/include/fmt/format.h:886:39: error: array must be initialized with a brace-enclosed initializer
/fmt/include/fmt/format.h: In instantiation of 'constexpr const char fmt::v7::detail::basic_data<>::signs []':
/fmt/include/fmt/format.h:1594:47:   required from here
/fmt/include/fmt/format.h:882:39: error: initializer fails to determine size of 'fmt::v7::detail::basic_data<>::signs'
   FMT_API static constexpr const char signs[] = {0, '-', '+', ' '};
                                       ^
/fmt/include/fmt/format.h:882:39: error: array must be initialized with a brace-enclosed initializer

This is most likely caused by GCC bug #66921, which is fixed in GCC 4.9.4. This version however no longer got into Jessie.

Any chance this could be workarounded in {fmt}?

@vitaut
Copy link
Contributor

vitaut commented Jun 25, 2021

If you happen to know a workaround, a PR would be welcome.

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