Repository navigation
fix!: bump bindgen to 0.73.2 for libclang 22 - #259
Merged
Merged
Conversation
bindgen 0.71 generates wrong struct layouts against libclang 22, so phper-sys fails its own layout assertions and does not build. Clang 22 changed which declaration a struct type refers to, and bindgen took types typedef'd before their definition for forward declarations (rust-lang/rust-bindgen#3278). Ubuntu 26.04 ships libclang 22, as reported in phper-framework#255. 0.72.1 fixes that, but 0.72 broke the layout of over- and under-aligned types, fixed in 0.73.2. So take 0.73.2. The generated bindings change in ways that break code naming the affected items. A few __bindgen_ty_N types are renumbered, va_list changes type, some padding fields are removed, and opaque structs such as zend_mm_heap lose Copy and Clone. zval, zend_string, zend_execute_data and the observer API are unchanged. bindgen 0.73 emits #[allow(unnecessary_transmutes)], a lint rustc only knows from 1.88. Allow unknown lints in phper-sys so it still builds on 1.85 under -D warnings. The quick start's install hint named llvm-10, which current distros no longer package. Use the unversioned packages instead. Co-Authored-By: Claude Code
brettmc
marked this pull request as ready for review
October 23, 2026 08:06
jmjoy
approved these changes
Oct 23, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #255
bindgen 0.71 generates wrong struct layouts against libclang 22, so phper-sys fails its own layout assertions and does not build. Clang 22 changed which declaration a struct type refers to, and bindgen took types typedef'd before their definition for forward declarations (rust-lang/rust-bindgen#3278). Ubuntu 26.04 ships libclang 22, as reported in #255.
0.72.1 fixes that, but 0.72 broke the layout of over- and under-aligned types, fixed in 0.73.2. So take 0.73.2.
The generated bindings change in ways that break code naming the affected items. A few __bindgen_ty_N types are renumbered, va_list changes type, some padding fields are removed, and opaque structs such as zend_mm_heap lose Copy and Clone. zval, zend_string, zend_execute_data and the observer API are unchanged.
bindgen 0.73 emits #[allow(unnecessary_transmutes)], a lint rustc only knows from 1.88. Allow unknown lints in phper-sys so it still builds on 1.85 under -D warnings.
The quick start's install hint named llvm-10, which current distros no longer package. Use the unversioned packages instead.
Co-Authored-By: Claude Code