Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Apr 2026 09:12:58 +0200
From:      Gleb Popov <arrowd@freebsd.org>
To:        Yuri Victorovich <yuri@freebsd.org>
Cc:        ports-committers <ports-committers@freebsd.org>, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: 097b8e780932 - main - misc/ollama: Fix package on non-x86 architectures
Message-ID:  <CALH631mHaMRmvmugX90u-ep5D73=QqY0S_9MiZxwk8zX1M3VcQ@mail.gmail.com>
In-Reply-To: <69ce1085.20cac.772d7539@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Thu, Apr 2, 2026, 08:45 Yuri Victorovich <yuri@freebsd.org> wrote:

> The branch main has been updated by yuri:
>
> URL:
> https://cgit.FreeBSD.org/ports/commit/?id=097b8e78093252bee1b7794095de394bb0729f52
>
> commit 097b8e78093252bee1b7794095de394bb0729f52
> Author:     Yuri Victorovich <yuri@FreeBSD.org>
> AuthorDate: 2026-04-01 20:28:05 +0000
> Commit:     Yuri Victorovich <yuri@FreeBSD.org>
> CommitDate: 2026-04-02 06:45:22 +0000
>
>     misc/ollama: Fix package on non-x86 architectures
>
>     x86-specific shared libs are excluded.
>
>     Reported by:    fallout
> ---
>  misc/ollama/Makefile | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/misc/ollama/Makefile b/misc/ollama/Makefile
> index 88dfe4931b8a..931a55926ef5 100644
> --- a/misc/ollama/Makefile
> +++ b/misc/ollama/Makefile
> @@ -34,20 +34,24 @@ JSON_VERSION=               3.11.3
>  PLIST_FILES=   bin/${PORTNAME} \
>                 bin/ollama-limit-gpu-layers
>
> +XARCH!=                uname -p
> +
>

Why not use canonical ${ARCH} ?

 OPTIONS_GROUP=         BACKENDS
>  OPTIONS_GROUP_BACKENDS=        CPU VULKAN MLX
>  OPTIONS_DEFAULT=       CPU VULKAN MLX
>
>  CPU_DESC=              Build CPU backend shared libraries for various
> SIMD instruction sets
>  CPU_PLIST_FILES=       lib/ollama/libggml-base.so \
> -                       lib/ollama/libggml-base.so.0 \
> -                       lib/ollama/libggml-cpu-alderlake.so \
> +                       lib/ollama/libggml-base.so.0
> +.if ${XARCH} == "amd64" || ${XARCH} == "i386"
> +CPU_PLIST_FILES+=      lib/ollama/libggml-cpu-alderlake.so \
>                         lib/ollama/libggml-cpu-haswell.so \
>                         lib/ollama/libggml-cpu-icelake.so \
>                         lib/ollama/libggml-cpu-sandybridge.so \
>                         lib/ollama/libggml-cpu-skylakex.so \
>                         lib/ollama/libggml-cpu-sse42.so \
>                         lib/ollama/libggml-cpu-x64.so
> +.endif
>
>  VULKAN_DESC=           Build Vulkan GPU backend shared library
>  VULKAN_BUILD_DEPENDS=  glslc:graphics/shaderc \
>
>

[-- Attachment #2 --]
<div dir="auto"><div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Apr 2, 2026, 08:45 Yuri Victorovich &lt;<a href="mailto:yuri@freebsd.org">yuri@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The branch main has been updated by yuri:<br>
<br>
URL: <a href="https://cgit.FreeBSD.org/ports/commit/?id=097b8e78093252bee1b7794095de394bb0729f52" rel="noreferrer noreferrer" target="_blank">https://cgit.FreeBSD.org/ports/commit/?id=097b8e78093252bee1b7794095de394bb0729f52</a><br>;
<br>
commit 097b8e78093252bee1b7794095de394bb0729f52<br>
Author:     Yuri Victorovich &lt;yuri@FreeBSD.org&gt;<br>
AuthorDate: 2026-04-01 20:28:05 +0000<br>
Commit:     Yuri Victorovich &lt;yuri@FreeBSD.org&gt;<br>
CommitDate: 2026-04-02 06:45:22 +0000<br>
<br>
    misc/ollama: Fix package on non-x86 architectures<br>
<br>
    x86-specific shared libs are excluded.<br>
<br>
    Reported by:    fallout<br>
---<br>
 misc/ollama/Makefile | 8 ++++++--<br>
 1 file changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/misc/ollama/Makefile b/misc/ollama/Makefile<br>
index 88dfe4931b8a..931a55926ef5 100644<br>
--- a/misc/ollama/Makefile<br>
+++ b/misc/ollama/Makefile<br>
@@ -34,20 +34,24 @@ JSON_VERSION=               3.11.3<br>
 PLIST_FILES=   bin/${PORTNAME} \<br>
                bin/ollama-limit-gpu-layers<br>
<br>
+XARCH!=                uname -p<br>
+<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Why not use canonical ${ARCH} ?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 OPTIONS_GROUP=         BACKENDS<br>
 OPTIONS_GROUP_BACKENDS=        CPU VULKAN MLX<br>
 OPTIONS_DEFAULT=       CPU VULKAN MLX<br>
<br>
 CPU_DESC=              Build CPU backend shared libraries for various SIMD instruction sets<br>
 CPU_PLIST_FILES=       lib/ollama/libggml-base.so \<br>
-                       lib/ollama/libggml-base.so.0 \<br>
-                       lib/ollama/libggml-cpu-alderlake.so \<br>
+                       lib/ollama/libggml-base.so.0<br>
+.if ${XARCH} == &quot;amd64&quot; || ${XARCH} == &quot;i386&quot;<br>
+CPU_PLIST_FILES+=      lib/ollama/libggml-cpu-alderlake.so \<br>
                        lib/ollama/libggml-cpu-haswell.so \<br>
                        lib/ollama/libggml-cpu-icelake.so \<br>
                        lib/ollama/libggml-cpu-sandybridge.so \<br>
                        lib/ollama/libggml-cpu-skylakex.so \<br>
                        lib/ollama/libggml-cpu-sse42.so \<br>
                        lib/ollama/libggml-cpu-x64.so<br>
+.endif<br>
<br>
 VULKAN_DESC=           Build Vulkan GPU backend shared library<br>
 VULKAN_BUILD_DEPENDS=  glslc:graphics/shaderc \<br>
<br>
</blockquote></div></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631mHaMRmvmugX90u-ep5D73=QqY0S_9MiZxwk8zX1M3VcQ>