Closed grv87 closed 8 years ago
The same error existed in 0.3.0
9 months passed since this issue was posted and I'm getting the same error now in 2016, any solution for this yet?
OK, studied the problem a little and the solution is already merged in, modify ext/escape_utils/buffer.h
and add manually this patch https://github.com/brianmario/escape_utils/pull/62/files
after that run gem spec ../../cache/escape_utils-1.1.0.gem --ruby > ../../specifications/escape_utils-1.1.0.gemspec
until the new version is released and really fixes the problem.
I was getting the same error when trying to install another Gem that uses this gem; my output:
C:\Users\kevitt\Documents\@cases, open\1999>gem install csvlint
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing csvlint:
ERROR: Failed to build gem native extension.
c:/Ruby22/bin/ruby.exe -r ./siteconf20160125-11900-o7zzgt.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating escape_utils-i386-mingw32.def
compiling buffer.c
buffer.c: In function 'gh_buf_cmp':
buffer.c:245:2: warning: implicit declaration of function 'MIN' [-Wimplicit-func
tion-declaration]
compiling escape_utils.c
compiling houdini_href_e.c
compiling houdini_html_e.c
compiling houdini_html_u.c
compiling houdini_js_e.c
compiling houdini_js_u.c
compiling houdini_uri_e.c
compiling houdini_uri_u.c
compiling houdini_xml_e.c
linking shared-object escape_utils/escape_utils.so
buffer.o: In function `gh_buf_cmp':
c:\Ruby22\lib\ruby\gems\2.2.0\gems\escape_utils-1.1.0\ext\escape_utils/buffer.c:
245: undefined reference to `MIN'
collect2.exe: error: ld returned 1 exit status
make: *** [escape_utils.so] Error 1
make failed, exit code 2
Gem files will remain installed in c:/Ruby22/lib/ruby/gems/2.2.0/gems/escape_uti
ls-1.1.0 for inspection.
Results logged to c:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/esc
ape_utils-1.1.0/gem_make.out
My versions:
ruby 2.2.3p173 (2015-08-18 revision 51636) [i386-mingw32]
At the suggestion of @ZaDarkSide, I modified _ext/escapeutils/buffer.h and then ran the following:
C:\Ruby22\lib\ruby\gems\2.2.0\gems\escape_utils-1.1.0\ext\escape_utils>ruby extc
onf.rb
creating Makefile
C:\Ruby22\lib\ruby\gems\2.2.0\gems\escape_utils-1.1.0\ext\escape_utils>C:\Ruby\D
evKit-mingw64-32-4.7.2-20130224-1151-sfx\devkitvars.bat
Adding the DevKit to PATH...
C:\Ruby22\lib\ruby\gems\2.2.0\gems\escape_utils-1.1.0\ext\escape_utils>make
compiling buffer.c
compiling escape_utils.c
compiling houdini_href_e.c
compiling houdini_html_e.c
compiling houdini_html_u.c
compiling houdini_js_e.c
compiling houdini_js_u.c
compiling houdini_uri_e.c
compiling houdini_uri_u.c
compiling houdini_xml_e.c
linking shared-object escape_utils/escape_utils.so
C:\Ruby22\lib\ruby\gems\2.2.0\gems\escape_utils-1.1.0\ext\escape_utils>make inst
all
/usr/bin/install -c -m 0755 escape_utils.so /c/Ruby22/lib/ruby/site_ruby/2.2.0/i
386-msvcrt/escape_utils
C:\Ruby22\lib\ruby\gems\2.2.0\gems\escape_utils-1.1.0\ext\escape_utils>cd ..\..
C:\Ruby22\lib\ruby\gems\2.2.0\gems\escape_utils-1.1.0>gem spec ../../cache/escap
e_utils-1.1.0.gem --ruby > ../../specifications/escape_utils-1.1.0.gemspec
[c:/Ruby22/lib/ruby/gems/2.2.0/specifications/escape_utils-1.1.0.gemspec] isn't
a Gem::Specification (NilClass instead).
Note that C:\Ruby\DevKit-mingw64-32-4.7.2-20130224-1151-sfx
is the directory where I installed the Ruby DevKit.
After the above, I was able to install the gem that uses this gem without error.
@ZaDarkSide A new version of _escapeutils is available on RubyGems.org. I asked the owner to publish a new version and he was gracious enough to do so a few days ago.
Thank you very much for announcing it @kenny-evitt, the people running Ruby on Windows and using this extension are happy now :+1:
The issue can be closed now
@grv87 This should be fixed; a new version of the gem is available.
Can't test since I have another error during install.
@ZaDarkSide confirms fix, so I'm closing this issue.
>gem install escape_utils
Building native extensions. This could take a while...
Successfully installed escape_utils-1.2.0
Parsing documentation for escape_utils-1.2.0
Installing ri documentation for escape_utils-1.2.0
Done installing documentation for escape_utils after 1 seconds
1 gem installed
Confirmed fix.
I was also able to install the latest version of the gem.
I have an error installing version 1.1.0:
There is no problem with previous versions, e.g. 1.0.0.