gz-sim: ๐Ÿ‘ฉโ€๐ŸŒพ Windows build failures: Unknown CMake command "PROTOBUF_GENERATE_CPP".

Environment

  • OS Version: Windows
  • Source or binary build? source, branches off main (may also happen for ign-gazebo5 branches)

Description

  • Expected behavior: CI passes on Windows
  • Actual behavior:

CI has been flaky on Windows with this error:

CMake Error at src/msgs/CMakeLists.txt:1 (PROTOBUF_GENERATE_CPP):
  Unknown CMake command "PROTOBUF_GENERATE_CPP".

Iโ€™m not sure yet whatโ€™s causing the issue. See for example these 2 builds with the same setup, but different results:

Steps to reproduce

Run Windows CI a few times for branches off main or ign-gazebo5


https://github.com/osrf/buildfarmer/issues/224

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (21 by maintainers)

Most upvoted comments

@traversaro I didnโ€™t consider it. Does it make a difference when the build process reaches https://github.com/protocolbuffers/protobuf/blob/3.13.x/cmake/protobuf-options.cmake#L6 if the variable is defined in the cache?

I may be wrong, but I think that if protobuf_MODULE_COMPATIBLE is in the cache, the option command does nothing (so it does not change the value of protobuf_MODULE_COMPATIBLE) regardless of the value of CMP0077, but I may be wrong.

Iโ€™ll take some time to reproduce this error locally consistently before opening a new fix PR though.