OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

add missing ostream formatters

Open kammoh opened this issue 2 years ago • 7 comments

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

kammoh avatar Jan 03 '23 16:01 kammoh

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

QuantamHD avatar Jan 04 '23 01:01 QuantamHD

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.

vvbandeira avatar Jan 05 '23 17:01 vvbandeira

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.

maliberty avatar Jan 08 '23 23:01 maliberty

This change is not sufficient to handle all the missing formatting fmt9 would require (which would be very extensive).

maliberty avatar Jan 08 '23 23:01 maliberty

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.

kammoh avatar Jan 10 '23 16:01 kammoh

I believe FMT_DEPRECATED_OSTREAM is a better solution. Is there a reason we can't use it?

maliberty avatar Jan 10 '23 16:01 maliberty

I believe FMT_DEPRECATED_OSTREAM is a better solution. Is there a reason we can't use it?

any response?

maliberty avatar Jan 16 '23 17:01 maliberty

stale

maliberty avatar Aug 31 '25 23:08 maliberty