Skip to content

ruby: use x86_64 binary on M1 macs#25756

Merged
apolcyn merged 1 commit intogrpc:masterfrom
bouk:arm-rosetta
Apr 7, 2021
Merged

ruby: use x86_64 binary on M1 macs#25756
apolcyn merged 1 commit intogrpc:masterfrom
bouk:arm-rosetta

Conversation

@bouk
Copy link
Copy Markdown
Contributor

@bouk bouk commented Mar 18, 2021

On M1 macs we can rely on rosetta. Right now architecture defaults to 32-bit for those machines, which doesn't work

Related to #25755

cc @jtattermusch

flavorjones added a commit to flavorjones/grpc that referenced this pull request Mar 23, 2021
Please note that this work simplifies the Darwin rubygem build,
and addresses inconsistencies in packaging that result in issues
like grpc#25060, but introduces some notable changes:

- ships "x86_64-darwin" and "arm64-darwin" platform gems
- stops shipping "universal-darwin" platform gem
- drop support for i386 darwin

It's unclear to me whether grpc should continue to support i386
Darwin, and so I'm open to learning more about this.

Related to:

- grpc#25429
- grpc#25755
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Mar 24, 2021
Using RCD for these platforms unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25755
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Mar 24, 2021
Using RCD for these platforms unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25755
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Mar 24, 2021
Using RCD for these platforms unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25755
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Mar 24, 2021
Using RCD for these platforms unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25755
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Mar 25, 2021
Using RCD for these platforms unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25755
- grpc#25756
@bbuchalter
Copy link
Copy Markdown
Contributor

I think we just need an entry in the release notes to get the Mergable check to pass?

@apolcyn apolcyn self-assigned this Mar 31, 2021
@apolcyn apolcyn added kokoro:force-run lang/ruby release notes: yes Indicates if PR needs to be in release notes labels Mar 31, 2021
@nicolasnoble
Copy link
Copy Markdown
Contributor

I think we just need an entry in the release notes to get the Mergable check to pass?

not necessarily, no :-) You can actually set it to "No" and it'll make it happy too.

@nicolasnoble
Copy link
Copy Markdown
Contributor

So I'm not against the change, but overall, the M1 situation feels janky and unstable. Without actual continuous integration testing, this isn't making me feel warm and fuzzy. I'd love if there was an actual note somewhere about how M1 is supported for now in "best effort" mode, and that there's strictly no guarantee whatsoever, given how we just can't test it.

@apolcyn apolcyn merged commit 1fdc534 into grpc:master Apr 7, 2021
flavorjones added a commit to flavorjones/grpc that referenced this pull request Apr 16, 2021
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Jun 10, 2021
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Jun 14, 2021
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Jul 16, 2021
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Aug 20, 2021
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Sep 9, 2021
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25756
flavorjones added a commit to flavorjones/grpc that referenced this pull request Oct 16, 2021
Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in grpc#25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- grpc#25429
- grpc#25756
jtattermusch pushed a commit that referenced this pull request Oct 19, 2021
* ruby: use squiggly heredoc for rake-compiler-dock commands

* ruby: use `bundler exec` when building native gems

* ruby: clean .{bundle,so} from src/ruby/lib when building native gems

Failing to remove these files between native builds leads
rake-compiler to establish circular dependencies (which may be a bug
in rake-compiler, but this feels like an easy and good thing to do,
anyway).

* ruby: extract linux and darwin RUBY_PLATFORM checks into variables

There were already "windows" and "bsd" flags, so let's improve
consistency and readability, and set a clear pattern for subsequent
flags.

* ruby: rely on rake-compiler-dock v1.1.0 to set no_native correctly

As of v1.1.0 there's no need to set this explicitly anymore; it will
be true whenever the extension is being built in a RCD container.

See rake-compiler/rake-compiler-dock@362890d

* ruby: add "x86_64-darwin" platform gem

Using RCD for this platform unifies the Darwin native gem build
process with the Linux native gems, which should help avoid
inconsistencies in packaging that result in issues like the missing
Ruby 3.0 binaries in #25060.

Please note that this change leaves the "universal-darwin" platform
native gem untouched, but provides a path forward if the project ever
decides to drop "universal" binary support.

Related to:

- #25429
- #25756
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang/ruby release notes: yes Indicates if PR needs to be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants