-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Build fails on Windows 7 x64 with ruby 2.0.0p195 (2013-05-14) [i386-mingw32] #31
Comments
I don't have a Windows machine to test on/develop on or know much about Windows, so any assistance here is appreciated /cc @luislavena |
I've narrowed down the problem to a missing lib reference in the Makefile for win32/mingw configs most likely pthread. |
So the missing symbols are gone, but now its mingw32 which is being a pain: linking shared-object nio4r_ext.so Gem files will remain installed in C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/nio4r-0.4.6 for inspection. |
@tarcieri is there a chance you can update the embedded libev to version 4.15? That version contains a few fixes for Windows too. The problem here is caused by mingw-w64 headers defining at some point In libev 4.15, there is no need for
(replacing existing block) And no longer playing with With the above changes and libev 4.15, specs passes except for two pipe-related failures:
Tested against:
|
@luislavena yeah I can, it's a little tricky because I modify libev to perform a GVL unlock |
@tarcieri yeah, I saw it and did it manually, just saving all the There are lot of warnings and small issues related to Windows solved in it, that is why I was asking 😄 Thank you! |
@luislavena have this code somewhere? I'd be happy to merge it upstream. The pipe-related failures might be a bit of a problem as nio4r uses pipes as a wakeup mechanism for selectors. Perhaps there's something similar we can use on Windows? |
local hack, not pushed anywhere. Will do it tonight if you want.
I'll look into this, I remember having some issues with pipes and MRI but don't quite remember the specifics. |
Hi, are there any news regarding this topic? I'm trying to install berkshelf which has this project as a dependency - but I'm failing. Are there any workarounds? |
@luislavena can you post your local hack if nothing else? ;) |
@mmisztal1980 don't use Ruby 2.x, I moved back to 1.9.3 and everything is just fine. |
Tried that as well. Ruby 1.9.3 works |
@tarcieri sorry, was a bit busy and forgot to commit and push. I've open a pull request for this, please let me know your thoughts. |
+1, just ran into this on Windows 8 x64 w/ Ruby 2x64 |
@chiefy try nio4r master. Things should be fixed there. Release forthcoming |
@tarcieri super! :) thanks! |
@tarcieri thanks, i will give it a go. |
This is fixed on master. Release forthcoming, hopefully tonight! |
C:\rbxops\Vagrant> gem install nio4r
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing nio4r:
ERROR: Failed to build gem native extension.
checking for rb_thread_blocking_region()... yes
checking for sys/select.h... no
checking for poll.h... no
checking for sys/epoll.h... no
checking for sys/event.h... no
checking for port.h... no
checking for sys/resource.h... no
creating Makefile
make
generating nio4r_ext-i386-mingw32.def
compiling monitor.c
In file included from nio4r.h:10:0,
from monitor.c:6:
c:/Ruby/Ruby200/include/ruby-2.0.0/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
In file included from nio4r.h:11:0,
from monitor.c:6:
libev.h:5:0: warning: "FD_SETSIZE" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
monitor.c: In function 'NIO_Monitor_initialize':
monitor.c:103:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
monitor.c:103:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
monitor.c:103:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
monitor.c: At top level:
monitor.c:30:13: warning: 'NIO_Monitor_callback' declared 'static' but never defined [-Wunused-function]
compiling nio4r_ext.c
In file included from nio4r.h:10:0,
from nio4r_ext.c:6:
c:/Ruby/Ruby200/include/ruby-2.0.0/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
In file included from nio4r.h:11:0,
from nio4r_ext.c:6:
libev.h:5:0: warning: "FD_SETSIZE" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
In file included from nio4r_ext.c:7:0:
../libev/ev.c:474:48: warning: "/" within comment [-Wcomment]
In file included from ../libev/ev.c:1005:0,
from nio4r_ext.c:7:
../libev/ev_win32.c: In function 'ev_pipe':
../libev/ev_win32.c:84:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
In file included from nio4r_ext.c:7:0:
../libev/ev.c: At top level:
../libev/ev.c:1258:31: warning: 'ev_default_loop_ptr' initialized and declared 'extern' [enabled by default]
../libev/ev.c: In function 'array_nextsize':
../libev/ev.c:1367:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../libev/ev.c: In function 'fd_reify':
../libev/ev.c:1515:15: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'evpipe_init':
../libev/ev.c:1815:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: In function 'ev_feed_signal':
../libev/ev.c:1951:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from ../libev/ev.c:2091:0,
from nio4r_ext.c:7:
../libev/ev_select.c: In function 'select_modify':
../libev/ev_select.c:85:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev_select.c: At top level:
../libev/ev_select.c:274:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
../libev/ev_select.c:274:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
../libev/ev_select.c:303:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
../libev/ev_select.c:303:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
In file included from nio4r_ext.c:7:0:
../libev/ev.c:2107:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
../libev/ev.c:2107:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
../libev/ev.c: In function 'loop_init':
../libev/ev.c:2309:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:2309:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:2309:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:2312:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:2312:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:2312:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:2313:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: In function 'ev_loop_destroy':
../libev/ev.c:2347:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: In function 'loop_fork':
../libev/ev.c:2457:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: In function 'verify_watcher':
../libev/ev.c:2508:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:2511:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'verify_heap':
../libev/ev.c:2521:7: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:2522:7: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:2523:7: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'array_verify':
../libev/ev.c:2534:7: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_verify':
../libev/ev.c:2552:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:2559:9: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:2560:9: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'timers_reify':
../libev/ev.c:2737:15: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'periodics_reify':
../libev/ev.c:2801:15: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:2788:11: warning: unused variable 'feed_count' [-Wunused-variable]
../libev/ev.c: In function 'ev_backend_poll':
../libev/ev.c:2946:1: warning: no return statement in function returning non-void [-Wreturn-type]
../libev/ev.c: In function 'ev_run':
../libev/ev.c:2963:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:3120:9: warning: 'rb_thread_blocking_region' is deprecated (declared at c:/Ruby/Ruby200/include/ruby-2.0.0/ruby/intern.h:835) [-Wdeprecated-declarations]
../libev/ev.c:3134:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:3134:13: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_io_start':
../libev/ev.c:3306:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:3307:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_io_stop':
../libev/ev.c:3328:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_timer_start':
../libev/ev.c:3348:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_timer_stop':
../libev/ev.c:3376:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_periodic_start':
../libev/ev.c:3438:7: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_periodic_stop':
../libev/ev.c:3470:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c: In function 'ev_signal_start':
../libev/ev.c:3507:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:3510:3: warning: left-hand operand of comma expression has no effect [-Wunused-value]
In file included from nio4r_ext.c:7:0:
../libev/ev.c: In function 'ev_stat_start':
../libev/ev.c:3962:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:3962:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:3962:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:3962:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:3963:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: In function 'ev_stat_stop':
../libev/ev.c:3995:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: In function 'ev_embed_start':
../libev/ev.c:4197:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
../libev/ev.c:4198:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4198:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4198:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4203:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4206:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4206:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4206:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4207:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4210:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4210:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4210:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: In function 'ev_once':
../libev/ev.c:4420:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4420:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4420:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4427:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4427:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4427:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c:4430:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
../libev/ev.c: At top level:
../libev/ev.c:4546:27: warning: "/" within comment [-Wcomment]
../libev/ev.c:4547:27: warning: "/" within comment [-Wcomment]
In file included from nio4r_ext.c:7:0:
../libev/ev.c:1622:1: warning: 'fd_rearm_all' defined but not used [-Wunused-function]
compiling selector.c
In file included from nio4r.h:10:0,
from selector.c:6:
c:/Ruby/Ruby200/include/ruby-2.0.0/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
In file included from nio4r.h:11:0,
from selector.c:6:
libev.h:5:0: warning: "FD_SETSIZE" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
In file included from selector.c:7:0:
c:/Ruby/Ruby200/include/ruby-2.0.0/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete [-Wcpp]
selector.c: In function 'NIO_Selector_allocate':
selector.c:84:5: warning: implicit declaration of function 'pipe' [-Wimplicit-function-declaration]
selector.c:94:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
selector.c:94:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
selector.c:94:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
selector.c:99:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
selector.c:99:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
selector.c:99:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
selector.c: In function 'NIO_Selector_synchronize':
selector.c:159:11: warning: variable 'current_thread' set but not used [-Wunused-but-set-variable]
selector.c: In function 'NIO_Selector_deregister_synchronized':
selector.c:235:11: warning: unused variable 'monitor_args' [-Wunused-variable]
selector.c:234:21: warning: unused variable 'interests' [-Wunused-variable]
selector.c: In function 'NIO_Selector_select':
selector.c:262:20: warning: unused variable 'array' [-Wunused-variable]
selector.c: In function 'NIO_Selector_select_synchronized':
selector.c:280:9: warning: unused variable 'i' [-Wunused-variable]
selector.c: In function 'NIO_Selector_close':
selector.c:385:5: warning: passing argument 2 of 'NIO_Selector_synchronize' from incompatible pointer type [enabled by default]
selector.c:157:14: note: expected 'VALUE ()(VALUE )' but argument is of type 'VALUE ()(VALUE)'
selector.c:385:5: warning: passing argument 3 of 'NIO_Selector_synchronize' makes pointer from integer without a cast [enabled by default]
selector.c:157:14: note: expected 'VALUE ' but argument is of type 'VALUE'
selector.c: In function 'NIO_Selector_closed':
selector.c:401:5: warning: passing argument 2 of 'NIO_Selector_synchronize' from incompatible pointer type [enabled by default]
selector.c:157:14: note: expected 'VALUE ()(VALUE )' but argument is of type 'VALUE ()(VALUE)'
selector.c:401:5: warning: passing argument 3 of 'NIO_Selector_synchronize' makes pointer from integer without a cast [enabled by default]
selector.c:157:14: note: expected 'VALUE ' but argument is of type 'VALUE'
linking shared-object nio4r_ext.so
c:/ruby/ruby200sdk/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: warning: cannot find entry symbol xport-all; defaulting to 0000000061741000
nio4r_ext.o: In function
get_clock': C:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\nio4r-0.4.6\ext\nio4r/../libev/ev.c:1311: undefined reference to
clock_gettime'C:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\nio4r-0.4.6\ext\nio4r/../libev/ev.c:1311: undefined reference to
clock_gettime' C:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\nio4r-0.4.6\ext\nio4r/../libev/ev.c:1311: undefined reference to
clock_gettime'C:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\nio4r-0.4.6\ext\nio4r/../libev/ev.c:1311: undefined reference to
clock_gettime' C:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\nio4r-0.4.6\ext\nio4r/../libev/ev.c:1311: undefined reference to
clock_gettime'nio4r_ext.o:C:\Ruby\Ruby200\lib\ruby\gems\2.0.0\gems\nio4r-0.4.6\ext\nio4r/../libev/ev.c:1311: more undefined references to `clock_gettime' follow
collect2.exe: error: ld returned 1 exit status
make: ** [nio4r_ext.so] Error 1
Gem files will remain installed in C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/nio4r-0.4.6 for inspection.
Results logged to C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/nio4r-0.4.6/ext/nio4r/gem_make.out
C:\rbxops\Vagrant> ruby -v
ruby 2.0.0p195 (2013-05-14) [i386-mingw32]
C:\rbxops\Vagrant>
The text was updated successfully, but these errors were encountered: