add missing ostream formatters
Fixes compile on [at least] the following platforms:
- Fedora 37 (spdlog:1.10.0, fmt:9.1.0)
- macOS Ventura (homebrew spdlog:1.11.0 fmt:9.1.0)
https://fmt.dev/latest/api.html#format-api https://fmt.dev/latest/api.html#ostream-api
You need to sign off your git commits with the -s flag.
https://github.com/The-OpenROAD-Project/OpenROAD/pull/2696/checks?check_run_id=10416684588
Looks like this change is not compatible with the current version we support (and use on our CI):
In file included from /OpenROAD/src/dst/src/LoadBalancer.cc:29:
/OpenROAD/src/dst/src/LoadBalancer.h:36:10: fatal error: fmt/ostream.h: No such file or directory
36 | #include <fmt/ostream.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
@kammoh After signing your commit and passing DCO, I would suggest adding some conditional for the proposed fix. Maybe an ifdef depending on the version of fmt as to not break all other installs.
I am opposed to the changes in fmt 9 and don't want to accept these changes (see https://github.com/fmtlib/fmt/issues/3088). This has been discussed in https://github.com/The-OpenROAD-Project/OpenROAD/issues/2386. As I said there, we should use FMT_DEPRECATED_OSTREAM instead.
This change is not sufficient to handle all the missing formatting fmt9 would require (which would be very extensive).
I agree that when/if the ADL-based opt-in feature is available, it would be a cleaner approach. But right now this is the only way to be able compile OpenROAD on recent Linux and macOS setups.
I believe FMT_DEPRECATED_OSTREAM is a better solution. Is there a reason we can't use it?
I believe FMT_DEPRECATED_OSTREAM is a better solution. Is there a reason we can't use it?
any response?
stale