Skip to content

Ruby 1.49.0.pre1 - grpc getting gRPC dynamic C core load error on x64-mingw-ucrt #30933

@johnnyshields

Description

@johnnyshields

@apolcyn I've found a critical issue with grpc Ruby 1.49.0.pre1 on a clean install of Windows / Ruby 3.1 x64-mingw-ucrt. The symptom is the error Couldn't find or load gRPC's dynamic C core (LoadError) when loading the gem.

I've found that renaming grpc_c.64-ucrt.ruby to grpc_c.64-msvcrt.ruby fixes the issue. Note that the -ucrt gem comes with the following binaries (msvcrt are empty):

grpc_c.32-msvcrt.ruby - 0 KB
grpc_c.64-msvcrt.ruby - 0 KB
grpc_c.64-ucrt.ruby - 9,650 KB

(This means that in the builds I've made so far, it's actually been loading the msvcrt binary on ucrt the whole time. Oops 🤦‍♂️)

It would be ideal to fix this before the full release of 1.49.0.

C:/ruby31/bin/ruby.exe -x C:\workspace\app\bin\bundle exec C:\ruby31\bin\ruby.exe C:/workspace/app/bin/rails server -b 127.0.0.1 -p 3000 -e development
C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require': Couldn't find or load gRPC's dynamic C core (LoadError)
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/grpc-1.49.0.pre1-x64-mingw-ucrt/src/ruby/lib/grpc/grpc.rb:20:in `<main>'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/grpc-1.49.0.pre1-x64-mingw-ucrt/src/ruby/lib/grpc.rb:19:in `require_relative'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/grpc-1.49.0.pre1-x64-mingw-ucrt/src/ruby/lib/grpc.rb:19:in `<main>'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/ruby31/lib/ruby/site_ruby/3.1.0/bundler/runtime.rb:60:in `block (2 levels) in require'
        from C:/ruby31/lib/ruby/site_ruby/3.1.0/bundler/runtime.rb:55:in `each'
        from C:/ruby31/lib/ruby/site_ruby/3.1.0/bundler/runtime.rb:55:in `block in require'
        from C:/ruby31/lib/ruby/site_ruby/3.1.0/bundler/runtime.rb:44:in `each'
        from C:/ruby31/lib/ruby/site_ruby/3.1.0/bundler/runtime.rb:44:in `require'
        from C:/ruby31/lib/ruby/site_ruby/3.1.0/bundler.rb:187:in `require'
        from C:/workspace/tablesolution/config/application.rb:18:in `<main>'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:137:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:134:in `perform'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/railties-7.0.3.1/lib/rails/command/base.rb:87:in `perform'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/railties-7.0.3.1/lib/rails/command.rb:48:in `invoke'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/railties-7.0.3.1/lib/rails/commands.rb:18:in `<main>'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/ruby31/lib/ruby/gems/3.1.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from C:/workspace/app/bin/rails:4:in `<main>'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions