Skip to content

Fix Linux CPU build: add spirv-headers dependency#872

Merged
ericcurtin merged 1 commit into
mainfrom
fix/add-spirv-headers-dependency
Apr 20, 2026
Merged

Fix Linux CPU build: add spirv-headers dependency#872
ericcurtin merged 1 commit into
mainfrom
fix/add-spirv-headers-dependency

Conversation

@ilopezluna
Copy link
Copy Markdown
Contributor

The build_native_linux_cpu job is failing with:

fatal error: spirv/unified1/spirv.hpp: No such file or directory

This is caused by llama.cpp PR #21572 which added a dependency on spirv-headers for the Vulkan backend. The llama.cpp CI was already updated in PR #22109 to install this package.

This PR adds spirv-headers to install-vulkan.sh to fix the build.

Fixes: https://github.com/docker/inference-engine-llama.cpp/actions/runs/24664691885/job/72119213249


llama.cpp commit 1f30ac0 (PR #21572) added #include <spirv/unified1/spirv.hpp>
to ggml-vulkan.cpp, which requires the spirv-headers package to be installed.
This fixes the build_native_linux_cpu CI job failure.
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Vulkan installation script to include the spirv-headers package. The review feedback recommends improving the reliability and efficiency of the installation process by adding a package index update and cleaning up the apt cache, which ensures consistent builds and reduces the final image size.

set -eux -o pipefail

apt-get install -y glslc libvulkan-dev
apt-get install -y glslc libvulkan-dev spirv-headers
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Running apt-get install without a preceding apt-get update in the same execution block can lead to build failures in Docker environments if the package index is stale. Additionally, cleaning up /var/lib/apt/lists/* is best practice to maintain consistency with other scripts in the repository (such as scripts/apt-install.sh) and to minimize the footprint of the build layer.

Suggested change
apt-get install -y glslc libvulkan-dev spirv-headers
apt-get update
apt-get install -y glslc libvulkan-dev spirv-headers
rm -rf /var/lib/apt/lists/*
References
  1. The repository style guide prioritizes correctness and maintainability. Ensuring a reliable build process by updating package indexes and cleaning up is essential for these goals. (link)

@ericcurtin ericcurtin merged commit 7f406dc into main Apr 20, 2026
9 checks passed
@ericcurtin ericcurtin deleted the fix/add-spirv-headers-dependency branch April 20, 2026 12:09
@ilopezluna ilopezluna requested a review from a team April 20, 2026 13:17
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.

3 participants