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

Incompatibility with libfmt10? error: 'fmt::v10::detail::type_is_unformattable_for<cppoptlib::Status, char> _' has incomplete type #64

Open
barracuda156 opened this issue Jan 4, 2024 · 4 comments · Fixed by #66

Comments

@barracuda156
Copy link

Is something wrong on my side or libfmt10 is unsupported?

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-73d98008631b8ae1617131cb4896f784ae2ec5fe/src/polysolve/nonlinear/Solver.cpp:511:21:   required from here
/opt/local/include/libfmt10/fmt/core.h:1576:63: error: 'fmt::v10::detail::type_is_unformattable_for<cppoptlib::Status, char> _' has incomplete type
 1576 |     type_is_unformattable_for<T, typename Context::char_type> _;
      |                                                               ^
/opt/local/include/libfmt10/fmt/core.h:1580:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1580 |       formattable,
      |       ^~~~~~~~~~~
/opt/local/include/libfmt10/fmt/core.h:1580:7: note: 'formattable' evaluates to false

May be related to using outdated cppoptlib: #63

@zfergus zfergus linked a pull request Feb 8, 2024 that will close this issue
@barracuda156
Copy link
Author

@zfergus Thank you very much for addressing this!

I will test this soon, need to rebase the patches to use external libfmt (it is still needed, right?).

@zfergus
Copy link
Member

zfergus commented Feb 12, 2024

You should not need to use an external fmt as it is bundled with spdlog (downloaded and compiled through cmake).

@barracuda156
Copy link
Author

As long as it is not strictly required, we would rather use existing ports than build multiple duplicates (and Macports supports several versions of libfmt, that can be chosen, and at least two versions of spdlog). But of course, if some non-standard commit-based version is needed, then using the bundled one is the only feasible option.

@barracuda156
Copy link
Author

@zfergus Tried to build it from d65d1b1 – I get almost the same error, just without cppoptlib now:

/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_polysolve/polysolve/work/polysolve-d65d1b1dbfc06bfe2aa038349f382b80ca4082e3/src/polysolve/nonlinear/Solver.cpp:481:21:   required from here
/opt/local/include/libfmt10/fmt/core.h:1600:63: error: 'fmt::v10::detail::type_is_unformattable_for<polysolve::nonlinear::Status, char> _' has incomplete type
 1600 |     type_is_unformattable_for<T, typename Context::char_type> _;
      |                                                               ^
/opt/local/include/libfmt10/fmt/core.h:1604:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1604 |       formattable,
      |       ^~~~~~~~~~~
/opt/local/include/libfmt10/fmt/core.h:1604:7: note: 'formattable' evaluates to false

Should I switch to an earlier libfmt?

@zfergus zfergus reopened this Feb 24, 2024
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

Successfully merging a pull request may close this issue.

2 participants