Skip to content
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

gem install nio4r -v '1.0.0' fails #57

Closed
andersennl opened this issue Jan 25, 2015 · 22 comments
Closed

gem install nio4r -v '1.0.0' fails #57

andersennl opened this issue Jan 25, 2015 · 22 comments

Comments

@andersennl
Copy link

This error occurred when I updated my Rails' Ruby version to 2.0.0. Any idea what I can do here?

gem install nio4r -v '1.0.0'
Building native extensions.  This could take a while...
ERROR:  Error installing nio4r:
    ERROR: Failed to build gem native extension.

    /Users/nikolajandersen/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150125-95007-10ebeah.rb extconf.rb
checking for rb_thread_blocking_region()... no
checking for sys/select.h... yes
checking for poll.h... yes
checking for sys/epoll.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for port.h... no
checking for sys/resource.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling monitor.c
In file included from monitor.c:6:
In file included from ./nio4r.h:10:
/Users/nikolajandersen/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/backward/rubyio.h:2:2: warning: use "ruby/io.h" instead of "rubyio.h" [-W#warnings]
#warning use "ruby/io.h" instead of "rubyio.h"
 ^
monitor.c:30:13: warning: unused function 'NIO_Monitor_callback' [-Wunused-function]
static void NIO_Monitor_callback(struct ev_loop *ev_loop, struct ev_io *io, int revents);
            ^
2 warnings generated.
compiling nio4r_ext.c
In file included from nio4r_ext.c:6:
In file included from ./nio4r.h:10:
/Users/nikolajandersen/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/backward/rubyio.h:2:2: warning: use "ruby/io.h" instead of "rubyio.h" [-W#warnings]
#warning use "ruby/io.h" instead of "rubyio.h"
 ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:481:48: warning: '/*' within block comment [-Wcomment]
/*#define MIN_INTERVAL  0.00000095367431640625 /* 1/2**20, good till 2200 */
                                               ^
./../libev/ev.c:841:25: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
    return ecb_ctz32 (x >> shift) + shift;
           ~~~~~~~~~  ~~^~~~~~~~
./../libev/ev.c:877:26: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
    return r + ecb_ld32 (x);
               ~~~~~~~~  ^
./../libev/ev.c:922:26: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
  return ecb_popcount32 (x) + ecb_popcount32 (x >> 32);
         ~~~~~~~~~~~~~~  ^
./../libev/ev.c:966:37: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'uint32_t' (aka 'unsigned int') [-Wshorten-64-to-32]
    return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32);
                       ~~~~~~~~~~~  ^
./../libev/ev.c:1535:31: warning: 'extern' variable has an initializer [-Wextern-initializer]
  EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */
                              ^
./../libev/ev.c:1622:7: warning: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Wshorten-64-to-32]
      EV_TV_SET (tv, delay);
      ^~~~~~~~~~~~~~~~~~~~~
./../libev/ev.c:486:64: note: expanded from macro 'EV_TV_SET'
#define EV_TV_SET(tv,t) do { tv.tv_sec = (long)t; tv.tv_usec = (long)((t - tv.tv_sec) * 1e6); } while (0)
                                                             ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../libev/ev.c:1644:19: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4)
      ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../libev/ev.c:1706:7: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (ANPENDING, pendings [pri], pendingmax [pri], w_->pending, EMPTY2);
      ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:1717:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (W, rfeeds, rfeedmax, rfeedcnt + 1, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:1844:7: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (int, fdchanges, fdchangemax, fdchangecnt, EMPTY2);
      ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:1986:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
      k = minpos - heap;
        ~ ~~~~~~~^~~~~~
In file included from nio4r_ext.c:7:
In file included from ./../libev/ev.c:2394:
./../libev/ev_kqueue.c:50:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
In file included from nio4r_ext.c:7:
In file included from ./../libev/ev.c:2394:
./../libev/ev_kqueue.c:115:34: warning: implicit conversion loses integer precision: 'uintptr_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
      int fd = kqueue_events [i].ident;
          ~~   ~~~~~~~~~~~~~~~~~~^~~~~
./../libev/ev_kqueue.c:119:39: warning: implicit conversion loses integer precision: 'intptr_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
          int err = kqueue_events [i].data;
              ~~~   ~~~~~~~~~~~~~~~~~~^~~~
In file included from nio4r_ext.c:7:
In file included from ./../libev/ev.c:2400:
./../libev/ev_poll.c:66:7: warning: unused variable 'ocur_' [-Wunused-variable]
      array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2);
      ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
In file included from nio4r_ext.c:7:
In file included from ./../libev/ev.c:2400:
./../libev/ev_poll.c:110:18: warning: expression result unused [-Wunused-value]
        assert (("libev: poll() returned illegal result, broken BSD kernel?", p < polls + pollcnt));
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
In file included from ./../libev/ev.c:2403:
./../libev/ev_select.c:109:24: warning: implicit conversion loses integer precision: 'unsigned long' to 'fd_mask' (aka 'int') [-Wshorten-64-to-32]
    fd_mask mask = 1UL << (fd % NFDBITS);
            ~~~~   ~~~~^~~~~~~~~~~~~~~~~
./../libev/ev_select.c:147:3: warning: implicit conversion loses integer precision: 'long' to '__darwin_suseconds_t' (aka 'int') [-Wshorten-64-to-32]
  EV_TV_SET (tv, timeout);
  ^~~~~~~~~~~~~~~~~~~~~~~
./../libev/ev.c:486:64: note: expanded from macro 'EV_TV_SET'
#define EV_TV_SET(tv,t) do { tv.tv_sec = (long)t; tv.tv_usec = (long)((t - tv.tv_sec) * 1e6); } while (0)
                                                             ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from nio4r_ext.c:7:
In file included from ./../libev/ev.c:2403:
./../libev/ev_select.c:259:34: warning: implicit conversion loses integer precision: 'unsigned long' to 'fd_mask' (aka 'int') [-Wshorten-64-to-32]
              fd_mask mask = 1UL << bit;
                      ~~~~   ~~~~^~~~~~
In file included from nio4r_ext.c:7:
./../libev/ev.c:2806:12: warning: expression result unused [-Wunused-value]
  assert (("libev: watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2809:14: warning: expression result unused [-Wunused-value]
    assert (("libev: pending watcher not on pending queue", pendings [ABSPRI (w)][w->pending - 1].w == w));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2819:16: warning: expression result unused [-Wunused-value]
      assert (("libev: active index mismatch in heap", ev_active (ANHE_w (heap [i])) == i));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2820:16: warning: expression result unused [-Wunused-value]
      assert (("libev: heap condition violated", i == HEAP0 || ANHE_at (heap [HPARENT (i)]) <= ANHE_at (heap [i])));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2821:16: warning: expression result unused [-Wunused-value]
      assert (("libev: heap at cache mismatch", ANHE_at (heap [i]) == ev_at (ANHE_w (heap [i]))));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2832:16: warning: expression result unused [-Wunused-value]
      assert (("libev: active index mismatch", ev_active (ws [cnt]) == cnt + 1));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2850:14: warning: expression result unused [-Wunused-value]
    assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2863:24: warning: expression result unused [-Wunused-value]
              assert (("libev: io watcher list contains a loop", w != w2));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2867:20: warning: expression result unused [-Wunused-value]
          assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:2868:20: warning: expression result unused [-Wunused-value]
          assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3050:24: warning: expression result unused [-Wunused-value]
              assert (("libev: negative ev_timer repeat value found while processing timers", w->repeat > 0.));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3112:24: warning: expression result unused [-Wunused-value]
              assert (("libev: ev_periodic reschedule callback returned time in the past", ev_at (w) >= ev_rt_now));
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3274:12: warning: expression result unused [-Wunused-value]
  assert (("libev: ev_loop recursion during release detected", loop_done != EVBREAK_RECURSE));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3446:22: warning: expression result unused [-Wunused-value]
            assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w)));
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3620:12: warning: expression result unused [-Wunused-value]
  assert (("libev: ev_io_start called with negative fd", fd >= 0));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3621:12: warning: expression result unused [-Wunused-value]
  assert (("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE))));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3630:12: warning: expression result unused [-Wunused-value]
  assert (("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3645:12: warning: expression result unused [-Wunused-value]
  assert (("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3665:12: warning: expression result unused [-Wunused-value]
  assert (("libev: ev_timer_start called with negative timer repeat value", w->repeat >= 0.));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3671:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ANHE, timers, timermax, ev_active (w) + 1, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:3693:14: warning: expression result unused [-Wunused-value]
    assert (("libev: internal timer heap corruption", ANHE_w (timers [active]) == (WT)w));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3755:16: warning: expression result unused [-Wunused-value]
      assert (("libev: ev_periodic_start called with negative interval value", w->interval >= 0.));
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3765:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ANHE, periodics, periodicmax, ev_active (w) + 1, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:3787:14: warning: expression result unused [-Wunused-value]
    assert (("libev: internal periodic heap corruption", ANHE_w (periodics [active]) == (WT)w));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3824:12: warning: expression result unused [-Wunused-value]
  assert (("libev: ev_signal_start called with illegal signal number", w->signum > 0 && w->signum < EV_NSIG));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3827:12: warning: expression result unused [-Wunused-value]
  assert (("libev: a signal must not be attached to two different loops",
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:3945:12: warning: expression result unused [-Wunused-value]
  assert (("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:4351:5: warning: unused variable 'ocur_' [-Wunused-variable]
    array_needsize (ev_idle *, idles [ABSPRI (w)], idlemax [ABSPRI (w)], active, EMPTY2);
    ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:4391:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_prepare *, prepares, preparemax, preparecnt, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:4429:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_check *, checks, checkmax, checkcnt, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:4524:14: warning: expression result unused [-Wunused-value]
    assert (("libev: loop to be embedded is not embeddable", backend & ev_embeddable_backends ()));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
In file included from nio4r_ext.c:7:
./../libev/ev.c:4576:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_fork *, forks, forkmax, forkcnt, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:4614:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_cleanup *, cleanups, cleanupmax, cleanupcnt, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
./../libev/ev.c:4659:3: warning: unused variable 'ocur_' [-Wunused-variable]
  array_needsize (ev_async *, asyncs, asyncmax, asynccnt, EMPTY2);
  ^
./../libev/ev.c:1668:22: note: expanded from macro 'array_needsize'
      int ecb_unused ocur_ = (cur);                                     \
                     ^
55 warnings generated.
compiling selector.c
In file included from selector.c:6:
In file included from ./nio4r.h:10:
/Users/nikolajandersen/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/backward/rubyio.h:2:2: warning: use "ruby/io.h" instead of "rubyio.h" [-W#warnings]
#warning use "ruby/io.h" instead of "rubyio.h"
 ^
In file included from selector.c:7:
/Users/nikolajandersen/.rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/backward/rubysig.h:14:2: warning: rubysig.h is obsolete [-W#warnings]
#warning rubysig.h is obsolete
 ^
selector.c:240:21: warning: unused variable 'interests' [-Wunused-variable]
    VALUE self, io, interests, selectables, monitor;
                    ^
selector.c:241:11: warning: unused variable 'monitor_args' [-Wunused-variable]
    VALUE monitor_args[3];
          ^
selector.c:268:20: warning: unused variable 'array' [-Wunused-variable]
    VALUE timeout, array;
                   ^
selector.c:286:9: warning: unused variable 'i' [-Wunused-variable]
    int i, ready;
        ^
selector.c:341:9: error: use of undeclared identifier 'TRAP_BEG'
        TRAP_BEG;
        ^
selector.c:343:9: error: use of undeclared identifier 'TRAP_END'
        TRAP_END;
        ^
selector.c:352:13: error: use of undeclared identifier 'TRAP_BEG'
            TRAP_BEG;
            ^
selector.c:354:13: error: use of undeclared identifier 'TRAP_END'
            TRAP_END;
            ^
selector.c:391:43: warning: incompatible pointer types passing 'VALUE (VALUE)' to parameter of type 'VALUE (*)(VALUE *)' [-Wincompatible-pointer-types]
    return NIO_Selector_synchronize(self, NIO_Selector_close_synchronized, self);
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
selector.c:157:59: note: passing argument to parameter 'func' here
static VALUE NIO_Selector_synchronize(VALUE self, VALUE (*func)(VALUE *args), VALUE *args)
                                                          ^
selector.c:391:76: warning: incompatible integer to pointer conversion passing 'VALUE' (aka 'unsigned long') to parameter of type 'VALUE *' (aka 'unsigned long *'); take the address with & [-Wint-conversion]
    return NIO_Selector_synchronize(self, NIO_Selector_close_synchronized, self);
                                                                           ^~~~
                                                                           &
selector.c:157:86: note: passing argument to parameter 'args' here
static VALUE NIO_Selector_synchronize(VALUE self, VALUE (*func)(VALUE *args), VALUE *args)
                                                                                     ^
selector.c:407:43: warning: incompatible pointer types passing 'VALUE (VALUE)' to parameter of type 'VALUE (*)(VALUE *)' [-Wincompatible-pointer-types]
    return NIO_Selector_synchronize(self, NIO_Selector_closed_synchronized, self);
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
selector.c:157:59: note: passing argument to parameter 'func' here
static VALUE NIO_Selector_synchronize(VALUE self, VALUE (*func)(VALUE *args), VALUE *args)
                                                          ^
selector.c:407:77: warning: incompatible integer to pointer conversion passing 'VALUE' (aka 'unsigned long') to parameter of type 'VALUE *' (aka 'unsigned long *'); take the address with & [-Wint-conversion]
    return NIO_Selector_synchronize(self, NIO_Selector_closed_synchronized, self);
                                                                            ^~~~
                                                                            &
selector.c:157:86: note: passing argument to parameter 'args' here
static VALUE NIO_Selector_synchronize(VALUE self, VALUE (*func)(VALUE *args), VALUE *args)
                                                                                     ^
10 warnings and 4 errors generated.
make: *** [selector.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/nikolajandersen/.rvm/gems/ruby-2.2.0/gems/nio4r-1.0.0 for inspection.
Results logged to /Users/nikolajandersen/.rvm/gems/ruby-2.2.0/extensions/x86_64-darwin-14/2.2.0/nio4r-1.0.0/gem_make.out
@Asmod4n
Copy link

Asmod4n commented Jan 25, 2015

This has been solved in nio4r 1.1

@digitalextremist
Copy link

This is fixed in 1.1 as @Asmod4n said. Are you able to upgrade or is there some part of 1.0.0 you need that 1.1 doesn't support?

@andersennl
Copy link
Author

Well, when I try to use Ruby 2.2.0 for my Rails 3 project and do a bundle install, something seems to be dependent on the 1.0 version of this gem. A prior installation of nio4r 1.1 didn't help.

@tarcieri
Copy link
Contributor

Have you tried bundle update nio4r? I can't imagine anything would pin to 1.0.0.

@Asmod4n
Copy link

Asmod4n commented Jan 26, 2015

After looking at celluloid and celluloid-io, i also cannot see anything which could pin nio4r to 1.0

@andersennl
Copy link
Author

Ah I actually read the error wrong. But the errors I'm getting are interesting. When I try a bundle update nio4r, it fails with this error:
https://gist.github.com/andersennl/ad254d65649807cde263

gem install libv8 -v '3.16.14.3' fails like this:
https://gist.github.com/andersennl/6dd35b923247ca3c6218

Doom loop :)

@Asmod4n
Copy link

Asmod4n commented Jan 26, 2015

Oh the joy that is libv8 ...

@tarcieri
Copy link
Contributor

@andersennl try pinning libv8's version to the one that's working for you

@andersennl
Copy link
Author

Hm okay I'll try to figure out which one that could be. Thanks for your help!

@asecondwill
Copy link

@andersennl - what happened with this. I'm getting the same error

@garciadanny
Copy link

Anyone figure out how to fix this issue?

@tarcieri
Copy link
Contributor

@garciadanny update nio4r if you can

@andersennl
Copy link
Author

Sorry I didn't see the new questions here. I made it work like this:

bundle update nio4r

@rshejnberg
Copy link

Encountering this issue. Both attempting to install version 1.1 and running bundle update nio4r fail.

@tarcieri
Copy link
Contributor

@rshejnberg if you'd like us to help, you'll need to provide a lot more information, like:

  • Your OS / version
  • An output of where the error is occurring

@flushentitypacket
Copy link

bundle update nio4r solved this for me.

@bobzhen
Copy link

bobzhen commented Dec 31, 2015

bundle update nio4r

rocks!!!

@joost
Copy link

joost commented Apr 30, 2016

+1 for bundle update nio4r :)

@eric-khoury
Copy link

Had a similar problem on ubuntu 14.04 with ruby 2.3.0. Turned out I was missing a gmp package. This solved the issue for me: sudo apt-get install libgmp3-dev

@assafshomer
Copy link

also for me, bundle update nio4r did the trick. Thx!

@jaredchu
Copy link

bundle update nio4r
Work like a champ!

@rahulrajaram
Copy link

If you are using mac, it might be that you need to update Xcode. That was my problem. I got the hint here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests