Errors Installing the gem wdm in cygwin
Asked Answered
B

1

8

I keep getting this error while installing the gem wdm from inside cygwin. Does anybody had the same issue and know now to fix it. Thanks. (I am Trying to install Guard gem)

$ gem install wdm
Building native extensions.  This could take a while...
ERROR:  Error installing wdm:
ERROR: Failed to build gem native extension.

    /usr/bin/ruby.exe extconf.rb
checking for main() in -lkernel32... yes
checking for windows.h... yes
checking for ruby.h... yes
checking for HAVE_RUBY_ENCODING_H... yes
creating Makefile

make
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H    -ggdb -O2 -pipe   -fno-strict-aliasing   -o entry.o -c entry.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H    -ggdb -O2 -pipe   -fno-strict-aliasing   -o memory.o -c memory.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H    -ggdb -O2 -pipe   -fno-strict-aliasing   -o monitor.o -c monitor.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H    -ggdb -O2 -pipe   -fno-strict-aliasing   -o queue.o -c queue.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H    -ggdb -O2 -pipe   -fno-strict-aliasing   -o rb_change.o -c rb_change.c
rb_change.c: In function ‘extract_absolute_path_from_notification’:
rb_change.c:47:16: error: ‘_MAX_FNAME’ undeclared (first use in this function)
rb_change.c:47:16: note: each undeclared identifier is reported only once for each function it appears in
rb_change.c:47:33: error: ‘_MAX_EXT’ undeclared (first use in this function)
Makefile:206: recipe for target `rb_change.o' failed
make: *** [rb_change.o] Error 1

Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/wdm-0.1.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/wdm-0.1.0/ext/wdm/gem_make.out
Bannerman answered 9/10, 2013 at 20:32 Comment(1)
just ran into a similar issue trying to install guard-rubocop on a windows machine. gem install iff fails to build.Corrigible
S
3

A colleague of mine had an issue with wdm the other day.

We fixed it by downloading the Ruby DevKit (Not sure if you already had this installed).

I found some pretty decent step by steps online, I'll paste them here - hope they help

Development kit is here: http://rubyinstaller.org/downloads/

  1. Download the Development Kit and install it in say c:\devkit.
  2. Open a command window and type c:.
  3. Change folders by typing cd devkit.
  4. Type ruby dk.rb init to generate the config.yml file to be used later. Your installed Rubies will be listed there (only those installed by a RubyInstaller package are detected at present). This needs to be done only once.
  5. Finally type, ruby dk.rb install for DevKit enhance your installed Rubies. This needs to be done only once.

Confirm your Ruby environment is correctly using the DevKit by running:

gem install wdm --platform=ruby

It’s crucial that you include the --platform=ruby option to force RubyGems to build the native gem rather than potentially installing an incorrect binary gem.

Suspicious answered 24/1, 2014 at 13:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.