From: "stanhu (Stan Hu)" Date: 2022-11-02T04:39:48+00:00 Subject: [ruby-core:110575] [Ruby master Bug#19082] Recent gRPC gem fails to build from the source in already released versions Issue #19082 has been updated by stanhu (Stan Hu). monfresh (Moncef Belyamani) wrote in #note-6: > nobu (Nobuyoshi Nakada) wrote in #note-5: > > Probably this issue will be fixed by https://github.com/grpc/grpc/pull/31151. > > Ah! Yes! Thanks for the explanation about what the dollar sign does. I just built the grpc gem locally with the fix in that PR and it installed fine in Ruby 3.1.3. Note that this issue is also related to https://bugs.ruby-lang.org/issues/19005. The fixes for Ruby to include `-undefined dynamic_lookup` by default would mask the issue. ---------------------------------------- Bug #19082: Recent gRPC gem fails to build from the source in already released versions https://bugs.ruby-lang.org/issues/19082#change-99909 * Author: monfresh (Moncef Belyamani) * Status: Third Party's Issue * Priority: Normal * ruby -v: 3.1.3 * Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED ---------------------------------------- About 10 days ago, this commit in the ruby_3_1 branch removed the "$" from "[$flag=]" on line 3073 of `configure.ac`: https://github.com/ruby/ruby/commit/ee6cc2502664ac46edc61868d8954b626bb48e53#r87450090 This causes the installation of the grpc gem to fail whereas before this change, the gem installed fine. If I add the dollar sign back in, the grpc gem installs successfully. Here are the steps to reproduce: 1. Clone the Ruby repo on an Apple Silicon Mac that has v14 of the command line tools 2. `git checkout -b ruby_3_1 origin/ruby_3_1` 3. Compile Ruby: ``` ./autogen.sh ./configure --with-opt-dir="$(brew --prefix openssl@3):$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm):$(brew --prefix gmp)" --prefix=/Users/moncef/.rubies/ruby-3.1.3 --disable-install-doc make -j7 main make -j7 install ``` 4. Switch to 3.1.3 with `chruby 3.1.3` 5. `gem install grpc` With the current branch, this fails. 6. Remove ~/.rubies/ruby-3.1.3 and ~/.gem/ruby/3.1.3 7. Add the dollar sign back in `configure.ac` 8. Compile Ruby 3.1.3 again the same way as above 9. Switch to 3.1.3 10. `gem install grpc` => This works now. I attached a zip file of the "gem_make.out" file that shows the full stack trace for why grpc failed to build the gem native extension. ---Files-------------------------------- gem_make.out.zip (77 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: