GNU bug report logs -
#69443
[PATCH] gnu: Add guile-gsl.
Previous Next
Reported by: Artyom Bologov <mail <at> aartaka.me>
Date: Tue, 27 Feb 2024 23:41:03 UTC
Severity: normal
Tags: patch
Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69443 in the body.
You can then email your comments to 69443 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#69443
; Package
guix-patches
.
(Tue, 27 Feb 2024 23:41:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Artyom Bologov <mail <at> aartaka.me>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 27 Feb 2024 23:41:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi y'all,
This is both a patch submission and a call for help—I'm far out of my
waters with this package and am not sure of the proper Guix-y way to
build it.
So the build sequence for Guile GSL is:
(1) Compile a bundled libguilegslblas.so with a C compiler, using the GSL
libraries from package inputs.
(2) Put proper paths to the GSL libraries and libguilegslblas into the
Scheme files.
(3) Compile Scheme files as per guile-build-system.
I've got (2) and (3) more or less working. The problem is: which build
system should I use and how do I synthesize GNU build system (makefile,
libguilegslblas.so, (1)) and Guile one?
You can find my draft (doesn't build and is not usable in general) patch
attached below. Any help appreciated!
[0001-gnu-Add-guile-gsl.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Thanks,
--
Artyom Bologov.
Information forwarded
to
glv <at> posteo.net, cox.katherine.e+guix <at> gmail.com, me <at> bonfacemunyoki.com, sharlatanus <at> gmail.com, jgart <at> dismail.de, guix-patches <at> gnu.org
:
bug#69443
; Package
guix-patches
.
(Fri, 08 Mar 2024 23:32:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 69443 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/guile-xyz.scm (guile-gsl): Fix build.
Change-Id: Iaf653f25fd2b972e575d9c2fd1607cd490cc17db
---
gnu/packages/guile-xyz.scm | 86 ++++++++++++++++++++++++++++----------
1 file changed, 65 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 9ddcc626fe..1f9d1ecb3e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -4522,31 +4522,75 @@ (define-public guile-gsl
(package
(name "guile-gsl")
(version "0.0.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/aartaka/guile-gsl")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "00dy33ibvfhzs5xp65g4g8d02wy4fiamjbp3pg87cghg41q4lwkr"))))
- (build-system guile-build-system)
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aartaka/guile-gsl")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "00dy33ibvfhzs5xp65g4g8d02wy4fiamjbp3pg87cghg41q4lwkr"))))
+ (build-system gnu-build-system)
(arguments
- '(#:source-directory "modules"
- #:phases
- #~(modify-phases %standard-phases
- (add-before 'build 'substitute-gsl-so
- (lambda _
- (let ((gsl (string-append #$(this-package-input "lmdb")
- "/lib/libgsl.so")))
- (substitute* "modules/gsl/core.scm"
- (("libgsl.so") gsl))))))))
+ (list
+ #:modules `(((guix build guile-build-system)
+ #:select (target-guile-effective-version))
+ ,@%gnu-build-system-modules)
+ #:imported-modules `((guix build guile-build-system)
+ ,@%gnu-build-system-modules)
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'build 'substitute-gsl-so
+ (lambda _
+ (let ((gsl (string-append #$(this-package-input "gsl")
+ "/lib/libgsl.so")))
+ (substitute* "modules/gsl/core.scm"
+ (("libgsl.so")
+ gsl)))))
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CC" "gcc")
+ (setenv "GUILE_AUTO_COMPILE" "0")
+ (invoke "make")
+ (setenv "LD_LIBRARY_PATH" "./")
+ (let* ((module-dir "modules")
+ (prefix (string-length module-dir)))
+ (for-each (lambda (file)
+ (let* ((base (string-drop (string-drop-right
+ file 4)
+ prefix))
+ (go (string-append "go" base
+ ".go")))
+ (invoke "guild"
+ "compile"
+ "-L"
+ module-dir
+ file
+ "-o"
+ go)))
+ (find-files module-dir "\\.scm$")))))
+ (delete 'check) ;no tests
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((lib (string-append #$output "/lib"))
+ (guile #$(this-package-input "guile"))
+ (version (target-guile-effective-version guile))
+ (scm (string-append "/share/guile/site/"
+ version))
+ (go (string-append "/lib/guile/" version
+ "/site-ccache")))
+ (install-file "libguilegslblas.so" lib)
+ (copy-recursively "modules/"
+ (string-append #$output scm))
+ (copy-recursively "go/"
+ (string-append #$output go))))))))
(native-inputs (list guile-3.0))
(inputs (list guile-3.0 gsl))
(home-page "https://github.com/aartaka/guile-gsl")
- (synopsis "Bindings for GNU Scientific library in Guile.")
- (description "This package provides Guile Scheme wrapper for libgsl.so.
+ (synopsis "Bindings for GNU Scientific library in Guile")
+ (description
+ "This package provides Guile Scheme wrapper for @code{libgsl.so}.
Only vector, matrix, and BLAS operations are covered for now.")
(license license:gpl3+))))
base-commit: 38a00bc089205818a351c363a107b8ba5c99fd0d
--
2.41.0
Reply sent
to
Sharlatan Hellseher <sharlatanus <at> gmail.com>
:
You have taken responsibility.
(Thu, 04 Apr 2024 11:28:04 GMT)
Full text and
rfc822 format available.
Notification sent
to
Artyom Bologov <mail <at> aartaka.me>
:
bug acknowledged by developer.
(Thu, 04 Apr 2024 11:28:04 GMT)
Full text and
rfc822 format available.
Message #13 received at 69443-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Patch applied based on <https://issues.guix.gnu.org/69820>.
Thanks,
Oleg
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 03 May 2024 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.