davidgiven / fluxengine

PSOC5 floppy disk imaging interface
MIT License
361 stars 69 forks source link

Recent protobuf upgrade broke compiling fluxengine #691

Closed VorpalBlade closed 1 year ago

VorpalBlade commented 1 year ago
lib/config.cc: In member function ‘void Config::checkOptionValid(const OptionProto&)’:
lib/config.cc:260:35: error: ‘const class OptionProto’ has no member named ‘requires’; did you mean ‘requires_’?
  260 |     for (const auto& req : option.requires())
      |                                   ^~~~~~~~
      |                                   requires_

This happens with protobuf version 23.3-2, which Arch Linux just upgraded to. This required a rebuild of fluxengine, which failed.

If I downgrade to protobuf 21.12-2, fluxengine builds successfully, but then can't run since the system version of the library is too new.

I'm using the latest git version of fluxengine (0f34ce0278b86ae0571fbf0668a38b650d0caf88 as of writing this), as there are no properly tagged releases.

davidgiven commented 1 year ago

Bah:

https://github.com/envoyproxy/envoy/issues/21010

VorpalBlade commented 1 year ago

Oh, that is annoying, presumably there isn't a version of protobuf that emits both the old and the new name (allowing for a transition period)? Which would mean you:

VorpalBlade commented 1 year ago

Or maybe there is a pre-processor define that you can be conditional on? E.g. some sort of PROTOC_VERSION or something? Some libraries have this.

davidgiven commented 1 year ago

Easiest thing is to just rename the field. This is used only by the config system, which isn't serialised (externally), and requires isn't used anywhere anyway.