Skip to content

tpm2: fix build on x32#561

Merged
stefanberger merged 1 commit intostefanberger:masterfrom
bluca:x32
Mar 5, 2026
Merged

tpm2: fix build on x32#561
stefanberger merged 1 commit intostefanberger:masterfrom
bluca:x32

Conversation

@bluca
Copy link
Copy Markdown
Contributor

@bluca bluca commented Mar 5, 2026

openssl defines SIXTY_FOUR_BIT for this architecture

./tpm2/crypto/openssl/tpm_radix.h:74:4: error: #error Need to determine RADIX_BITS value
   74 | #  error Need to determine RADIX_BITS value

openssl defines SIXTY_FOUR_BIT for this architecture

./tpm2/crypto/openssl/tpm_radix.h:74:4: error: #error Need to determine RADIX_BITS value
   74 | #  error Need to determine RADIX_BITS value

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
@stefanberger
Copy link
Copy Markdown
Owner

Thanks. I don't have access to a machine with x32, so I trust that you tested it on such a machine.

@stefanberger stefanberger merged commit 801d8fb into stefanberger:master Mar 5, 2026
4 checks passed
@bluca bluca deleted the x32 branch March 5, 2026 13:40
@bluca
Copy link
Copy Markdown
Contributor Author

bluca commented Mar 5, 2026

Thanks. I don't have access to a machine with x32, so I trust that you tested it on such a machine.

Yes it builds and unit tests pass with this change:

https://buildd.debian.org/status/logs.php?pkg=libtpms&arch=x32

@stefanberger
Copy link
Copy Markdown
Owner

Thanks. It looks like sparc64 and m68k have related problems. I probably can get rid of the sizeof() checks on OBJECT now, which may resolve the issue for sparc64 -- I will make it a TODO item.

@stefanberger
Copy link
Copy Markdown
Owner

This commit here should resolve the issue: 2672049

@stefanberger
Copy link
Copy Markdown
Owner

For m68k there's unfortunately more to it due to some checks in BackwardsCompatibilityObject.c that I had worked on in the past -- there are patches that I don't want to apply: https://github.com/stefanberger/libtpms/tree/stefanberger/force_m68k_alignment

Maybe sparc64 has the same issues. But I don't know or can read anything about it. On m68k the issue is explained here: https://wiki.debian.org/M68k/Alignment

@stefanberger
Copy link
Copy Markdown
Owner

stefanberger commented Mar 6, 2026

I did merge the m68k support now as well... hopefully v0.11 will then build on it as well. It builds for me now.

FYI, @glaubitz

@bluca
Copy link
Copy Markdown
Contributor Author

bluca commented Mar 6, 2026

That's great news, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants