Skip to content

Failed to install.io-event: error: call to undeclared function 'epoll_pwait2' #155

@marek22k

Description

@marek22k
$ gem install io-event
Building native extensions. This could take a while...
ERROR:  Error installing io-event:                                ERROR: Failed to build gem native extension.

    current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.4.0/gems/io-event-1.14.2/ext
/data/data/com.termux/files/usr/bin/ruby extconf.rb
checking for whether -Wall is accepted as CFLAGS... no    checking for whether -Wno-unknown-pragmas is accepted as CFLAGS... no
checking for whether -std=c99 is accepted as CFLAGS... no checking for rb_ext_ractor_safe()... yes
checking for &rb_fiber_transfer()... yes
checking for -luring... no
checking for sys/epoll.h... yes                           checking for sys/event.h... no
checking for sys/wait.h... yes
checking for sys/eventfd.h... yes                         checking for rb_io_descriptor()... yes
checking for &rb_process_status_wait()... yes
checking for rb_fiber_current()... yes
checking for &rb_fiber_raise()... yes
checking for epoll_pwait2()... yes
checking for ruby/io/buffer.h... yes
checking for rb_fiber_scheduler_blocking_operation_extract()... no
creating extconf.h
creating Makefile

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.4.0/gems/io-event-1.14.2/ext
make -j9 DESTDIR\= sitearchdir\=./.gem.20260125-28006-d7jozu sitelibdir\=./.gem.20260125-28006-d7jozu clean

current directory: /data/data/com.termux/files/usr/lib/ruby/gems/3.4.0/gems/io-event-1.14.2/ext
make -j9 DESTDIR\= sitearchdir\=./.gem.20260125-28006-d7jozu sitelibdir\=./.gem.20260125-28006-d7jozu
compiling ./io/event/event.c
compiling ./io/event/time.c
compiling ./io/event/fiber.c
compiling ./io/event/selector/selector.c
compiling ./io/event/selector/epoll.c
compiling ./io/event/interrupt.c
In file included from ./io/event/time.c:4:
In file included from ./io/event/time.h:6:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby.h:38:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/ruby.h:28:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic.h:24:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic/char.h:29:
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rstring.h:398:24: warning: default initialization of an object of type 'struct RString' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
  398 |         struct RString retval;
      |                        ^
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rbasic.h:86:17: note: member 'klass' declared 'const' here
   86 |     const VALUE klass;
      |                 ^
In file included from ./io/event/event.c:4:
In file included from ./io/event/event.h:6:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby.h:38:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/ruby.h:28:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic.h:24:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic/char.h:29:
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rstring.h:398:24: warning: default initialization of an object of type 'struct RString' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
  398 |         struct RString retval;
      |                        ^
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rbasic.h:86:17: note: member 'klass' declared 'const' here
   86 |     const VALUE klass;
      |                 ^
In file included from ./io/event/fiber.c:4:
In file included from ./io/event/fiber.h:6:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby.h:38:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/ruby.h:28:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic.h:24:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic/char.h:29:
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rstring.h:398:24: warning: default initialization of an object of type 'struct RString' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
  398 |         struct RString retval;
      |                        ^
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rbasic.h:86:17: note: member 'klass' declared 'const' here
   86 |     const VALUE klass;
      |                 ^
In file included from ./io/event/selector/epoll.c:4:
In file included from ./io/event/selector/epoll.h:6:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby.h:38:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/ruby.h:28:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic.h:24:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic/char.h:29:
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rstring.h:398:24: warning: default initialization of an object of type 'struct RString' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
  398 |         struct RString retval;
      |                        ^
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rbasic.h:86:17: note: member 'klass' declared 'const' here
   86 |     const VALUE klass;
      |                 ^
1 warning generated.
1 warning generated.
1 warning generated.
In file included from ./io/event/selector/selector.c:4:
In file included from ./io/event/selector/selector.h:6:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby.h:38:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/ruby.h:28:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic.h:24:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic/char.h:29:
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rstring.h:398:24: warning: default initialization of an object of type 'struct RString' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
  398 |         struct RString retval;
      |                        ^
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rbasic.h:86:17: note: member 'klass' declared 'const' here
   86 |     const VALUE klass;
      |                 ^
In file included from ./io/event/selector/epoll.c:13:
./io/event/selector/pidfd.c:20:9: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
   20 |         return syscall(__NR_pidfd_open, pid, flags);
      |         ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./io/event/selector/epoll.c:835:34: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
  835 |         return (timeout->tv_sec * 1000) + (timeout->tv_nsec / 1000000);
      |         ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./io/event/selector/epoll.c:852:21: error: call to undeclared function 'epoll_pwait2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  852 |         arguments->count = epoll_pwait2(arguments->selector->descriptor, arguments->events, EPOLL_MAX_EVENTS, arguments->timeout, NULL);
      |                            ^
./io/event/selector/epoll.c:852:21: note: did you mean 'epoll_pwait'?
/data/data/com.termux/files/usr/include/sys/epoll.h:84:5: note: 'epoll_pwait' declared here
   84 | int epoll_pwait(int __epoll_fd, struct epoll_event* _Nonnull __events, int __event_count, int __timeout_ms, const sigset_t* _Nullable __mask);
      |     ^
In file included from ./io/event/interrupt.c:4:
In file included from ./io/event/interrupt.h:6:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby.h:38:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/ruby.h:28:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic.h:24:
In file included from /data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/arithmetic/char.h:29:
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rstring.h:398:24: warning: default initialization of an object of type 'struct RString' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
  398 |         struct RString retval;
      |                        ^
/data/data/com.termux/files/usr/include/ruby-3.4.0/ruby/internal/core/rbasic.h:86:17: note: member 'klass' declared 'const' here
   86 |     const VALUE klass;
      |                 ^
3 warnings and 1 error generated.
make: *** [Makefile:250: epoll.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
1 warning generated.

make failed, exit code 2

Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/3.4.0/gems/io-event-1.14.2 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/3.4.0/extensions/aarch64-linux-android/3.4.0/io-event-1.14.2/gem_make.out
$ clang --version
clang version 21.1.8
Target: aarch64-unknown-linux-android24
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin
$ ruby --version
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [aarch64-linux-android]
Termux Variables:
TERMUX_API_VERSION=0.53.0
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=32411
TERMUX_APP__DATA_DIR=/data/user/0/com.termux
TERMUX_APP__LEGACY_DATA_DIR=/data/data/com.termux
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c197,c256,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.3
TERMUX__HOME=/data/data/com.termux/files/home
TERMUX__PREFIX=/data/data/com.termux/files/usr
TERMUX__ROOTFS_DIR=/data/data/com.termux/files
TERMUX__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c197,c256,c512,c768
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://termux.cdn.lumito.net/termux-main stable main
# root-repo (sources.list.d/root.list)
deb https://termux.cdn.lumito.net/termux-root root stable
# x11-repo (sources.list.d/x11.list)
deb https://termux.cdn.lumito.net/termux-x11 x11 main
Updatable packages:
command-not-found/stable 3.2-14 aarch64 [upgradable from: 3.2-13]
harfbuzz/stable 12.3.2 aarch64 [upgradable from: 12.3.1]
qpdf/stable 12.3.2 aarch64 [upgradable from: 12.3.1]
svt-av1/stable 4.0.0 aarch64 [upgradable from: 3.1.2]
termux-tools version:
1.45.0
Android version:
16
Kernel build information:
Linux localhost 6.1.155-ga09a435bbfee #1 SMP PREEMPT Thu Nov  6 12:14:10 CET 2025 aarch64 Android
Device manufacturer:
Fairphone
Device model:
Fairphone 6
Supported ABIs:
SUPPORTED_ABIS: arm64-v8a
SUPPORTED_32_BIT_ABIS: 
SUPPORTED_64_BIT_ABIS: arm64-v8a
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec-ld-preload.so
Installed termux plugins:
com.termux.api versionCode:1002
com.termux.gui versionCode:7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions