GNU bug report logs - #71219
[PATCH] gnu: llama-cpp: Update configure flags for shared library build.

Previous Next

Package: guix-patches;

Reported by: Andy Tai <atai <at> atai.org>

Date: Mon, 27 May 2024 05:20:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andy Tai <atai <at> atai.org>
Subject: bug#71219: closed (Re: [bug#71219] [PATCH v5] gnu: llama-cpp:
 Update commit and configure flags for shared library build.)
Date: Wed, 10 Jul 2024 13:48:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#71219: [PATCH] gnu: llama-cpp: Update configure flags for shared library build.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 71219 <at> debbugs.gnu.org.

-- 
71219: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71219
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Andy Tai <atai <at> atai.org>
Cc: 71219-done <at> debbugs.gnu.org
Subject: Re: [bug#71219] [PATCH v5] gnu: llama-cpp: Update commit and
 configure flags for shared library build.
Date: Wed, 10 Jul 2024 15:47:36 +0200
[Message part 3 (text/plain, inline)]
Hi Andy,

Andy Tai <atai <at> atai.org> skribis:

> * gnu/packages/machine-learning.scm (lama-cpp): Update to commit a5735e with
>   pkg-config support.
>   [arguments](configure-flags): Add cmake configure flag
>   for shared library build and adjust arguments to make openblas
>   found by cmake.
>   (phases) 'install-python-scripts: Remove references to deleted scripts
>   and add new ones upsteeam.
>
> Change-Id: I7c4bc219a22aa9a949e811b340c7cf745b176d14

Applied with the indentation changes shown below.  Thanks!

Ludo’.

[Message part 4 (text/x-patch, inline)]
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a2be0bf9c8..1cb6586e81 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -567,18 +567,22 @@ (define-public llama-cpp
       (arguments
        (list
         #:configure-flags
-        #~(list               "-DBUILD_SHARED_LIBS=ON"
-                              "-DLLAMA_BLAS=ON"
-                              "-DLLAMA_BLAS_VENDOR=OpenBLAS"
-                              (string-append "-DBLAS_INCLUDE_DIRS=" #$(this-package-input "openblas") "/include")
-                              (string-append "-DBLAS_LIBRARIES=" #$(this-package-input "openblas") "/lib/libopenblas.so")
+        #~(list "-DBUILD_SHARED_LIBS=ON"
+                "-DLLAMA_BLAS=ON"
+                "-DLLAMA_BLAS_VENDOR=OpenBLAS"
+                (string-append "-DBLAS_INCLUDE_DIRS="
+                               #$(this-package-input "openblas")
+                               "/include")
+                (string-append "-DBLAS_LIBRARIES="
+                               #$(this-package-input "openblas")
+                               "/lib/libopenblas.so")
 
-                              "-DLLAMA_NATIVE=OFF" ;no '-march=native'
-                              "-DLLAMA_FMA=OFF"    ;and no '-mfma', etc.
-                              "-DLLAMA_AVX2=OFF"
-                              "-DLLAMA_AVX512=OFF"
-                              "-DLLAMA_AVX512_VBMI=OFF"
-                              "-DLLAMA_AVX512_VNNI=OFF")
+                "-DLLAMA_NATIVE=OFF" ;no '-march=native'
+                "-DLLAMA_FMA=OFF"    ;and no '-mfma', etc.
+                "-DLLAMA_AVX2=OFF"
+                "-DLLAMA_AVX512=OFF"
+                "-DLLAMA_AVX512_VBMI=OFF"
+                "-DLLAMA_AVX512_VNNI=OFF")
 
         #:modules '((ice-9 textual-ports)
                     (guix build utils)
[Message part 5 (message/rfc822, inline)]
From: Andy Tai <atai <at> atai.org>
To: guix-patches <at> gnu.org
Cc: Andy Tai <atai <at> atai.org>
Subject: [PATCH] gnu: llama-cpp: Update configure flags for shared library
 build.
Date: Sun, 26 May 2024 22:16:48 -0700
* gnu/packages/machine-learning.scm (lama-cpp):
  [arguments](configure-flags): add cmake configure flag
  to force position independent code generation from C
  compiler for shared library build.

Change-Id: I7c4bc219a22aa9a949e811b340c7cf745b176d14
---
 gnu/packages/machine-learning.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a385ddc18c..398b42f203 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -541,7 +541,8 @@ (define-public llama-cpp
       (build-system cmake-build-system)
       (arguments
        (list
-        #:configure-flags #~'("-DLLAMA_BLAS=ON"
+        #:configure-flags #~'("-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE"
+                              "-DLLAMA_BLAS=ON"
                               "-DLLAMA_BLAS_VENDOR=OpenBLAS"
 
                               "-DLLAMA_NATIVE=OFF" ;no '-march=native'

base-commit: 0f3a25a25e212bfa8ab9db37d267fb260a087e5d
-- 
2.34.1




This bug report was last modified 1 year and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.