Skip to contentSkip to conversation

Add musl build-test for GitHub Action Bot

GIT PULL Ammar Faizi 2 participants 2 messages Jul 14, 2025 io_uring

lore
Share & tools
lore
#0 lore raw

Hi Jens,

Please pull this musl build-test for GitHub action.

Several build issues have been reported by musl libc users when compiling liburing. These are not isolated incidents, common problems include:

1) Missing system headers like <error.h>:

```
    timestamp.c:2:10: fatal error: error.h: No such file or directory
        2 | #include <error.h>
          |          ^~~~~~~~~
    compilation terminated.
```

2) Undefined types like cpu_set_t and loff_t, which are available under glibc but missing without proper feature macros on musl:

```
    error: unknown type name 'cpu_set_t'
    error: unknown type name 'loff_t'; did you mean 'off_t'
```

These issues are musl-specific and have already led to numerous commits fixing them, for example:

e83246aca576 ("t/timestamp: Remove #include <error.h> and move #include <time.h> to the top") afffc0964a90 ("examples/zcrx: remove error.h")
40cd129ec72c ("ooo-file-unreg.c: Include poll.h instead of sys/poll.h") ff0bc26d3220 ("test: Drop including error.h header")
9485c21f8f36 ("liburing.pc.in: add -D_GNU_SOuRCE to Cflags")
0fbcc44fe1fb ("examples,test: Remove unused linux/errqueue.h")
0a9e2268e2a8 ("examples: Use t_error instead of glibc's error.")
3b0b4976d7da ("test: Use t_error instead of glibc's error.")
11dc64a71558 ("Add custom error function for tests.")
45969ce39dc7 ("configure: fix compile-checks for statx")
c34070e08199 ("liburing.h: define GNU_SOURCE for cpu_set_t")
43b7ec8d1788 ("build: add -D_GNU_SOURCE to all CPPFLAGS/CFLAGS.")
1cf969dfcba7 ("examples: disable ucontext-cp if ucontext.h is not available") bbf591c6c2d7 ("fix missing '#include <sys/stat.h>' in 'src/include/liburing.h") 8171778c835b ("fix build on musl libc")

Despite these fixes, the CI pipeline currently only tests against glibc-based environments. To catch musl regressions early and ensure broader compatibility, add Alpine Linux (musl libc) build-test to the CI.

The following changes since commit 9a0461dc82e894aca53246e589b7d6cb880de103:

test/send_recv: properly return T_EXIT_SKIP (2025-07-11 15:30:27 -0600)

are available in the Git repository at:

https://github.com/ammarfaizi2/liburing.git tags/gh-bot-musl-build-2025-07-14

for you to fetch changes up to 427dde341dc8c90b6288107325c7fd92353bb0ba:

github: ci: Add alpine musl build (2025-07-14 11:08:21 +0700)

----------------------------------------------------------------
Pull musl build-test for GitHub Action Bot from Ammar Faizi:

- Fix test/timestamp.c build error on musl libc env.

- Add musl build-test for GitHub Action Bot.

----------------------------------------------------------------
Ammar Faizi (2):
t/timestamp: Remove #include <error.h> and move #include <time.h> to the top
github: ci: Add alpine musl build

 .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++
 test/timestamp.c         | 18 ++++++++---------
 2 files changed, 51 insertions(+), 10 deletions(-)
Signature · 1 line
Ammar Faizi
maintainer
#1 lore raw
Quoted 7 lines · Ammar Faizi

Hi Jens,

Please pull this musl build-test for GitHub action.

Several build issues have been reported by musl libc users when compiling liburing. These are not isolated incidents, common problems include:

[snip]

Thanks, this is great! Because it is one of those things that keeps biting us in the butt. Pulled.

Signature · 1 line
Jens Axboe