socketry / nio4r

Cross-platform asynchronous I/O primitives for scalable network clients and servers.
Other
966 stars 86 forks source link

version `GLIBC_2.28' not found #280

Closed arnoldtonderaimarunda closed 5 months ago

arnoldtonderaimarunda commented 2 years ago

Trying to run a rack app using Puma server which depends on nio4r. However, I encounter a load error versionGLIBC_2.28' not found (required by /home/pi/.gem/gems/nio4r-2.5.8/lib/nio4r_ext.so)`

My OS is as follows;

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Below are the GLIBC versions that i have installed;

ldd --version
ldd (Debian GLIBC 2.31-13+rpt2+rpi1+deb11u2) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
strings /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBC_2.4
GLIBC_2.29
GLIBC_2.6
GLIBC_2.18
GLIBC_2.16
GLIBC_2.17
GLIBCXX_DEBUG_MESSAGE_LENGTH

How do I install GLIBC_2.28, or tell nio4r to utilise the available i.e GLIBC_2.29?

ioquatix commented 2 years ago

I'm not sure why it's asking for an old version. Can you try recompiling the gem?

arnoldtonderaimarunda commented 2 years ago

Could you give me direction as to how I recompile as you have suggested. This is what I have tried; Installed Gem Compiler from https://github.com/luislavena/gem-compiler and then compiled to get the following:

Successfully built RubyGem
  Name: nio4r
  Version: 2.5.8
  File: nio4r-2.5.8-armv7l-linux-eabihf.gem

I tried to install local gem compiled using gem install --local nio4r-2.5.8-armv7l-linux-eabihf.gem

and get the following error

ERROR:  Error installing nio4r-2.5.8-armv7l-linux-eabihf.gem:
    There are no versions of nio4r (= 2.5.8) compatible with your Ruby & RubyGems
    nio4r requires Ruby version ~> 2.7.0. The current ruby version is 2.7.0.dev.
arnoldtonderaimarunda commented 2 years ago

Don't know how to get v2.7.0 instead of 2.7.0.dev Install using Snap's latest/stable channel. The only other channel available is 2.6/stable which would not be ideal since nio4r wants 2.7.0

dentarg commented 2 years ago

@arnoldtonderaimarunda When did you install Ruby? There might be a newer version available now, https://snapcraft.io/install/ruby/raspbian says "Last updated 31 December 2021" (but I don't know, I'm not Raspbian user)

Otherwise you could try to search or ask for help over at https://forums.raspberrypi.com/

arnoldtonderaimarunda commented 2 years ago

@dentarg Reinstalled today, and still issue arises when I try to install compiled Nio4r gem. Look like all versions installed by Snap have 'dev' suffix. May have to try install using rbenv.

However, the core issue is the nio4r gem seems hardcoded to look for a specific GLIBC version, which happens to be old.

tarcieri commented 2 years ago

@arnoldtonderaimarunda there's nothing specific to glibc in nio4r.

This error relates to the version of glibc that nio4r is compiled against.

If you compile a new version, it should link against the current version of glibc. If the error persists, you may still have the old one installed.

arnoldtonderaimarunda commented 2 years ago

OK understoond. Will focus on getting the required version of Ruby to be able to compile. Thanks