[PR #11908] fix arm linux build when HWCAP2_SVE2 undefined #13652

Closed
opened 2026-04-13 00:32:02 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/11908

State: closed
Merged: Yes


It looks like our almalinux-8 base doesn't have this macro defined in the headers we're including.

This includes sys/auxv.h, which includes bits/hwcap.h. On our base image, that header states:

/* The following must match the kernel's <asm/hwcap.h>.  */
#define HWCAP_FP                (1 << 0)
#define HWCAP_ASIMD             (1 << 1)
...

and does NOT include HWCAP2_SVE2, however, looking at asm/hwcap.h the macro is defined as

#define HWCAP2_SVE2             (1 << 1)

Confirmed with this patch our docker build works

**Original Pull Request:** https://github.com/ollama/ollama/pull/11908 **State:** closed **Merged:** Yes --- It looks like our almalinux-8 base doesn't have this macro defined in the headers we're including. This includes `sys/auxv.h`, which includes `bits/hwcap.h`. On our base image, that header states: ``` /* The following must match the kernel's <asm/hwcap.h>. */ #define HWCAP_FP (1 << 0) #define HWCAP_ASIMD (1 << 1) ... ``` and does NOT include HWCAP2_SVE2, however, looking at `asm/hwcap.h` the macro is defined as ``` #define HWCAP2_SVE2 (1 << 1) ``` Confirmed with this patch our docker build works
GiteaMirror added the pull-request label 2026-04-13 00:32:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13652