Reputation: 11
I am getting error.
I am trying the Shopify Remix app. The error occurs when I add the extension in my app and run Shopify app dev.
Any idea how to resolve this?
Here is error in the text
Shutting down dev because of an error ...
external error ─────
Error coming from
bundle install
Command failed with exit code 5: bundle install Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/Users/xxx/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.0.0/gems/wdm-0.1.1/ext/wdm C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r ./siteconf20240530-23416-8k4hiz.rb extconf.rb checking for -lkernel32... yes checking for windows.h... yes checking for ruby.h... yes checking for HAVE_RUBY_ENCODING_H... yes checking for rb_thread_call_without_gvl()... yes creating Makefile
current directory: C:/Users/xxx/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.0.0/gems/wdm-0.1.1/ext/wdm make DESTDIR= clean
current directory: C:/Users/xxx/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.0.0/gems/wdm-0.1.1/ext/wdm make DESTDIR= generating wdm_ext-x64-mingw32.def compiling entry.c compiling memory.c compiling monitor.c compiling queue.c compiling rb_change.c compiling rb_monitor.c rb_monitor.c: In function 'rb_monitor_run_bang': rb_monitor.c:509:29: error: implicit declaration of function 'rb_thread_call_without_gvl' [-Wimplicit-function-declaration] 509 | waiting_succeeded = rb_thread_call_without_gvl(wait_for_changes, monitor->process_event, stop_monitoring, monitor); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ make: *** [Makefile:246: rb_monitor.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Users/xxxxx/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.0.0/gems/wdm-0.1.1 for inspection. Results logged to C:/Users/xxx/AppData/Local/shopify-gems-nodejs/Cache/ruby/3.0.0/extensions/x64-mingw32/3.0.0/wdm-0.1.1/gem_make.out
C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:93:in
run' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:44:in
block in make' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:36:ineach' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:36:in
make' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:63:inblock in build' C:/Ruby30-x64/lib/ruby/3.0.0/tempfile.rb:317:in
open' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:26:inbuild' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:159:in
build_extension' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:193:inblock in build_extensions' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in
each' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:inbuild_extensions' C:/Ruby30-x64/lib/ruby/3.0.0/rubygems/installer.rb:837:in
build_extensions' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/rubygems_gem_installer.rb:76:inbuild_extensions' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/rubygems_gem_installer.rb:28:in
install' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/source/rubygems.rb:206:ininstall' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/installer/gem_installer.rb:54:in
install' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/installer/gem_installer.rb:16:ininstall_from_spec' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/installer/parallel_installer.rb:132:in
do_install' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/installer/parallel_installer.rb:123:inblock in worker_pool' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:62:in
apply_func' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:57:inblock in process_queue' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in
loop' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:inprocess_queue' C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/bundler-2.5.11/lib/bundler/worker.rb:90:in
block (2 levels) in create_threads'An error occurred while installing wdm (0.1.1), and Bundler cannot continue.
In Gemfile: wdm Fetching gem metadata from https://rubygems.org/........... Resolving dependencies... Fetching ffi 1.15.4 (x64-mingw32) Fetching concurrent-ruby 1.1.10 Fetching wdm 0.1.1 Fetching rb-fsevent 0.11.1 Installing wdm 0.1.1 with native extensions Installing rb-fsevent 0.11.1 Installing concurrent-ruby 1.1.10 Installing ffi 1.15.4 (x64-mingw32) Fetching rb-inotify 0.10.1 Installing rb-inotify 0.10.1 Fetching listen 3.7.1 Fetching bugsnag 6.24.2 Installing listen 3.7.1 Installing bugsnag 6.24.2
Tried reinstalling various versions of Ruby but no luck.
Upvotes: 1
Views: 1675
Reputation: 11
gem install wdm -- --with-cflags=-Wno-implicit-function-declaration
above command worked for me as mentioned in https://github.com/Maher4Ever/wdm/issues/27 originally referring to https://github.com/ffi/ffi/issues/840 -->
if above doesn't work, you can a also try updating budle config using below.
bundle config build.ffi -- --with-cflags=-Wno-implicit-function-declaration
and then try running
bundle install
Clang now reports an error when you use a function without an explicit declaration when building C or Objective-C code for macOS (-Werror=implicit-function-declaration flag is on). This additional error detection unifies Clang’s behavior for iOS/tvOS and macOS 64-bit targets for this diagnostic. (49917738) Blockquote
Upvotes: 1
Reputation: 1
I also had the same issue when I was trying to setup my shopify theme dev environment.
I solved it by installing ruby 3.0.7-1-x64
with devkit and it worked.
Here's the download link for ruby with devkit
Upvotes: 0
Reputation: 11
this one worked for me.
https://stackoverflow.com/a/78617137/23467046
also in this version (Ruby+Devkit 3.1.2-1 (x64), I additionally searched the entire c:\ drive for any gems/ruby/wdm/ff
Upvotes: 0
Reputation: 31
solved first uninstall ruby from windows program and features.
now delete all ruby folder and msys folder from c drive.
Install this ruby kit Ruby+Devkit 3.1.2-1 (x64)
now after running command it will ask to update bundler so run : gem install bundler
then it worked.
Upvotes: 3