Remove generate-bindings feature from tss-esapi#1205
Conversation
fe5e266 to
9b8485d
Compare
|
Example of a CI job where Fedora 44 compilation fails without this patch: |
|
If it uses the bindings generated for the tpm2-tss version 3.x, will it work with the version 4.x? I mean, apparently the ABI was broken from 3.x to 4.x (otherwise the bindings would work just fine). I'm trying to remember when we introduced the use of |
You're right that it was introduced for flexibility. Removing it is a workaround, not a proper fix. The correct long-term solution is to upgrade to tss-esapi 8.x, which properly supports the 4.x opaque API by using accessor functions instead of direct field access. But tss-esapi 8.0.0 is still in alpha, and, obviously, not available in Fedora. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Fedora 44 compilation is fixed if this change is applied: |
The generate-bindings feature causes tss-esapi-sys to regenerate FFI bindings from the system's tpm2-tss C headers at build time. On systems with tpm2-tss 4.x (e.g. Fedora 44), many TPM2 structs (TPML_DIGEST, TPMT_TK_HASHCHECK, TPM2B_ECC_POINT, etc.) are now opaque, which makes the regenerated bindings incompatible with tss-esapi 7.6.0 code that directly accesses struct fields. Without this feature, tss-esapi-sys uses its pre-bundled bindings generated against tpm2-tss 3.x, which contain the correct non-opaque struct definitions expected by the Rust wrapper code. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
9b8485d to
058c826
Compare
ansasaki
left a comment
There was a problem hiding this comment.
LGTM! Since the tests are now passing on Fedora 44, let's merge this (and hope breaking changes are not introduced again)
The generate-bindings feature causes tss-esapi-sys to regenerate FFI bindings from the system's tpm2-tss C headers at build time. On systems with tpm2-tss 4.x (e.g. Fedora 44), many TPM2 structs (TPML_DIGEST, TPMT_TK_HASHCHECK, TPM2B_ECC_POINT, etc.) are now opaque, which makes the regenerated bindings incompatible with tss-esapi 7.6.0 code that directly accesses struct fields.
Without this feature, tss-esapi-sys uses its pre-bundled bindings generated against tpm2-tss 3.x, which contain the correct non-opaque struct definitions expected by the Rust wrapper code.