-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when installing rbczmq in Windows - uninitialized constant GNU_CHAIN #41
Comments
yep me too |
I don't have a Windows machine so I cant fix and test this myself, but here's a possible fix: The problem seems to be that the I searched around and found that the If you'll see this code here, they've initialized Copying the GNU_CHAIN initialization to rbczmq's extconf might solve the issue. Of course someone with a Windows machine needs to do it. |
If I just change extconf.rb locally from a downloaded rbczmq gem sources, how could I properly install it from this sources? And will iruby use it and not try to download? |
Yes you can. Just don't change the versions. It'll automatically use the local gem. After you make the changes run |
The problem im having is that the windows.h and winsock.h files aren't being found, any idea where they should be? This is when I run rake compile |
@v0dro , ok, here is what I have now. if RUBY_PLATFORM =~ /(mswin|mingw|bccwin)/
GNU_CHAIN = $1 == 'mingw'
OS_WIN32 = true
add_define "OS_WIN32"
else
GNU_CHAIN = true
OS_UNIX = true
add_define 'OS_UNIX'
add_define "HAVE_KQUEUE" if have_header("sys/event.h") and have_header("sys/queue.h")
end After that I tried to rake compile, but it failed because there was no add_define method. def add_define(name)
$defs.push("-D#{name}")
end The new try of rake compile gives me stacktrace:
|
You're not checking for windows.h. See this code: https://www.omniref.com/ruby/gems/MattHulse-eventmachine/0.12.10/symbols/Object::GNU_CHAIN#line=40 Also, read that whole file on omniref, I think it should have solutions to most of your problems. |
The original code is checking for windows.h. Problem is, the method itself fails. I have no idea why, I'm new to ruby. If I go to irb, and type
My ruby is |
I updated to the latest Ruby (rubyinstaller-2.2.3-x64), and with this the have_header('windows.h') works.
|
This looks like it's not able to install ZeroMQ. Have you installed all the dependencies? @methodmissing could you please list out any ZeroMQ dependencies? Also, will it be possible for you to fix this? We need this gem for iruby, and the anomaly in Windows is causing Windows users to move away. |
I've tried pretty much everything I could, including building ZeroMQ from source, etc. Everything ended up failing. |
Hi guys, I can take a look later today. Apologies for the delay - been really busy. |
Great news! Thanks for handling it! |
+1 |
@methodmissing: did you get a chance to look at it? Thanks a lot, I hope you enjoyed the weekend. |
Any news on this topic ? I'm still getting the |
OK, I built the native extension and installed rbczmq-1.7.9 successfully. In my environment (ruby2.2.3p173 x64-mingw32), I think these lines Lines 51 to 56 in e35825f
can be removed when trying on mingw32, but I don't know how they work on other environments. |
To install this gem to Windows you may have to install VS2012 or up and build zeromq and czmq manually with it. Some settings written in I will show these changes and build-instructions in my repository :) |
Could you post a link to the instructions when you have written them please @domitry ? |
ffi-rzmq is listed as abandoned unfortunately. It would seem the best choice though. So what are Ruby Windows devs actually supposed to use? :( |
I have this problem in almost 2018 for the record. |
I couldn't install rbczmq gem on my PC.
Here follows the gem_make.out message:
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20150710-8684-1bvpd0e.rb extconf.rb
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
': uninitialized constant GNU_CHAIN (NameError)--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby22-x64/bin/$(RUBY_BASE_NAME)
--with-kernel32lib
--without-kernel32lib
--with-rpcrt4lib
--without-rpcrt4lib
--with-gdi32lib
--without-gdi32lib
extconf.rb:49:in `
extconf failed, exit code 1
Thank you.
The text was updated successfully, but these errors were encountered: