-
Notifications
You must be signed in to change notification settings - Fork 280
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
👩🌾 Windows build failures: Unknown CMake command "PROTOBUF_GENERATE_CPP". #990
Comments
I took some time investigating this. I've compared the build logs for these two windows jobs: ign_gazebo-ign-5-win#35 (Failing with The However, the actual new issue is the following:
The Based on previous discussions, I imagine one of the possible two fixes:
I'm not a CMake/Protobuf expert so I don't know if any of those could have undesired side effects. I can help opening a PR for any of these two options if someone else thinks one of those could solve the issue. |
Thank you for the investigation @Blast545 ! I suggest a 3rd alternative: consider that our minimal required version is CMake 3.10, and make sure that all CI is run with higher versions. |
@chapulina I think in any case I will iterate with the CI team to ensure the build process is the same consistently. In terms of the error, I think the I might be wrong about the implications of |
Ah sorry I misread your comment about the version.
Ok, I get it now, this sounds like a good option |
It looks like #1046 didn't do it, we're still getting these failures on |
Based on the logs, it seems like there's same policy is required as part of I'll open a PR there as well. |
I'll take some time to reproduce this error locally consistently before opening a new fix PR though. |
Information about the problem itself: It occurs only for win10-nuc: in the buildfarm. It's a flaky failure. After trying reading more about CMake and these similar issues: I attempted to fix with #1168 and gazebosim/gz-transport#277. However, the policy set on the main However, the variable is cleared after the build process reaches this point: https://github.com/protocolbuffers/protobuf/blob/3.13.x/cmake/protobuf-options.cmake#L6 Causing this error:
|
Instead of dealing with tricky CMake policies, did you considered setting the set(protobuf_MODULE_COMPATIBLE ON CACHE BOOL "") ? Not sure if this fixes the issue, but it avoids the need of dealing with CMake policies. |
As for now I think there could be 2 possible solutions:
|
@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 can give it a try. |
I may be wrong, but I think that if |
I'm seeing it failing on https://build.osrfoundation.org/job/ign_gazebo-pr-win/3364/console |
@traversaro I updated #1168 with your suggestions and still failed: |
@chapulina @j-rivero Do you think it would make sense to instead update the nodes and batch scripts to use |
The issue just happened on beefy again 45 mins ago: |
Umm, that would change all the base dependencies of the whole family of Ignition libraries. Seems like it was in that state from before without major problems until the date but old versions of Ignitions could potentially fail since the platform is totally new. It might be have some sense to define a custom vcpkg snapshot for every Ignition collection, but that is something we don't have support for, at least now. We could try running some experiments with the Ignition versions supported, the https://build.osrfoundation.org/job/_vcpkg_testing_snapshot/ was designed for that. It requires The other way forward would be manually patch vcpkg 2020.11 to include cmake protobuf module from 2021.05.12. |
@j-rivero Which option do you think would be a a better solution for the problem? I'd be glad to help you moving this forward.
If we only have to test for the
I like this one better, but I don't know if it's enough to fix the problem. I'm worried it could be another change with the newer |
Hard to say. First one would roll the ball forward and put us closer to nowadays package versions. Second one is more conservative. @chapulina what do you think?
Oh sorry, forgot to mention: the colcon workspace will build everything up to ign-gazebo including rendering, gui and all the friends.
Yep, this a more stable solution but could be hard to get if simply copying the protobuf module is not enough. |
I say let's do whatever is quicker. We're using vcpkg temporarily (gazebo-tooling/release-tools#373), so I think we shouldn't be putting too much effort into it. |
Thanks for all the feedback on this, this is no longer a problem showing in the buildfarm. |
Environment
main
(may also happen forign-gazebo5
branches)Description
CI has been flaky on Windows with this error:
I'm not sure yet what's causing the issue. See for example these 2 builds with the same setup, but different results:
windows_mad
nodewindows_mad
nodeSteps to reproduce
Run Windows CI a few times for branches off
main
orign-gazebo5
https://github.com/osrf/buildfarmer/issues/224
The text was updated successfully, but these errors were encountered: