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

Closed
opened 2026-04-19 17:26:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11908
Author: @dhiltgen
Created: 8/14/2025
Status: Merged
Merged: 8/14/2025
Merged by: @dhiltgen

Base: mainHead: fix_linux


📝 Commits (1)

  • 0e296c0 fix arm linux build when HWCAP2_SVE2 undefined

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 ml/backend/ggml/ggml/src/ggml-cpu/arch/arm/arm.go (+1 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11908 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 8/14/2025 **Status:** ✅ Merged **Merged:** 8/14/2025 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `fix_linux` --- ### 📝 Commits (1) - [`0e296c0`](https://github.com/ollama/ollama/commit/0e296c053f150158248200a2061f2b6bd4bf851d) fix arm linux build when HWCAP2_SVE2 undefined ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `ml/backend/ggml/ggml/src/ggml-cpu/arch/arm/arm.go` (+1 -1) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 17:26:19 -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#24192