Skip to content

ext: allow epoll_pwait2 to be disabled via --disable-epoll_pwait2#159

Merged
ioquatix merged 1 commit intosocketry:mainfrom
stanhu:sh-disable-epoll-wait2
Mar 10, 2026
Merged

ext: allow epoll_pwait2 to be disabled via --disable-epoll_pwait2#159
ioquatix merged 1 commit intosocketry:mainfrom
stanhu:sh-disable-epoll-wait2

Conversation

@stanhu
Copy link
Copy Markdown
Contributor

@stanhu stanhu commented Mar 9, 2026

Some distributions (e.g. RedHat 9.7) ship glibc 2.34 with backported epoll_pwait2 support tagged as GLIBC_2.35, causing binaries built there to fail on systems with a true glibc 2.34 (RedHat 9.6). Wrapping the have_func check in enable_config allows the caller to opt out at build time.

If your system has a backported epoll_pwait2 that causes portability issues, you can disable it at build time:

gem install io-event -- --disable-epoll_pwait2

Or:

bundle config set build.io-event --disable-epoll_pwait2
bundle install

Types of Changes

  • New feature.

Contribution

maxlazio pushed a commit to gitlabhq/omnibus-gitlab that referenced this pull request Mar 9, 2026
Some distributions (e.g. RedHat 9.7) ship glibc 2.34 with backported
`epoll_pwait2` support tagged as `GLIBC_2.35`, causing binaries built
there to fail on systems with a true glibc 2.34 (RedHat 9.6).

This change:

- Adds a new ruby-io-event software definition that rebuilds the
  io-event gem without the epoll_pwait2 check on RedHat 9 systems.
- Adds the ruby-io-event dependency to the gitlab project for RedHat 9.
- Adds a el_9? helper method to OhaiHelper for platform detection

socketry/io-event#159 would avoid the need
for this patching.

Relates to
https://gitlab.com/gitlab-com/request-for-help/-/work_items/4332
@ioquatix
Copy link
Copy Markdown
Member

ioquatix commented Mar 9, 2026

How do we use this enable_config feature? Do you mind giving a brief example?

@stanhu stanhu force-pushed the sh-disable-epoll-wait2 branch from 4ec7a0b to 5313496 Compare March 9, 2026 21:38
@stanhu
Copy link
Copy Markdown
Contributor Author

stanhu commented Mar 9, 2026

How do we use this enable_config feature? Do you mind giving a brief example?

I updated the description to show how to use this.

@ioquatix
Copy link
Copy Markdown
Member

I understand the convention to use dashes, but I think it should be consistent with the name of the function, e.g. --disable-epoll_pwait2.

WDYT?

maxlazio pushed a commit to gitlabhq/omnibus-gitlab that referenced this pull request Mar 10, 2026
Some distributions (e.g. RedHat 9.7) ship glibc 2.34 with backported
`epoll_pwait2` support tagged as `GLIBC_2.35`, causing binaries built
there to fail on systems with a true glibc 2.34 (RedHat 9.6).

This change:

- Adds a new ruby-io-event software definition that rebuilds the
  io-event gem without the epoll_pwait2 check on RedHat 9 systems.
- Adds the ruby-io-event dependency to the gitlab project for RedHat 9.
- Adds a el_9? helper method to OhaiHelper for platform detection

socketry/io-event#159 would avoid the need
for this patching.

Relates to
https://gitlab.com/gitlab-com/request-for-help/-/work_items/4332
maxlazio pushed a commit to gitlabhq/omnibus-gitlab that referenced this pull request Mar 10, 2026
Some distributions (e.g. RedHat 9.7) ship glibc 2.34 with backported
`epoll_pwait2` support tagged as `GLIBC_2.35`, causing binaries built
there to fail on systems with a true glibc 2.34 (RedHat 9.6).

This change:

- Adds a new ruby-io-event software definition that rebuilds the
  io-event gem without the epoll_pwait2 check on RedHat 9 systems.
- Adds the ruby-io-event dependency to the gitlab project for RedHat 9.
- Adds a el_9? helper method to OhaiHelper for platform detection

socketry/io-event#159 would avoid the need
for this patching.

Relates to
https://gitlab.com/gitlab-com/request-for-help/-/work_items/4332
Some distributions (e.g. RedHat 9.7) ship glibc 2.34 with backported
epoll_pwait2 support tagged as GLIBC_2.35, causing binaries built there
to fail on systems with a true glibc 2.34 (RedHat 9.6). Wrapping the
have_func check in enable_config allows the caller to opt out at build
time.

If your system has a backported `epoll_pwait2` that causes portability
issues, you can disable it at build time:

```
gem install io-event -- --disable-epoll_pwait2
```

With `bundle`:

```
bundle config set build.io-event --disable-epoll_pwait2
bundle install
```
@stanhu stanhu force-pushed the sh-disable-epoll-wait2 branch from 5313496 to 3ecc3ee Compare March 10, 2026 03:50
maxlazio pushed a commit to gitlabhq/omnibus-gitlab that referenced this pull request Mar 10, 2026
Some distributions (e.g. RedHat 9.7) ship glibc 2.34 with backported
`epoll_pwait2` support tagged as `GLIBC_2.35`, causing binaries built
there to fail on systems with a true glibc 2.34 (RedHat 9.6).

This change:

- Adds a new ruby-io-event software definition that rebuilds the
  io-event gem without the epoll_pwait2 check on RedHat 9 systems.
- Adds the ruby-io-event dependency to the gitlab project for RedHat 9.
- Adds a el_9? helper method to OhaiHelper for platform detection

socketry/io-event#159 would avoid the need
for this patching.

Relates to
https://gitlab.com/gitlab-com/request-for-help/-/work_items/4332
@ioquatix ioquatix merged commit 4ae7435 into socketry:main Mar 10, 2026
26 of 29 checks passed
@ioquatix ioquatix added this to the v1.14.4 milestone Mar 10, 2026
@stanhu stanhu changed the title ext: allow epoll_pwait2 to be disabled via --disable-epoll-pwait2 ext: allow epoll_pwait2 to be disabled via --disable-epoll_pwait2 Mar 10, 2026
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.

2 participants