Skip to content

Conversation

apolcyn
Copy link
Contributor

@apolcyn apolcyn commented Feb 12, 2021

@apolcyn apolcyn added lang/ruby release notes: yes Indicates if PR needs to be in release notes labels Feb 12, 2021
@dazuma
Copy link
Contributor

dazuma commented Mar 3, 2021

@apolcyn Is something holding this up?

@apolcyn
Copy link
Contributor Author

apolcyn commented Mar 3, 2021

@dazuma sorry progress on this has been slow, but I do plan to get this into the upcoming release. Currently, this PR is stuck on the following error:

cd -
mkdir -p /Users/kbuilder/.rake-compiler/sources/ruby-2.7.0
cd /Users/kbuilder/.rake-compiler/sources
tar xf ruby-2.7.0.tar.bz2
cd -
cd /Users/kbuilder/.rake-compiler/builds/x86_64-darwin11/ruby-2.7.0
/Users/kbuilder/.rake-compiler/sources/ruby-2.7.0/configure --host=x86_64-darwin11 --target=x86_64-darwin11 --build=x86_64-apple-darwin18.7.0 --enable-static --disable-shared --disable-install-doc --without-gmp --with-ext= LDFLAGS=-pipe -s --prefix=/Users/kbuilder/.rake-compiler/ruby/x86_64-darwin11/ruby-2.7.0
checking for ruby... /Users/kbuilder/.rvm/rubies/ruby-2.7.0/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-pc-darwin11
checking target system type... x86_64-pc-darwin11
checking for x86_64-darwin11-clang... no
checking for x86_64-darwin11-gcc... no
checking for x86_64-darwin11-cc... no
checking for clang... clang
configure: WARNING: using cross tools not prefixed with host triplet
checking for x86_64-darwin11-gcc... clang
checking for x86_64-darwin11-gcc... (cached) clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for clang option to accept ISO C99... none needed
checking for x86_64-darwin11-clang++... no
checking for clang++... clang++
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking how to run the C preprocessor... clang -E
checking if minimum required OS X version is supported... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether clang++ accepts -g... (cached) yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether clang needs -traditional... no
checking for x86_64-darwin11-ld... no
checking for ld... ld
checking whether the linker is GNU ld... no
checking whether clang -E accepts -o... yes
checking for x86_64-darwin11-clang-ranlib... no
checking for x86_64-darwin11-ranlib... no
checking for clang-ranlib... (cached) :
checking for x86_64-darwin11-clang-ar... no
checking for x86_64-darwin11-ar... no
checking for clang-ar... (cached) libtool -static
checking for libtool -static flags... (cached) -no_warning_for_no_symbols -o
checking for x86_64-darwin11-as... no
checking for as... as
checking for x86_64-darwin11-objdump... no
checking for x86_64-darwin11-gobjdump... no
checking for objdump... objdump
checking for x86_64-darwin11-objcopy... no
checking for x86_64-darwin11-gobjcopy... no
checking for objcopy... no
checking for gobjcopy... no
checking for x86_64-darwin11-clang-nm... no
checking for x86_64-darwin11-nm... no
checking for clang-nm... no
checking for nm... nm
checking whether ln -s works... yes
checking whether make -j8 sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for x86_64-darwin11-dtrace... no
checking for dot... no
checking for doxygen... no
checking for pkg-config... pkg-config
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-pipe -s"
rake aborted!
Command failed with status (1): [/Users/kbuilder/.rake-compiler/sources/rub...]
/Volumes/BuildData/tmpfs/src/github/grpc/tmpfile.74o8Xi3S:128:in `block (2 levels) in <top (required)>'
/Volumes/BuildData/tmpfs/src/github/grpc/tmpfile.74o8Xi3S:125:in `block in <top (required)>'
Tasks: TOP => cross-ruby => install => /Users/kbuilder/.rake-compiler/ruby/x86_64-darwin11/ruby-2.7.0/bin/ruby.exe => /Users/kbuilder/.rake-compiler/builds/x86_64-darwin11/ruby-2.7.0/ruby.exe => /Users/kbuilder/.rake-compiler/builds/x86_64-darwin11/ruby-2.7.0/Makefile
(See full trace by running task with --trace)

@apolcyn apolcyn force-pushed the ruby_mac_3_binary branch from fa4065c to 61bbb03 Compare March 5, 2021 20:09
@apolcyn apolcyn force-pushed the ruby_mac_3_binary branch from 61bbb03 to 968a237 Compare March 8, 2021 19:45
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
@apolcyn
Copy link
Contributor Author

apolcyn commented Mar 31, 2021

Kicked off a full package build in https://fusion2.corp.google.com/invocations/1be85d06-f857-44bc-b631-52f400778b11/targets since the macos artifact smoke test passed

@apolcyn
Copy link
Contributor Author

apolcyn commented Apr 1, 2021

@apolcyn apolcyn merged commit 361aa15 into grpc:master Apr 2, 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.

LoadError with Ruby 3.0 and grpc gem
4 participants