I got the following error "Function 'sys_errlist' not found" on my Linux distribution Fedora 34 environment.
Do you have any idea to fix it?
Thank you.
$ 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
$ gem list ffi
*** LOCAL GEMS ***
ffi (1.12.1)
ffi-libc (0.1.0)
$ 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)