Skip to content

[Bug]: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.{Installing wdm 0.1.1 with native extensions} #9660

@shafikul-islam

Description

@shafikul-islam

Operating System

Windows 11

Ruby Version

ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x64-mingw32]

Jekyll Version

jekyll 4.3.3

GitHub Pages Version

I am trying to run locally in windows 11 using vscode

Expected Behavior

PS C:\weiglemc.github.io-master> bundle

I expected to run the following command successfully when the command in the terminal in vscode ran. But am getting error in Installing wdm 0.1.1 with native extensions. An error occurred while installing wdm (0.1.1), and Bundler cannot continue. All the other gems were installed successfully.

My gemfile in the folder which i want to run local server contains following contains:
Screenshot 2024-09-05 013216

Current Behavior

The current behavior is I am unable to run the file locally. I have also tried the latest version of Ruby. But no means the same error occurred. I also tried to run as administration, when installing Ruby I successfully installed options 1,2, 3. Then, I installed Gem and Jekyll, gem version: 3.2.33. Can you please help, stuck in there for a long....

PS C:\weiglemc.github.io-master> bundle
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Installing wdm 0.1.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: C:/Ruby30-x64/lib/ruby/gems/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
./siteconf20240905-18072-17gglr.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:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/wdm-0.1.1/ext/wdm
make DESTDIR\= clean

current directory: C:/Ruby30-x64/lib/ruby/gems/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

I am also providing gem_makeout file in the log output.

Relevant log output

`current directory: C:/Ruby30-x64/lib/ruby/gems/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 ./siteconf20240905-18072-17gglr.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:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/wdm-0.1.1/ext/wdm
make DESTDIR\= clean

current directory: C:/Ruby30-x64/lib/ruby/gems/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
`

Code Sample

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions