Function 'sys_errlist' not found by require "timeout_interrupt". #1

Open
opened 2021-12-03 18:31:44 +01:00 by deac · 2 comments

By https://github.com/DenisKnauf/ruby-timeout-interrupt/issues/5

Hello,

I got the following error "Function 'sys_errlist' not found" by running require "timeout_interrupt" on my Linux distribution Fedora 34.
Do you have any idea to fix it? Thanks.

$ cat /etc/fedora-release 
Fedora release 34 (Rawhide)

$ ruby -v
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC) 

$ rpm -q glibc
glibc-2.32.9000-17.fc34.x86_64

$ rpm -q glibc-devel
glibc-devel-2.32.9000-17.fc34.x86_64

Install the latest version 0.3.0.

$ gem install timeout-interrupt

$ gem list timeout-interrupt

*** LOCAL GEMS ***

timeout-interrupt (0.3.0)

Then the following command shows an error.

$ ruby -e 'require "timeout_interrupt"'
Traceback (most recent call last):
	2: from -e:1:in `<main>'
	1: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- timeout_interrupt (LoadError)
	13: from -e:1:in `<main>'
	12: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:147:in `require'
	11: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `rescue in require'
	10: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `require'
	 9: from /builddir/.gem/ruby/gems/timeout-interrupt-0.3.0/lib/timeout_interrupt.rb:1:in `<top (required)>'
	 8: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
	 7: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
	 6: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc.rb:13:in `<top (required)>'
	 5: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
	 4: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
	 3: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:9:in `<top (required)>'
	 2: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:10:in `<module:FFI>'
	 1: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:19:in `<module:LibC>'
/usr/share/gems/gems/ffi-1.12.1/lib/ffi/library.rb:342:in `attach_variable': Function 'sys_errlist' not found in [#<FFI::DynamicLibrary:0x0000558fc542f8b0>] (FFI::NotFoundError)
By https://github.com/DenisKnauf/ruby-timeout-interrupt/issues/5 Hello, I got the following error "Function 'sys_errlist' not found" by running `require "timeout_interrupt"` on my Linux distribution Fedora 34. Do you have any idea to fix it? Thanks. ``` $ cat /etc/fedora-release Fedora release 34 (Rawhide) $ ruby -v ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC) $ rpm -q glibc glibc-2.32.9000-17.fc34.x86_64 $ rpm -q glibc-devel glibc-devel-2.32.9000-17.fc34.x86_64 ``` Install the latest version 0.3.0. ``` $ gem install timeout-interrupt $ gem list timeout-interrupt *** LOCAL GEMS *** timeout-interrupt (0.3.0) ``` Then the following command shows an error. ``` $ ruby -e 'require "timeout_interrupt"' Traceback (most recent call last): 2: from -e:1:in `<main>' 1: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- timeout_interrupt (LoadError) 13: from -e:1:in `<main>' 12: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:147:in `require' 11: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `rescue in require' 10: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `require' 9: from /builddir/.gem/ruby/gems/timeout-interrupt-0.3.0/lib/timeout_interrupt.rb:1:in `<top (required)>' 8: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' 7: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' 6: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc.rb:13:in `<top (required)>' 5: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' 4: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' 3: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:9:in `<top (required)>' 2: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:10:in `<module:FFI>' 1: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:19:in `<module:LibC>' /usr/share/gems/gems/ffi-1.12.1/lib/ffi/library.rb:342:in `attach_variable': Function 'sys_errlist' not found in [#<FFI::DynamicLibrary:0x0000558fc542f8b0>] (FFI::NotFoundError) ```
Poster
Owner

9: from /builddir/.gem/ruby/gems/timeout-interrupt-0.3.0/lib/timeout_interrupt.rb:1:in `<top (required)>'

The lib/timeout_interrupt.rb:1 is

require 'ffi/libc'

The ffi version is like this.

$ gem list ffi

*** LOCAL GEMS ***

ffi (1.12.1)
ffi-libc (0.1.0)

Then I got the error by require 'ffi/libc' too.

$ ruby -e "require 'ffi/libc'"
Traceback (most recent call last):
	2: from -e:1:in `<main>'
	1: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- ffi/libc (LoadError)
	10: from -e:1:in `<main>'
	 9: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:147:in `require'
	 8: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `rescue in require'
	 7: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `require'
	 6: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc.rb:13:in `<top (required)>'
	 5: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
	 4: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require'
	 3: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:9:in `<top (required)>'
	 2: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:10:in `<module:FFI>'
	 1: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:19:in `<module:LibC>'
/usr/share/gems/gems/ffi-1.12.1/lib/ffi/library.rb:342:in `attach_variable': Function 'sys_errlist' not found in [#<FFI::DynamicLibrary:0x0000556ea6f649c8>] (FFI::NotFoundError)
> 9: from /builddir/.gem/ruby/gems/timeout-interrupt-0.3.0/lib/timeout_interrupt.rb:1:in `<top (required)>' The `lib/timeout_interrupt.rb:1` is ``` require 'ffi/libc' ``` The ffi version is like this. ``` $ gem list ffi *** LOCAL GEMS *** ffi (1.12.1) ffi-libc (0.1.0) ``` Then I got the error by `require 'ffi/libc'` too. ``` $ ruby -e "require 'ffi/libc'" Traceback (most recent call last): 2: from -e:1:in `<main>' 1: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- ffi/libc (LoadError) 10: from -e:1:in `<main>' 9: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:147:in `require' 8: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `rescue in require' 7: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:159:in `require' 6: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc.rb:13:in `<top (required)>' 5: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' 4: from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require' 3: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:9:in `<top (required)>' 2: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:10:in `<module:FFI>' 1: from /builddir/.gem/ruby/gems/ffi-libc-0.1.0/lib/ffi/libc/libc.rb:19:in `<module:LibC>' /usr/share/gems/gems/ffi-1.12.1/lib/ffi/library.rb:342:in `attach_variable': Function 'sys_errlist' not found in [#<FFI::DynamicLibrary:0x0000556ea6f649c8>] (FFI::NotFoundError) ```
Poster
Owner

I am asking it to ffi-libc project here.
https://github.com/postmodern/ffi-libc/issues/6

I am asking it to ffi-libc project here. https://github.com/postmodern/ffi-libc/issues/6
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: deac/ruby-timeout-interrupt#1
There is no content yet.