Skip to content

Use the same libffi version for musl builds - #1227

Merged
jjhelmus merged 3 commits into
mainfrom
jjh/upgrade_libffi_for_musl
Aug 20, 2026
Merged

Use the same libffi version for musl builds#1227
jjhelmus merged 3 commits into
mainfrom
jjh/upgrade_libffi_for_musl

Conversation

@jjhelmus

Copy link
Copy Markdown
Contributor

Use the same libffi version for musl builds by patching libffi so that PATH_MAX is provided by the libc limits.h rather than the Linux kernel linux/limits.h.

Remove the unused libffi-3.3 package.
closes #814

@jjhelmus jjhelmus added platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform libc:musl labels Aug 20, 2026
Base automatically changed from jjh/upgrade_libffi to main August 20, 2026 16:58
libffi's static trampoline code includes Linux headers for PATH_MAX.
Use the standard limits.h header instead so libffi can build with musl
without Linux headers
@jjhelmus
jjhelmus force-pushed the jjh/upgrade_libffi_for_musl branch from 55ca3f4 to 18c848d Compare August 20, 2026 16:58
@jjhelmus
jjhelmus requested a review from EliteTK August 20, 2026 17:01

@EliteTK EliteTK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting code! Yay!

But also, I am curious, why don't we just include the linux headers for musl builds?

@jjhelmus

Copy link
Copy Markdown
Contributor Author

But also, I am curious, why don't we just include the linux headers for musl builds?

The headers from the base Debian image are available and used for glibc builds but the musl-clang wrapper excludes them. musl-clang or compiler flags could be adjusted to include the system kernel headers or the headers in this project's linux-uapi package but seems more involved than the patch. Additionally, the musl project recommends against using non-patched kernel

@jjhelmus
jjhelmus merged commit 976bd2d into main Aug 20, 2026
29 checks passed
@jjhelmus
jjhelmus deleted the jjh/upgrade_libffi_for_musl branch August 20, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc:musl platform:darwin Specific to the macOS platform platform:linux Specific to the Linux platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade libffi for musl builds

2 participants