Maher4Ever / wdm

Windows Directory Monitor (WDM) is a threaded directories monitor for Windows.
https://rubygems.org/gems/wdm
MIT License
50 stars 13 forks source link

wdm refuses to install on windows 10 #28

Open RFLEpicGamer opened 1 month ago

RFLEpicGamer commented 1 month ago
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/wdm-0.1.1/ext/wdm
C:/Ruby33-x64/bin/ruby.exe 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:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/wdm-0.1.1/ext/wdm
make DESTDIR\= sitearchdir\=./.gem.20240606-9356-4seb36
sitelibdir\=./.gem.20240606-9356-4seb36 clean

current directory: C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/wdm-0.1.1/ext/wdm
make DESTDIR\= sitearchdir\=./.gem.20240606-9356-4seb36
sitelibdir\=./.gem.20240606-9356-4seb36
generating wdm_ext-x64-mingw-ucrt.def
compiling entry.c
compiling memory.c
compiling monitor.c
compiling queue.c
compiling rb_change.c
rb_change.c: In function 'extract_absolute_path_from_notification':
rb_change.c:139:5: warning: 'RB_OBJ_TAINT' is deprecated: taintedness turned out
to be a wrong idea. [-Wdeprecated-declarations]
  139 |     OBJ_TAINT(path);
      |     ^~~~~~~~~
In file included from
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/core/rstring.h:30,
from
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/arithmetic/char.h:29,
from
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/arithmetic.h:24,
                 from C:/Ruby33-x64/include/ruby-3.3.0/ruby/ruby.h:28,
                 from C:/Ruby33-x64/include/ruby-3.3.0/ruby.h:38,
                 from wdm.h:22,
                 from rb_change.c:4:
C:/Ruby33-x64/include/ruby-3.3.0/ruby/internal/fl_type.h:824:1: note: declared
here
  824 | RB_OBJ_TAINT(VALUE obj)
      | ^~~~~~~~~~~~
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:248: rb_monitor.o] Error 1

make failed, exit code 2

Gem files will remain installed in
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/wdm-0.1.1 for inspection.
Results logged to
C:/Ruby33-x64/lib/ruby/gems/3.3.0/extensions/x64-mingw-ucrt/3.3.0/wdm-0.1.1/gem_make.out

C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:51:in `block in
make'
  C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:43:in `each'
  C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:43:in `make'
C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/ext_conf_builder.rb:42:in
`build'
C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:193:in
`build_extension'
C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:227:in `block
in build_extensions'
  C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:224:in `each'
C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/ext/builder.rb:224:in
`build_extensions'
C:/Ruby33-x64/lib/ruby/site_ruby/3.3.0/rubygems/installer.rb:852:in
`build_extensions'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/rubygems_gem_installer.rb:76:in
`build_extensions'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/rubygems_gem_installer.rb:28:in
`install'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/source/rubygems.rb:206:in
`install'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/installer/gem_installer.rb:54:in
`install'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/installer/parallel_installer.rb:132:in
`do_install'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/worker.rb:62:in
`apply_func'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/worker.rb:57:in
`block in process_queue'
  <internal:kernel>:187:in `loop'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/worker.rb:54:in
`process_queue'
C:/Ruby33-x64/lib/ruby/gems/3.3.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.
jakofranko commented 1 month ago

+1, also seeing this

WillamSun commented 1 week ago

Try run this gem install wdm -- --with-cflags=-Wno-implicit-function-declaration

dark-menacing commented 1 week ago

It worked, thanks alot @WillamSun, you're a savior 🙏