bindings: Create 32b compatible bindings #107
Merged
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.
It turns out the bindgen assumes 64b architecture by default when converting constants, which causes warnings like
but more important, most of the tests keep failing as the comparisons around this value wont work.
Rather than inventing a way to convert the constant to c-type ulong, I thought setting specific value known as to be the MAX would be more obvious.
Builds run in rawhide now:
https://copr.fedorainfracloud.org/coprs/jjelen/kryoptic/build/8186035/
Unfortunately, this did not fix it and we are still getting error during intialization with:
(
CKR_ATTRIBUTE_VALUE_INVALID
), which sounds like some attributes pulled from DB have different bit size than expected by the 32b build. Not sure if there is something in #106, which might fix it -- I will try after it will get merged.The Fedora 41 builds seems to be failing for unrelated reasons. Sounds like the bindings were not generated correctly and the types with blocklisted prefixes are not generated as they should on the Fedora 41 version of bindgen? -- still investigating.