Closed werewolf1011 closed 1 year ago
I need to see the full error, but it's cut off at the top.
is this okey ?
On Thu, Dec 22, 2022 at 2:08 AM Samuel Williams @.***> wrote:
I need to see the full error, but it's cut off at the top.
— Reply to this email directly, view it on GitHub https://github.com/socketry/nio4r/issues/287#issuecomment-1362491355, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZFLV22FTOW65326TH2E55DWOP5ANANCNFSM6AAAAAATGJLGJ4 . You are receiving this because you authored the thread.Message ID: @.***>
I cannot see any additional message/information/screenshot.
But i send 5 screenshots
On Sun, 25 Dec, 2022, 12:05 pm Samuel Williams, @.***> wrote:
I cannot see any additional message/information/screenshot.
— Reply to this email directly, view it on GitHub https://github.com/socketry/nio4r/issues/287#issuecomment-1364632796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZFLV2Z52IE2TCSNBBO4N4LWO7RRVANCNFSM6AAAAAATGJLGJ4 . You are receiving this because you authored the thread.Message ID: @.***>
I guess you can't email screenshots on GitHub.
Should i send them through github ??
On Sun, 25 Dec, 2022, 1:01 pm Samuel Williams, @.***> wrote:
I guess you can't email screenshots on GitHub.
— Reply to this email directly, view it on GitHub https://github.com/socketry/nio4r/issues/287#issuecomment-1364637524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZFLV22EO57RGUQOOZSYKPDWO7YFPANCNFSM6AAAAAATGJLGJ4 . You are receiving this because you authored the thread.Message ID: @.***>
I suppose so?
It looks like your error is that you didn't install the ruby-dev packages which is required for compiling native gems. 2nd to last screenshot.
facing the same issue
@urchymanny that error means you need to install the Ruby development environment for your Linux distro.
It's not an issue specific to nio4r.
Facing same issue on my M2 Mac Mini, does Mac require Linux headers ?
Mac requires XCode. Perhaps if you paste the full error we can help you better.
when I run gem install nio4r
I get a bunch of errors
I have ruby 3.1.2
installed with asdf
current directory: /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/ext/nio4r
/Users/uche/.asdf/installs/ruby/3.1.2/bin/ruby -I /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0 -r ./siteconf20230326-19027-likbag.rb extconf.rb
checking for unistd.h... yes
checking for linux/aio_abi.h... no
checking for linux/io_uring.h... no
checking for sys/select.h... yes
checking for port_event_t in poll.h... no
checking for sys/epoll.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for port_event_t in port.h... no
checking for sys/resource.h... yes
creating Makefile
current directory: /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/ext/nio4r
make DESTDIR\= clean
current directory: /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/ext/nio4r
make DESTDIR\=
compiling bytebuffer.c
bytebuffer.c:308:20: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
return INT2NUM(bytes_read);
~~~~~~~ ^~~~~~~~~~
bytebuffer.c:338:20: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
return INT2NUM(bytes_written);
~~~~~~~ ^~~~~~~~~~~~~
2 warnings generated.
compiling monitor.c
monitor.c:185:40: warning: implicit conversion loses integer precision: 'VALUE' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
NIO_Monitor_update_interests(self, interest);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
monitor.c:196:40: warning: implicit conversion loses integer precision: 'VALUE' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
NIO_Monitor_update_interests(self, interest);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~
2 warnings generated.
compiling nio4r_ext.c
In file included from nio4r_ext.c:6:
./../libev/ev.c:234:5: warning: 'EV_NO_THREADS' is not defined, evaluates to 0 [-Wundef]
#if EV_NO_THREADS
^
./../libev/ev.c:240:5: warning: 'EV_NO_SMP' is not defined, evaluates to 0 [-Wundef]
#if EV_NO_SMP
^
./../libev/ev.c:292:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef]
# if __linux && __GLIBC__ == 2 && __GLIBC_MINOR__ < 17
^
./../libev/ev.c:321:6: warning: '_POSIX_C_SOURCE' is not defined, evaluates to 0 [-Wundef]
# if _POSIX_C_SOURCE >= 199309L
^
./../libev/ev.c:341:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef]
# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4))
^
./../libev/ev.c:365:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef]
# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4))
^
./../libev/ev.c:381:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef]
# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
^
./../libev/ev.c:389:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef]
# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
^
./../libev/ev.c:397:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef]
# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8))
^
./../libev/ev.c:573:48: warning: '/*' within block comment [-Wcomment]
/*#define MIN_INTERVAL 0.00000095367431640625 /* 1/2**20, good till 2200 */
^
./../libev/ev.c:691:7: warning: '__OPTIMIZE_SIZE__' is not defined, evaluates to 0 [-Wundef]
#if __OPTIMIZE_SIZE__
^
./../libev/ev.c:699:5: warning: '__amd64' is not defined, evaluates to 0 [-Wundef]
#if ECB_GCC_AMD64 || ECB_MSVC_AMD64
^
./../libev/ev.c:687:24: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:699:5: warning: '__amd64__' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:35: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:699:5: warning: '__x86_64' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:48: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:699:5: warning: '__x86_64__' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:60: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:699:22: warning: '_M_AMD64' is not defined, evaluates to 0 [-Wundef]
#if ECB_GCC_AMD64 || ECB_MSVC_AMD64
^
./../libev/ev.c:688:25: note: expanded from macro 'ECB_MSVC_AMD64'
#define ECB_MSVC_AMD64 (_M_AMD64 || _M_X64)
^
./../libev/ev.c:699:22: warning: '_M_X64' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:688:37: note: expanded from macro 'ECB_MSVC_AMD64'
#define ECB_MSVC_AMD64 (_M_AMD64 || _M_X64)
^
./../libev/ev.c:739:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
#if ECB_CPP
^
./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP'
#define ECB_CPP (__cplusplus+0)
^
./../libev/ev.c:751:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
#if ECB_CPP
^
./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP'
#define ECB_CPP (__cplusplus+0)
^
./../libev/ev.c:766:5: warning: 'ECB_NO_THREADS' is not defined, evaluates to 0 [-Wundef]
#if ECB_NO_THREADS
^
./../libev/ev.c:770:5: warning: 'ECB_NO_SMP' is not defined, evaluates to 0 [-Wundef]
#if ECB_NO_SMP
^
./../libev/ev.c:775:5: warning: '__xlC__' is not defined, evaluates to 0 [-Wundef]
#if __xlC__ && ECB_CPP
^
./../libev/ev.c:779:13: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if 1400 <= _MSC_VER
^
./../libev/ev.c:786:9: warning: '__i386' is not defined, evaluates to 0 [-Wundef]
#if __i386 || __i386__
^
./../libev/ev.c:786:19: warning: '__i386__' is not defined, evaluates to 0 [-Wundef]
#if __i386 || __i386__
^
./../libev/ev.c:790:11: warning: '__amd64' is not defined, evaluates to 0 [-Wundef]
#elif ECB_GCC_AMD64
^
./../libev/ev.c:687:24: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:790:11: warning: '__amd64__' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:35: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:790:11: warning: '__x86_64' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:48: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:790:11: warning: '__x86_64__' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:60: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:794:11: warning: '__powerpc__' is not defined, evaluates to 0 [-Wundef]
#elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
^
./../libev/ev.c:794:26: warning: '__ppc__' is not defined, evaluates to 0 [-Wundef]
#elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
^
./../libev/ev.c:794:37: warning: '__powerpc64__' is not defined, evaluates to 0 [-Wundef]
#elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
^
./../libev/ev.c:794:54: warning: '__ppc64__' is not defined, evaluates to 0 [-Wundef]
#elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
^
./../libev/ev.c:924:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
#if ECB_CPP
^
./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP'
#define ECB_CPP (__cplusplus+0)
^
./../libev/ev.c:981:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
#if ECB_CPP11
^
./../libev/ev.c:735:20: note: expanded from macro 'ECB_CPP11'
#define ECB_CPP11 (__cplusplus >= 201103L)
^
./../libev/ev.c:989:5: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1300
^
./../libev/ev.c:995:5: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1500
^
./../libev/ev.c:1003:5: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1400
^
./../libev/ev.c:1192:26: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'unsigned int' [-Wshorten-64-to-32]
return ecb_popcount32 (x) + ecb_popcount32 (x >> 32);
~~~~~~~~~~~~~~~~^~
./../libev/ev.c:1054:49: note: expanded from macro 'ecb_popcount32'
#define ecb_popcount32(x) __builtin_popcount (x)
~~~~~~~~~~~~~~~~~~ ^
./../libev/ev.c:1213:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
#if ECB_CPP
^
./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP'
#define ECB_CPP (__cplusplus+0)
^
./../libev/ev.c:1374:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
#if ECB_CPP
^
./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP'
#define ECB_CPP (__cplusplus+0)
^
./../libev/ev.c:1409:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
#if ECB_CPP
^
./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP'
#define ECB_CPP (__cplusplus+0)
^
./../libev/ev.c:1425:5: warning: 'ecb_cplusplus_does_not_suck' is not defined, evaluates to 0 [-Wundef]
#if ecb_cplusplus_does_not_suck
^
./../libev/ev.c:1540:8: warning: '__i386' is not defined, evaluates to 0 [-Wundef]
|| __i386 || __i386__ \
^
./../libev/ev.c:1540:18: warning: '__i386__' is not defined, evaluates to 0 [-Wundef]
|| __i386 || __i386__ \
^
./../libev/ev.c:1541:8: warning: '__amd64' is not defined, evaluates to 0 [-Wundef]
|| ECB_GCC_AMD64 \
^
./../libev/ev.c:687:24: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:1541:8: warning: '__amd64__' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:35: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:1541:8: warning: '__x86_64' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:48: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:1541:8: warning: '__x86_64__' is not defined, evaluates to 0 [-Wundef]
./../libev/ev.c:687:60: note: expanded from macro 'ECB_GCC_AMD64'
#define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__)
^
./../libev/ev.c:1542:8: warning: '__powerpc__' is not defined, evaluates to 0 [-Wundef]
|| __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
^
./../libev/ev.c:1542:23: warning: '__ppc__' is not defined, evaluates to 0 [-Wundef]
|| __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
^
./../libev/ev.c:1542:34: warning: '__powerpc64__' is not defined, evaluates to 0 [-Wundef]
|| __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
^
./../libev/ev.c:1542:51: warning: '__ppc64__' is not defined, evaluates to 0 [-Wundef]
|| __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
^
./../libev/ev.c:1510:13: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]
if (e < (14 - 24)) /* might not be sharp, but is good enough */
~ ^ ~~~~~~~
./../libev/ev.c:1746:5: warning: 'ECB_MEMORY_FENCE_NEEDS_PTHREADS' is not defined, evaluates to 0 [-Wundef]
#if ECB_MEMORY_FENCE_NEEDS_PTHREADS
^
./../libev/ev.c:1774:5: warning: 'EV_NEED_SYSCALL' is not defined, evaluates to 0 [-Wundef]
#if EV_NEED_SYSCALL
^
./../libev/ev.c:1976:5: warning: 'EV_AVOID_STDIO' is not defined, evaluates to 0 [-Wundef]
#if EV_AVOID_STDIO
^
./../libev/ev.c:2005:5: warning: 'EV_AVOID_STDIO' is not defined, evaluates to 0 [-Wundef]
#if EV_AVOID_STDIO
^
./../libev/ev.c:2050:5: warning: 'EV_AVOID_STDIO' is not defined, evaluates to 0 [-Wundef]
#if EV_AVOID_STDIO
^
./../libev/ev.c:2080:5: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef]
#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP
^
./../libev/ev.c:2080:31: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef]
#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP
^
./../libev/ev.c:2083:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_IOCP
^
In file included from nio4r_ext.c:6:
In file included from ./../libev/ev.c:2130:
./../libev/ev_vars.h:88:24: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if defined(_WIN32) || EV_GENWRAP
^
./../libev/ev_vars.h:102:21: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_EPOLL || EV_GENWRAP
^
./../libev/ev_vars.h:110:24: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_LINUXAIO || EV_GENWRAP
^
./../libev/ev_vars.h:121:23: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_IOURING || EV_GENWRAP
^
./../libev/ev_vars.h:159:20: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_PORT || EV_GENWRAP
^
./../libev/ev_vars.h:164:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_IOCP || EV_GENWRAP
^
./../libev/ev_vars.h:164:20: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_IOCP || EV_GENWRAP
^
./../libev/ev_vars.h:216:23: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_INOTIFY || EV_GENWRAP
^
./../libev/ev_vars.h:224:24: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_SIGNALFD || EV_GENWRAP
^
./../libev/ev_vars.h:230:23: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_TIMERFD || EV_GENWRAP
^
In file included from nio4r_ext.c:6:
./../libev/ev.c:2136: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:2227: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:591:65: 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:2249: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:2402:5: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef]
#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP
^
./../libev/ev.c:2402:31: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef]
#if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP
^
./../libev/ev.c:2619:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
k = minpos - heap;
~ ~~~~~~~^~~~~~
./../libev/ev.c:3073:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_IOCP
^
In file included from nio4r_ext.c:6:
In file included from ./../libev/ev.c:3080:
./../libev/ev_kqueue.c:116: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:120: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:6:
In file included from ./../libev/ev.c:3095:
./../libev/ev_select.c:57:5: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef]
#if EV_SELECT_IS_WINSOCKET
^
./../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:176:11: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef]
#if EV_SELECT_IS_WINSOCKET
^
./../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:591:65: 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:6:
In file included from ./../libev/ev.c:3095:
./../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:6:
./../libev/ev.c:3318:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_IOCP
^
./../libev/ev.c:3409:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef]
#if EV_USE_IOCP
^
./../libev/ev.c:4417:34: warning: '&' within '|' [-Wbitwise-op-parentheses]
fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
~~~~~~~~~~^~~~~~~~~~~~~ ~
./../libev/ev.c:4417:34: note: place parentheses around the '&' expression to silence this warning
fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
^
( )
89 warnings generated.
compiling selector.c
selector.c:301:26: error: incompatible function pointer types passing 'VALUE (*)(VALUE *)' (aka 'unsigned long (*)(unsigned long *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
return rb_ensure(func, (VALUE)args, NIO_Selector_unlock, self);
^~~~
/Users/uche/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0/ruby/internal/iterator.h:425:25: note: passing argument to parameter 'b_proc' here
VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2);
^
1 error generated.
make: *** [selector.o] Error 1
make failed, exit code 2
Yah facing the same problem
when I run
gem install nio4r
I get a bunch of errorsI have
ruby 3.1.2
installed with asdfcurrent directory: /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/ext/nio4r /Users/uche/.asdf/installs/ruby/3.1.2/bin/ruby -I /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/3.1.0 -r ./siteconf20230326-19027-likbag.rb extconf.rb checking for unistd.h... yes checking for linux/aio_abi.h... no checking for linux/io_uring.h... no checking for sys/select.h... yes checking for port_event_t in poll.h... no checking for sys/epoll.h... no checking for sys/event.h... yes checking for sys/queue.h... yes checking for port_event_t in port.h... no checking for sys/resource.h... yes creating Makefile current directory: /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/ext/nio4r make DESTDIR\= clean current directory: /Users/uche/.asdf/installs/ruby/3.1.2/lib/ruby/gems/3.1.0/gems/nio4r-2.5.8/ext/nio4r make DESTDIR\= compiling bytebuffer.c bytebuffer.c:308:20: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] return INT2NUM(bytes_read); ~~~~~~~ ^~~~~~~~~~ bytebuffer.c:338:20: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32] return INT2NUM(bytes_written); ~~~~~~~ ^~~~~~~~~~~~~ 2 warnings generated. compiling monitor.c monitor.c:185:40: warning: implicit conversion loses integer precision: 'VALUE' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] NIO_Monitor_update_interests(self, interest); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~ monitor.c:196:40: warning: implicit conversion loses integer precision: 'VALUE' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32] NIO_Monitor_update_interests(self, interest); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~ 2 warnings generated. compiling nio4r_ext.c In file included from nio4r_ext.c:6: ./../libev/ev.c:234:5: warning: 'EV_NO_THREADS' is not defined, evaluates to 0 [-Wundef] #if EV_NO_THREADS ^ ./../libev/ev.c:240:5: warning: 'EV_NO_SMP' is not defined, evaluates to 0 [-Wundef] #if EV_NO_SMP ^ ./../libev/ev.c:292:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef] # if __linux && __GLIBC__ == 2 && __GLIBC_MINOR__ < 17 ^ ./../libev/ev.c:321:6: warning: '_POSIX_C_SOURCE' is not defined, evaluates to 0 [-Wundef] # if _POSIX_C_SOURCE >= 199309L ^ ./../libev/ev.c:341:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef] # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) ^ ./../libev/ev.c:365:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef] # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) ^ ./../libev/ev.c:381:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef] # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) ^ ./../libev/ev.c:389:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef] # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) ^ ./../libev/ev.c:397:6: warning: '__linux' is not defined, evaluates to 0 [-Wundef] # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)) ^ ./../libev/ev.c:573:48: warning: '/*' within block comment [-Wcomment] /*#define MIN_INTERVAL 0.00000095367431640625 /* 1/2**20, good till 2200 */ ^ ./../libev/ev.c:691:7: warning: '__OPTIMIZE_SIZE__' is not defined, evaluates to 0 [-Wundef] #if __OPTIMIZE_SIZE__ ^ ./../libev/ev.c:699:5: warning: '__amd64' is not defined, evaluates to 0 [-Wundef] #if ECB_GCC_AMD64 || ECB_MSVC_AMD64 ^ ./../libev/ev.c:687:24: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:699:5: warning: '__amd64__' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:35: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:699:5: warning: '__x86_64' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:48: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:699:5: warning: '__x86_64__' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:60: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:699:22: warning: '_M_AMD64' is not defined, evaluates to 0 [-Wundef] #if ECB_GCC_AMD64 || ECB_MSVC_AMD64 ^ ./../libev/ev.c:688:25: note: expanded from macro 'ECB_MSVC_AMD64' #define ECB_MSVC_AMD64 (_M_AMD64 || _M_X64) ^ ./../libev/ev.c:699:22: warning: '_M_X64' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:688:37: note: expanded from macro 'ECB_MSVC_AMD64' #define ECB_MSVC_AMD64 (_M_AMD64 || _M_X64) ^ ./../libev/ev.c:739:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef] #if ECB_CPP ^ ./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP' #define ECB_CPP (__cplusplus+0) ^ ./../libev/ev.c:751:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef] #if ECB_CPP ^ ./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP' #define ECB_CPP (__cplusplus+0) ^ ./../libev/ev.c:766:5: warning: 'ECB_NO_THREADS' is not defined, evaluates to 0 [-Wundef] #if ECB_NO_THREADS ^ ./../libev/ev.c:770:5: warning: 'ECB_NO_SMP' is not defined, evaluates to 0 [-Wundef] #if ECB_NO_SMP ^ ./../libev/ev.c:775:5: warning: '__xlC__' is not defined, evaluates to 0 [-Wundef] #if __xlC__ && ECB_CPP ^ ./../libev/ev.c:779:13: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef] #if 1400 <= _MSC_VER ^ ./../libev/ev.c:786:9: warning: '__i386' is not defined, evaluates to 0 [-Wundef] #if __i386 || __i386__ ^ ./../libev/ev.c:786:19: warning: '__i386__' is not defined, evaluates to 0 [-Wundef] #if __i386 || __i386__ ^ ./../libev/ev.c:790:11: warning: '__amd64' is not defined, evaluates to 0 [-Wundef] #elif ECB_GCC_AMD64 ^ ./../libev/ev.c:687:24: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:790:11: warning: '__amd64__' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:35: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:790:11: warning: '__x86_64' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:48: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:790:11: warning: '__x86_64__' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:60: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:794:11: warning: '__powerpc__' is not defined, evaluates to 0 [-Wundef] #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ ^ ./../libev/ev.c:794:26: warning: '__ppc__' is not defined, evaluates to 0 [-Wundef] #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ ^ ./../libev/ev.c:794:37: warning: '__powerpc64__' is not defined, evaluates to 0 [-Wundef] #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ ^ ./../libev/ev.c:794:54: warning: '__ppc64__' is not defined, evaluates to 0 [-Wundef] #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ ^ ./../libev/ev.c:924:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef] #if ECB_CPP ^ ./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP' #define ECB_CPP (__cplusplus+0) ^ ./../libev/ev.c:981:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef] #if ECB_CPP11 ^ ./../libev/ev.c:735:20: note: expanded from macro 'ECB_CPP11' #define ECB_CPP11 (__cplusplus >= 201103L) ^ ./../libev/ev.c:989:5: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef] #if _MSC_VER >= 1300 ^ ./../libev/ev.c:995:5: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef] #if _MSC_VER >= 1500 ^ ./../libev/ev.c:1003:5: warning: '_MSC_VER' is not defined, evaluates to 0 [-Wundef] #if _MSC_VER >= 1400 ^ ./../libev/ev.c:1192:26: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to 'unsigned int' [-Wshorten-64-to-32] return ecb_popcount32 (x) + ecb_popcount32 (x >> 32); ~~~~~~~~~~~~~~~~^~ ./../libev/ev.c:1054:49: note: expanded from macro 'ecb_popcount32' #define ecb_popcount32(x) __builtin_popcount (x) ~~~~~~~~~~~~~~~~~~ ^ ./../libev/ev.c:1213:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef] #if ECB_CPP ^ ./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP' #define ECB_CPP (__cplusplus+0) ^ ./../libev/ev.c:1374:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef] #if ECB_CPP ^ ./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP' #define ECB_CPP (__cplusplus+0) ^ ./../libev/ev.c:1409:5: warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef] #if ECB_CPP ^ ./../libev/ev.c:734:20: note: expanded from macro 'ECB_CPP' #define ECB_CPP (__cplusplus+0) ^ ./../libev/ev.c:1425:5: warning: 'ecb_cplusplus_does_not_suck' is not defined, evaluates to 0 [-Wundef] #if ecb_cplusplus_does_not_suck ^ ./../libev/ev.c:1540:8: warning: '__i386' is not defined, evaluates to 0 [-Wundef] || __i386 || __i386__ \ ^ ./../libev/ev.c:1540:18: warning: '__i386__' is not defined, evaluates to 0 [-Wundef] || __i386 || __i386__ \ ^ ./../libev/ev.c:1541:8: warning: '__amd64' is not defined, evaluates to 0 [-Wundef] || ECB_GCC_AMD64 \ ^ ./../libev/ev.c:687:24: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:1541:8: warning: '__amd64__' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:35: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:1541:8: warning: '__x86_64' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:48: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:1541:8: warning: '__x86_64__' is not defined, evaluates to 0 [-Wundef] ./../libev/ev.c:687:60: note: expanded from macro 'ECB_GCC_AMD64' #define ECB_GCC_AMD64 (__amd64 || __amd64__ || __x86_64 || __x86_64__) ^ ./../libev/ev.c:1542:8: warning: '__powerpc__' is not defined, evaluates to 0 [-Wundef] || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ ^ ./../libev/ev.c:1542:23: warning: '__ppc__' is not defined, evaluates to 0 [-Wundef] || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ ^ ./../libev/ev.c:1542:34: warning: '__powerpc64__' is not defined, evaluates to 0 [-Wundef] || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ ^ ./../libev/ev.c:1542:51: warning: '__ppc64__' is not defined, evaluates to 0 [-Wundef] || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ ^ ./../libev/ev.c:1510:13: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare] if (e < (14 - 24)) /* might not be sharp, but is good enough */ ~ ^ ~~~~~~~ ./../libev/ev.c:1746:5: warning: 'ECB_MEMORY_FENCE_NEEDS_PTHREADS' is not defined, evaluates to 0 [-Wundef] #if ECB_MEMORY_FENCE_NEEDS_PTHREADS ^ ./../libev/ev.c:1774:5: warning: 'EV_NEED_SYSCALL' is not defined, evaluates to 0 [-Wundef] #if EV_NEED_SYSCALL ^ ./../libev/ev.c:1976:5: warning: 'EV_AVOID_STDIO' is not defined, evaluates to 0 [-Wundef] #if EV_AVOID_STDIO ^ ./../libev/ev.c:2005:5: warning: 'EV_AVOID_STDIO' is not defined, evaluates to 0 [-Wundef] #if EV_AVOID_STDIO ^ ./../libev/ev.c:2050:5: warning: 'EV_AVOID_STDIO' is not defined, evaluates to 0 [-Wundef] #if EV_AVOID_STDIO ^ ./../libev/ev.c:2080:5: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef] #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP ^ ./../libev/ev.c:2080:31: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef] #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP ^ ./../libev/ev.c:2083:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_IOCP ^ In file included from nio4r_ext.c:6: In file included from ./../libev/ev.c:2130: ./../libev/ev_vars.h:88:24: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if defined(_WIN32) || EV_GENWRAP ^ ./../libev/ev_vars.h:102:21: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_EPOLL || EV_GENWRAP ^ ./../libev/ev_vars.h:110:24: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_LINUXAIO || EV_GENWRAP ^ ./../libev/ev_vars.h:121:23: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_IOURING || EV_GENWRAP ^ ./../libev/ev_vars.h:159:20: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_PORT || EV_GENWRAP ^ ./../libev/ev_vars.h:164:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_IOCP || EV_GENWRAP ^ ./../libev/ev_vars.h:164:20: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_IOCP || EV_GENWRAP ^ ./../libev/ev_vars.h:216:23: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_INOTIFY || EV_GENWRAP ^ ./../libev/ev_vars.h:224:24: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_SIGNALFD || EV_GENWRAP ^ ./../libev/ev_vars.h:230:23: warning: 'EV_GENWRAP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_TIMERFD || EV_GENWRAP ^ In file included from nio4r_ext.c:6: ./../libev/ev.c:2136: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:2227: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:591:65: 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:2249: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:2402:5: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef] #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP ^ ./../libev/ev.c:2402:31: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef] #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP ^ ./../libev/ev.c:2619:18: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] k = minpos - heap; ~ ~~~~~~~^~~~~~ ./../libev/ev.c:3073:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_IOCP ^ In file included from nio4r_ext.c:6: In file included from ./../libev/ev.c:3080: ./../libev/ev_kqueue.c:116: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:120: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:6: In file included from ./../libev/ev.c:3095: ./../libev/ev_select.c:57:5: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef] #if EV_SELECT_IS_WINSOCKET ^ ./../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:176:11: warning: 'EV_SELECT_IS_WINSOCKET' is not defined, evaluates to 0 [-Wundef] #if EV_SELECT_IS_WINSOCKET ^ ./../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:591:65: 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:6: In file included from ./../libev/ev.c:3095: ./../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:6: ./../libev/ev.c:3318:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_IOCP ^ ./../libev/ev.c:3409:5: warning: 'EV_USE_IOCP' is not defined, evaluates to 0 [-Wundef] #if EV_USE_IOCP ^ ./../libev/ev.c:4417:34: warning: '&' within '|' [-Wbitwise-op-parentheses] fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY); ~~~~~~~~~~^~~~~~~~~~~~~ ~ ./../libev/ev.c:4417:34: note: place parentheses around the '&' expression to silence this warning fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY); ^ ( ) 89 warnings generated. compiling selector.c selector.c:301:26: error: incompatible function pointer types passing 'VALUE (*)(VALUE *)' (aka 'unsigned long (*)(unsigned long *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types] return rb_ensure(func, (VALUE)args, NIO_Selector_unlock, self); ^~~~ /Users/uche/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0/ruby/internal/iterator.h:425:25: note: passing argument to parameter 'b_proc' here VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2); ^ 1 error generated. make: *** [selector.o] Error 1 make failed, exit code 2
Yah i am facing the exact same problem i would like to the solution to this!!
selector.c:301:26: error: incompatible function pointer types passing 'VALUE (*)(VALUE *)' (aka 'unsigned long (*)(unsigned long *)') to parameter of type 'VALUE (*)(VALUE)' (aka 'unsigned long (*)(unsigned long)') [-Wincompatible-function-pointer-types]
return rb_ensure(func, (VALUE)args, NIO_Selector_unlock, self);
^~~~
/Users/uche/.asdf/installs/ruby/3.1.2/include/ruby-3.1.0/ruby/internal/iterator.h:425:25: note: passing argument to parameter 'b_proc' here
VALUE rb_ensure(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*e_proc)(VALUE), VALUE data2);
^
1 error generated.
This particular error should be easily fixable, if no one has made a PR, I'll try to look at it over the weekend.
Same problem.
@urchymanny what hardware and system are you compiling on?
Aarch64 Android
On Sun, 2 Apr, 2023, 4:10 pm Samuel Williams, @.***> wrote:
@urchymanny https://github.com/urchymanny what hardware and system are you compiling on?
— Reply to this email directly, view it on GitHub https://github.com/socketry/nio4r/issues/287#issuecomment-1493294645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIHSVOGDO54CBODC63U7MTW7FCR3ANCNFSM6AAAAAATGJLGJ4 . You are receiving this because you commented.Message ID: @.***>
On Termux on an Android! @urchymanny
I see, so it's a different compiler that's more strict, causing the issues.
I see, so it's a different compiler that's more strict, causing the issues.
Yeah, this is Clang 16 which makes -Wincompatible-function-pointer-types an error by default. I think this is a (partial) dupe of (or the other way around, w/e) https://github.com/socketry/nio4r/issues/290.
Cheers for the quick fix!
Yeah, that makes sense, I suppose the original code wasn't really valid.
Ohk i get it! No problem then
Thanks for the help!