Skip to content

Conversation

@Watson1978
Copy link
Contributor

@Watson1978 Watson1978 requested a review from daipom November 5, 2025 02:53
@Watson1978
Copy link
Contributor Author

$ dnf install cpio binutils findutils

$ rpm2cpio ~/fluent-package-6.0.0-1.amzn2023.x86_64.rpm | cpio -idmv

$ find . -type f -exec file {} + | grep ELF | cut -d: -f1 | while read f; do
  if readelf -V "$f" 2>/dev/null | grep -q 'GLIBC_2\.35'; then
    echo "needs GLIBC_2.35: $f"
  fi
done
needs GLIBC_2.35: ./opt/fluent/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/io-event-1.10.2/IO_Event.so
needs GLIBC_2.35: ./opt/fluent/lib/ruby/gems/3.4.0/gems/io-event-1.10.2/lib/IO_Event.so

Hmmm, io-event gem requires GLIBC_2.35. wierd

@Watson1978
Copy link
Contributor Author

Watson1978 commented Nov 5, 2025

どうやら Docker コンテナ内で io-event をビルドすると GLIBC_2.35 に依存してしまう。

$ objdump -T /usr/local/lib/ruby/gems/3.4.0/gems/io-event-1.10.2/lib/IO_Event.so | grep GLIBC_2.35
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.35) epoll_pwait2

io-event では epoll_pwait2 が存在しているか have_func("epoll_pwait2") でチェックしてビルドしている。
https://github.com/socketry/io-event/blob/44666dc92ac3e093ca6ce3ab47052b808a58a325/ext/extconf.rb#L57C1-L57C26

AmazonLinux 2023 は glibc 2.34 がインストールされるので have_func("epoll_pwait2") のチェックでは存在しないことになるのでビルドされず、 GLIBC_2.35 への依存は発生しないはずである。

bash-5.2# cat /etc/os-release 
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.8.20250915"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2029-06-30"

glibc のバージョン

bash-5.2# ldd --version
ldd (GNU libc) 2.34
Copyright (C) 2021 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.

glibc は 2.34 がインストールされているが、GLIBC_2.35 のシンボルがいくつか見つかる。。。

# objdump -T /usr/lib64/libc.so.6 | grep -n 'epoll_pwait2\|GLIBC_2\.35'
17:0000000000000000      DO *UND*       0000000000000000 (GLIBC_2.35) __rseq_size
223:000000000010f8e0 g    DF .text      00000000000000cb  GLIBC_2.35  epoll_pwait2
326:000000000009e710 g   iD  .text      0000000000000091  GLIBC_2.35  __memcmpeq
1661:0000000000000000 g    DO *ABS*     0000000000000000  GLIBC_2.35  GLIBC_2.35
2029:00000000001585d0 g    DF .text     0000000000000009  GLIBC_2.35  _dl_find_object
2503:00000000000fd6e0  w   DF .text     000000000000006a  GLIBC_2.35  posix_spawn_file_actions_addtcsetpgrp_np

incus で動かしているコンテナで試すと、上記のシンボルは出てこない。Dockerコンテナのほうには、いくつか GLIBC_2.35 からバックポートされているため、
Docker コンテナでビルドすると存在していた epoll_pwait2 が、それ以外の環境で動かそうとするとシンボルが見つからない・・・。

incus の glibc

# rpm -qi glibc
Name        : glibc
Version     : 2.34
Release     : 52.amzn2023.0.7
Architecture: x86_64
Install Date: Tue Nov 14 20:37:30 2023
Group       : Unspecified
Size        : 6221139
License     : LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptions and BSD and Inner-Net and ISC and Public Domain and GFDL
Signature   : RSA/SHA512, Thu Oct 26 00:20:41 2023, Key ID e951904ad832c631
Source RPM  : glibc-2.34-52.amzn2023.0.7.src.rpm
Build Date  : Mon Oct 23 22:52:16 2023
Build Host  : ip-10-0-36-29.us-west-2.compute.internal
Packager    : Amazon Linux
Vendor      : Amazon Linux
URL         : http://www.gnu.org/software/glibc/
Summary     : The GNU libc libraries
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.

docker の glibc

# rpm -qi glibc
Name        : glibc
Version     : 2.34
Release     : 231.amzn2023.0.1
Architecture: x86_64
Install Date: Wed Sep 10 06:43:39 2025
Group       : Unspecified
Size        : 6481171
License     : LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptions and BSD and Inner-Net and ISC and Public Domain and GFDL
Signature   : RSA/SHA512, Wed Sep  3 19:03:40 2025, Key ID e951904ad832c631
Source RPM  : glibc-2.34-231.amzn2023.0.1.src.rpm
Build Date  : Wed Sep  3 18:30:49 2025
Build Host  : koji.amazonlinux
Packager    : Amazon Linux
Vendor      : Amazon Linux
URL         : http://www.gnu.org/software/glibc/
Summary     : The GNU libc libraries
Description :
The glibc package contains standard libraries which are used by
multiple programs on the system. In order to save disk space and
memory, as well as to make upgrading easier, common system code is
kept in one place and shared between programs. This particular package
contains the most important sets of shared libraries: the standard C
library and the standard math library. Without these two libraries, a
Linux system will not function.

incus のは 52.amzn2023.0.7 だが、 docker では 231.amzn2023.0.1 とだいぶバージョンが上がってそう。

@Watson1978
Copy link
Contributor Author

glibc のバージョンを incus と同じバージョンにダウングレードすると、 io-event の GLIBC_2.35 epoll_pwait2 は解消した。

# dnf -y downgrade glibc-2.34-52.amzn2023.0.7 glibc-devel-2.34-52.amzn2023.0.7 glibc-headers-x86-2.34-52.amzn2023.0.7

# gem uninstall io-event
Successfully uninstalled io-event-1.10.2
# gem install io-event --version 1.10.2
Fetching io-event-1.10.2.gem
Building native extensions. This could take a while...
Successfully installed io-event-1.10.2
1 gem installed
# objdump -T /usr/local/lib/ruby/gems/3.4.0/gems/io-event-1.10.2/lib/IO_Event.so | grep GLIBC     
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) memset
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) close
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.17) clock_gettime
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) read
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) malloc
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.7)  eventfd
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) free
0000000000000000  w   DF *UND*  0000000000000000 (GLIBC_2.2.5) __cxa_finalize
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) syscall
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.9)  epoll_create1
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) strerror
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.3.2) epoll_ctl
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.3.2) epoll_wait
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) calloc
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) realloc
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) write
0000000000000000      DF *UND*  0000000000000000 (GLIBC_2.2.5) fcntl

kenhys pushed a commit that referenced this pull request Nov 5, 2025
)

Related to
#931 (comment)

This patch will fix following install error on AmazonLinux 2023.
```
   Error: 
   Problem: conflicting requests
    - nothing provides libc.so.6(GLIBC_2.35)(64bit) needed by fluent-package-6.0.0-1.amzn2023.x86_64
  (try to add '--skip-broken' to skip uninstallable packages)
```

## Summary
This pull request downgrades the glibc version used in the Amazon Linux
2023 build environment
from **2.34-231.amzn2023.0.1** to **2.34-52.amzn2023.0.7**.

(I just selected same glibc version used in incus container)

## Background
When building `fluent-package` for Amazon Linux 2023, the bundled Ruby
gem
[`io-event`](https://rubygems.org/gems/io-event) was compiled against a
newer
glibc that provides the `epoll_pwait2()` symbol (introduced in
**GLIBC_2.35**).

As a result, the generated package
`fluent-package-6.0.0-1.amzn2023.x86_64.rpm` required  
`libc.so.6(GLIBC_2.35)`, leading to installation failure on systems  
still running glibc 2.34.

Signed-off-by: Shizuo Fujita <[email protected]>
Watson1978 added a commit that referenced this pull request Nov 5, 2025
)

Related to
#931 (comment)

This patch will fix following install error on AmazonLinux 2023.
```
   Error:
   Problem: conflicting requests
    - nothing provides libc.so.6(GLIBC_2.35)(64bit) needed by fluent-package-6.0.0-1.amzn2023.x86_64
  (try to add '--skip-broken' to skip uninstallable packages)
```

## Summary
This pull request downgrades the glibc version used in the Amazon Linux
2023 build environment
from **2.34-231.amzn2023.0.1** to **2.34-52.amzn2023.0.7**.

(I just selected same glibc version used in incus container)

## Background
When building `fluent-package` for Amazon Linux 2023, the bundled Ruby
gem
[`io-event`](https://rubygems.org/gems/io-event) was compiled against a
newer
glibc that provides the `epoll_pwait2()` symbol (introduced in
**GLIBC_2.35**).

As a result, the generated package
`fluent-package-6.0.0-1.amzn2023.x86_64.rpm` required
`libc.so.6(GLIBC_2.35)`, leading to installation failure on systems
still running glibc 2.34.

Signed-off-by: Shizuo Fujita <[email protected]>
Watson1978 added a commit that referenced this pull request Nov 5, 2025
)

Related to
#931 (comment)

This patch will fix following install error on AmazonLinux 2023.
```
   Error:
   Problem: conflicting requests
    - nothing provides libc.so.6(GLIBC_2.35)(64bit) needed by fluent-package-6.0.0-1.amzn2023.x86_64
  (try to add '--skip-broken' to skip uninstallable packages)
```

## Summary
This pull request downgrades the glibc version used in the Amazon Linux
2023 build environment
from **2.34-231.amzn2023.0.1** to **2.34-52.amzn2023.0.7**.

(I just selected same glibc version used in incus container)

## Background
When building `fluent-package` for Amazon Linux 2023, the bundled Ruby
gem
[`io-event`](https://rubygems.org/gems/io-event) was compiled against a
newer
glibc that provides the `epoll_pwait2()` symbol (introduced in
**GLIBC_2.35**).

As a result, the generated package
`fluent-package-6.0.0-1.amzn2023.x86_64.rpm` required
`libc.so.6(GLIBC_2.35)`, leading to installation failure on systems
still running glibc 2.34.

Signed-off-by: Shizuo Fujita <[email protected]>
@Watson1978 Watson1978 added this to the v6.0.1 milestone Nov 6, 2025
kenhys pushed a commit that referenced this pull request Nov 6, 2025
…nLinux 2023 (#932) (#933)

Backport #932

Related to

#931 (comment)

This patch will fix following install error on AmazonLinux 2023.
```
   Error:
   Problem: conflicting requests
    - nothing provides libc.so.6(GLIBC_2.35)(64bit) needed by fluent-package-6.0.0-1.amzn2023.x86_64
  (try to add '--skip-broken' to skip uninstallable packages)
```

## Summary
This pull request downgrades the glibc version used in the Amazon Linux
2023 build environment
from **2.34-231.amzn2023.0.1** to **2.34-52.amzn2023.0.7**.

(I just selected same glibc version used in incus container)

## Background
When building `fluent-package` for Amazon Linux 2023, the bundled Ruby
gem
[`io-event`](https://rubygems.org/gems/io-event) was compiled against a
newer
glibc that provides the `epoll_pwait2()` symbol (introduced in
**GLIBC_2.35**).

As a result, the generated package
`fluent-package-6.0.0-1.amzn2023.x86_64.rpm` required
`libc.so.6(GLIBC_2.35)`, leading to installation failure on systems
still running glibc 2.34.

Signed-off-by: Shizuo Fujita <[email protected]>
kenhys pushed a commit that referenced this pull request Nov 6, 2025
…nLinux 2023 (#932) (#934)

Backport #932

Related to

#931 (comment)

This patch will fix following install error on AmazonLinux 2023.
```
   Error:
   Problem: conflicting requests
    - nothing provides libc.so.6(GLIBC_2.35)(64bit) needed by fluent-package-6.0.0-1.amzn2023.x86_64
  (try to add '--skip-broken' to skip uninstallable packages)
```

## Summary
This pull request downgrades the glibc version used in the Amazon Linux
2023 build environment
from **2.34-231.amzn2023.0.1** to **2.34-52.amzn2023.0.7**.

(I just selected same glibc version used in incus container)

## Background
When building `fluent-package` for Amazon Linux 2023, the bundled Ruby
gem
[`io-event`](https://rubygems.org/gems/io-event) was compiled against a
newer
glibc that provides the `epoll_pwait2()` symbol (introduced in
**GLIBC_2.35**).

As a result, the generated package
`fluent-package-6.0.0-1.amzn2023.x86_64.rpm` required
`libc.so.6(GLIBC_2.35)`, leading to installation failure on systems
still running glibc 2.34.

Signed-off-by: Shizuo Fujita <[email protected]>
* Fixes #926

---------

Signed-off-by: Daijiro Fukuda <[email protected]>
Signed-off-by: Shizuo Fujita <[email protected]>
@Watson1978 Watson1978 force-pushed the backport-to-v6/pr927 branch from f4ec8e4 to 752ba4f Compare November 6, 2025 03:18
@daipom daipom merged commit e75be93 into fluent-package-v6 Nov 6, 2025
300 of 301 checks passed
@daipom daipom deleted the backport-to-v6/pr927 branch November 6, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants