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

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

Closed
johnnyshields opened this issue Sep 10, 2022 · 1 comment · Fixed by #31051 · May be fixed by #30935
Closed

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

johnnyshields opened this issue Sep 10, 2022 · 1 comment · Fixed by #31051 · May be fixed by #30935

Comments

@johnnyshields
Copy link
Contributor

johnnyshields commented Sep 10, 2022

@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>'
@johnnyshields
Copy link
Contributor Author

@apolcyn fix is here: #30934

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants