From d8b77c97c34ef541c3e8aa3462561f4b99c4c03f Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 9 May 2026 22:20:44 -0400 Subject: [PATCH] fix: use CXX=hipcc legacy mode for HIP CMake build CMake 3.31 refuses CMAKE_HIP_COMPILER=hipcc with 'not supported'. Using CXX=hipcc triggers the legacy HIP detection path which works. --- ai/ollama/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ai/ollama/Dockerfile b/ai/ollama/Dockerfile index 170ecc6..2c6db27 100644 --- a/ai/ollama/Dockerfile +++ b/ai/ollama/Dockerfile @@ -42,14 +42,13 @@ ENV PATH=/opt/rocm/bin:/opt/rocm/hip/bin:/opt/rocm/hcc/bin:/usr/local/sbin:/usr/ ENV CMAKE_GENERATOR=Ninja ENV LDFLAGS=-s -# Build with ROCm 6 preset + gfx906 target +# Build with ROCm 6 preset + gfx906 target (CXX=hipcc for legacy HIP mode) RUN mkdir -p build && cd build && \ - cmake .. \ + CC=hipcc CXX=hipcc cmake .. \ --preset 'ROCm 6' \ -DAMDGPU_TARGETS="gfx906:xnack-;gfx940;gfx1010;gfx1030;gfx1100;gfx1200" \ - -DCMAKE_HIP_COMPILER=/opt/rocm/bin/hipcc \ -DCMAKE_BUILD_TYPE=Release && \ - cmake --build . -- -l $(nproc) && \ + CC=hipcc CXX=hipcc cmake --build . -- -l $(nproc) && \ cmake --install . --component HIP --strip --prefix /build/dist # Build the Go binary