google-protobuf won't build on Linux after adding MinGW platform #7315
Replies: 1 comment 4 replies
-
This sounds like a bug to me, it should be possible to keep the platform-specific version of the gem locked when running on the relevant platform. The only workaround that comes to mind for now is having a separate Gemfile.lock per platform. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had a working Jekyll project that built fine under both real Linux and WSL2, but for reasons not worth getting into, needed to switch from WSL2 to Windows. I ran
bundle lock --add-platform x64-mingw-ucrt01
, the results of which can be seen as this commit: openscenegraph/openscenegraph.io@a72328e. The line I believe to be most important changesgoogle-protobuf (3.25.1-x86_64-linux)
togoogle-protobuf (3.25.1)
, and looking at the contents of the two packages, it appears the former has prebuilt.so
s whereas the latter is source-only, so the shared library needs building.As intended, this made the project work with Windows Ruby, however, it also produced the following errors on Linux:
This log is from using WSL2, but it also happens in CI: https://github.com/AnyOldName3/osg-website-replacement/actions/runs/7266847247/job/19829238652. I believe that's Arch running in Docker (on an Ubuntu host) whereas WSL2 is running Ubuntu, so dependency packages from the OS should be different - they're at least using different versions of Ruby.
-Werror=format-security
is coming fromrbconfig.rb
on the WSL2 system, and I imagine that's where it's coming from on the probably-Arch VM, too. Conceivably, other compiler flags requested by that file could be responsible for the other errors. I don't know whether this is a case of a broken gem (i.e. that these flags should work), a packaging error for Ruby itself (i.e. that these flags shouldn't have ended up inrbconfig.rb
, or some other kind of problem. I also don't know how I'd go about working around this, e.g. by somehow forcingGemfile.lock
to use the prebuilt Linux variant of the package on Linux.Beta Was this translation helpful? Give feedback.
All reactions