Skip to content
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

Wrong executable published to rubygems for arm64-darwin on > v3.20 #9804

Closed
DerekStride opened this issue Apr 18, 2022 · 4 comments
Closed
Assignees
Labels

Comments

@DerekStride
Copy link

DerekStride commented Apr 18, 2022

What version of protobuf and what language are you using?
Version: > v3.20
Language: Ruby

What operating system (Linux, Windows, ...) and version?

MacOS 12.3.1

What runtime / compiler are you using (e.g., python version or gcc version)

arm64

What did you do?

Steps to reproduce the behavior:

Download either one of the following gems from arm64-darwin:

3.20.1.rc.1 - April 06, 2022 arm64-darwin (274 KB)
3.20.0 - April 01, 2022 arm64-darwin (274 KB)

See all here: https://rubygems.org/gems/google-protobuf/versions

Check the Mach-O Header and it's for x86 architecture (small script to parse the headers: gist://derekstride/mach-o.rb)

What did you expect to see

An executable from arm64 architecture.

What did you see instead?

An executable from x86 architecture.

Error from stacktrace:

Caused by:
LoadError: dlopen(~/.gem/ruby/3.1.0/gems/google-protobuf-3.20.0-arm64-darwin/lib/google/3.1/protobuf_c.bundle, 0x0009): tried: '~/.gem/ruby/3.1.0/gems/google-protobuf-3.20.0-arm64-darwin/lib/google/3.1/protobuf_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) - ~/.gem/ruby/3.1.0/gems/google-protobuf-3.20.0-arm64-darwin/lib/google/3.1/protobuf_c.bundle
@haberman
Copy link
Member

Has this ever worked? I see there is an open bug for it here: #8682

This may have been broken by: #9566. If that's the case, then reverting would break Ruby 3.1 binaries on other platforms.

@haberman
Copy link
Member

Unless there is a quick fix for this, we may have to just disable the arm64 build on macOS for 3.20.1. arm64 users would need to build from a source gem.

@DerekStride
Copy link
Author

DerekStride commented Apr 21, 2022

Has this ever worked? I see there is an open bug for it here: #8682

I don't think so, All existing gems published with pre-built packages for arm64-darwin were broken when I created the issue. If you have access you may want to yank them from RubyGems so projects running on arm64-darwin can build from source as a fallback.

After they are removed from rubygems I think this issue can be closed and #8682 can remain open.

@haberman
Copy link
Member

I've yanked the arm64-darwin gems. Closing in favor of #8682.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants