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

Support for Apple M1 architecture #8959

Closed
LucaProvencal opened this issue Jan 29, 2021 · 2 comments
Closed

Support for Apple M1 architecture #8959

LucaProvencal opened this issue Jan 29, 2021 · 2 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. type: question Request for information or clarification. Not an issue.

Comments

@LucaProvencal
Copy link

LucaProvencal commented Jan 29, 2021

Hello, I am having the following issue specifically on an Apple M1 machine. Does this gem support this architecture? Perhaps the issue is not with google-cloud-pubsub, but with google/protobuf_c. Thank you

Environment details

  • OS: MacOS 11.0.1 (M1 chip)
  • Ruby version: 2.7.2
  • Gem name and version: google-cloud-pubsub 2.3.1

Steps to reproduce

  1. Install gem
  2. Try to require it

Code example

require "google/cloud/pubsub"

Full backtrace

Failure/Error: require "google/cloud/pubsub"

LoadError:
  cannot load such file -- google/protobuf_c
...
# ------------------
# --- Caused by: ---
# LoadError:
#   dlopen(/Users/lucaprovencal/.rvm/gems/ruby-2.7.2/gems/google-protobuf-3.13.0-universal-darwin/lib/google/2.7/protobuf_c.bundle, 9): no suitable image found.  Did find:
#   	/Users/lucaprovencal/.rvm/gems/ruby-2.7.2/gems/google-protobuf-3.13.0-universal-darwin/lib/google/2.7/protobuf_c.bundle: mach-o, but wrong architecture
#   	/Users/lucaprovencal/.rvm/gems/ruby-2.7.2/gems/google-protobuf-3.13.0-universal-darwin/lib/google/2.7/protobuf_c.bundle: mach-o, but wrong architecture - /Users/lucaprovencal/.rvm/gems/ruby-2.7.2/gems/google-protobuf-3.13.0-universal-darwin/lib/google/2.7/protobuf_c.bundle
#   /Users/lucaprovencal/.rvm/gems/ruby-2.7.2/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
@quartzmo quartzmo added api: pubsub Issues related to the Pub/Sub API. type: question Request for information or clarification. Not an issue. labels Jan 29, 2021
@quartzmo quartzmo self-assigned this Jan 29, 2021
@quartzmo
Copy link
Member

@LucaProvencal Thanks for opening this issue. You are correct, the issue is with google-protobuf, and is generally discussed in protocolbuffers/protobuf#8062. Here's an excerpt from that discussion:

It might take us some time to be able to start publishing precompiled binaries for Apple ARM machines, but you should still be able to use protobuf by building from source.

Regarding Ruby and google-protobuf, there is also a newer issue protocolbuffers/protobuf#8199 that suggests a couple of workarounds. I'm going to close this issue now, can you please comment on protocolbuffers/protobuf#8199 if the workarounds are helpful?

@LucaProvencal
Copy link
Author

LucaProvencal commented Feb 4, 2021

@quartzmo Thanks for linking me to protocolbuffers/protobuf#8199. Yes, it solved the problem along with upgrading grpc to v1.35.0. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants