about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr Prins2024-05-03 13:31:05 +0200
committerPjotr Prins2024-05-03 13:31:05 +0200
commit8ccbdf293dcb99f460b2d038108c00ca4a73ad51 (patch)
treee8583a7722e99e2eeefc18b967ac1acc849a88cc
parent8132837eb10a419a8b88fd54d728989a0df22db8 (diff)
downloadpangemma-8ccbdf293dcb99f460b2d038108c00ca4a73ad51.tar.gz
Built a static version of gemma
-rw-r--r--.guix-dev-static4
-rw-r--r--INSTALL.md4
-rw-r--r--Makefile4
-rw-r--r--guix.scm27
4 files changed, 21 insertions, 18 deletions
diff --git a/.guix-dev-static b/.guix-dev-static
deleted file mode 100644
index da45c1f..0000000
--- a/.guix-dev-static
+++ /dev/null
@@ -1,4 +0,0 @@
-# Typical Guix container invocation
-~/opt/guix/bin/guix environment -C guix --ad-hoc gcc-toolchain:static gdb gsl openblas zlib:static bash ld-wrapper perl vim which gfortran-toolchain ruby
-
-# make WITH_GFORTRAN=1 EXTRA_FLAGS=-L/gnu/store/741057r2x06zwg6zcmqmdyv51spm6n9i-gfortran-7.5.0-lib/lib static
\ No newline at end of file
diff --git a/INSTALL.md b/INSTALL.md
index f5c02b9..417cbea 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -152,3 +152,7 @@ To create a static release, locate the gfortran lib and use
 otherwise OpenBlas will complain with
 
     undefined reference to `_gfortran_concat_string'
+
+Note you can use guix.scm if you load with
+
+    guix shell -L ~/guix-pjotr -C -D -f guix.scm
diff --git a/Makefile b/Makefile
index f3cc024..1009a6e 100644
--- a/Makefile
+++ b/Makefile
@@ -145,9 +145,9 @@ debug check fast-check: CPPFLAGS += -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Isrc
 
 profile: CPPFLAGS += -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Isrc
 
-release: CPPFLAGS += -DNDEBUG -O3 $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Isrc
+release: CPPFLAGS += -DNDEBUG -g -O3 $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Isrc
 
-static: CPPFLAGS += -DNDEBUG -O3 $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Isrc
+static: CPPFLAGS += -DNDEBUG -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Isrc
 
 
 ifeq ($(SYS), WIN)
diff --git a/guix.scm b/guix.scm
index e64ff98..4eeb203 100644
--- a/guix.scm
+++ b/guix.scm
@@ -4,7 +4,8 @@
 ;;
 ;; To get a development container (e.g., run in emacs shell).
 ;;
-;;   guix shell -C -f guix.scm
+;;   guix shell -C -D -f guix.scm
+;;
 
 (use-modules
   ((guix licenses) #:prefix license:)
@@ -28,6 +29,7 @@
   ;; (gnu packages perl6)
   (gnu packages ruby)
   (gnu packages pkg-config)
+  (pjotr packages openblas) ;; we use this for the static builds
   ;; (gnu packages shell)  ;; for shunit2
   (srfi srfi-1)
   (ice-9 popen)
@@ -47,18 +49,19 @@
     (version (git-version "0.98.5" "HEAD" %git-commit))
     (source (local-file %source-dir #:recursive? #t))
     (build-system gnu-build-system)
-    (inputs `(
-              ("catch" ,catch2)
-              ("gdb" ,gdb)
-              ("gsl" ,gsl)
-              ;; ("shunit2" ,shunit2) ;; comes with gemma
-              ("openblas" ,openblas)
-              ("ruby" ,ruby) ;; for testing
-              ("zlib:static" ,zlib "static")
-              ("zlib" ,zlib)
-              ))
+    (inputs
+     `(
+       ("catch" ,catch2)
+       ("gdb" ,gdb)
+       ("gsl-static" ,gsl-static)
+       ("gsl" ,gsl)
+       ("openblas" ,openblas)
+       ("ruby" ,ruby) ;; for testing
+       ("zlib:static" ,zlib "static")
+       ("zlib" ,zlib)))
+
     (native-inputs ; for running tests
-      `(("perl" ,perl)
+     `(("perl" ,perl)
        ("which" ,which)
        ))
     (arguments