fix: bump pqclean submodule to fix aarch64-musl build (#98)#100
Merged
thomwiggers merged 1 commit intoJun 4, 2026
Merged
Conversation
aarch64-unknown-linux-musl fails in pqclean/common/compat.h:20 on
`#if !__GNUC_PREREQ(7, 1)` because musl's <features.h> does not define
glibc's __GNUC_PREREQ macro.
This is already fixed upstream: PQClean 36708db ("Embed __GNUC_PREREQ
macro as some toolchains lack features.h") replaces it with an explicit,
musl-safe __GNUC_MINOR__ comparison. The submodule was pinned at d746637,
exactly one commit before that fix. The d746637..36708db delta is
compat.h-only (no implementation/API/crypto changes).
Fixes rustpq#98.
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.
Problem
Building for
aarch64-unknown-linux-muslfails inpqclean/common/compat.h:__GNUC_PREREQis a glibc macro (from<features.h>); musl libc does not define it, so under musl the#if !__GNUC_PREREQ(7, 1)is a preprocessor syntax error. (Reported in #98.)Root cause
This is already fixed upstream in PQClean: commit
36708db— "Embed__GNUC_PREREQmacro as some toolchains lack features.h" — replaces the__GNUC_PREREQuse with an explicit, musl-safe__GNUC_MINOR__comparison.The
pqcleansubmodule here is pinned atd746637, which is exactly one commit before that fix.Change
Bump the
pqcleansubmoduled746637→36708db. The delta between those two commits touches onlycommon/compat.h— no implementation, API, header-API, or crypto changes — so this pulls in PQClean's own portability fix and nothing else.Verification
compat.huses the musl-safe form:#if defined __GNUC_MINOR__ && ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((7) << 16) + (1)).#98preprocessor error with the old macro form and confirmed the new form compiles cleanly, and is a no-op under glibc (where the macro is already defined).git diffis a singleSubproject commitline change.Fixes #98.