From 71c9d435095bbce4d92ac001a8095190d16d9227ff11594dcc381d5ea9707c15 Mon Sep 17 00:00:00 2001 From: Eyad Issa Date: Wed, 22 May 2024 17:56:10 +0000 Subject: [PATCH] Accepting request 1175901 from home:mslacken:ml added 15.6 build OBS-URL: https://build.opensuse.org/request/show/1175901 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/ollama?expand=0&rev=18 --- ollama.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ollama.spec b/ollama.spec index e8f2047..7be2577 100644 --- a/ollama.spec +++ b/ollama.spec @@ -28,7 +28,11 @@ Source2: ollama.service Source3: %{name}-user.conf Patch0: enable-lto.patch BuildRequires: cmake >= 3.24 +%if 0%{?sle_version} == 150600 +BuildRequires: gcc12-c++ +%else BuildRequires: gcc-c++ >= 11.4.0 +%endif BuildRequires: git BuildRequires: sysuser-tools BuildRequires: zstd @@ -55,6 +59,12 @@ can be imported. %ifnarch ppc64 export GOFLAGS="-buildmode=pie -mod=vendor" %endif +%if 0%{?sle_version} == 150600 +export CXX=g++-12 +export CC=gcc-12 +# pie doesn't work with gcc12 on leap +export GOFLAGS="-mod=vendor" +%endif export OLLAMA_SKIP_PATCHING=1