From f2eadcbadb07aaf93c8e727488c1198ff22e17f2 Mon Sep 17 00:00:00 2001 From: Vassil Keremidchiev Date: Mon, 29 May 2017 15:34:30 +0300 Subject: Support for LTS 8.15 (GHC 8.0.2) under Windows Updated documentation with working solution under Windows. --- INSTALL.md | 39 +++++++++++++++++++++++++-------------- packages/base/hmatrix.cabal | 2 +- stack.yaml | 2 +- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index e48064d..9f5761f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -33,6 +33,31 @@ Via MacPorts: ## Windows ############################################### +### Stack-based build (prefered) + +Similar should be build under other OSes, like Linux and OSX. This recipe is for stack 1.4.0 - tested and working. + +1) + + > stack setup + +2) Download and unzip somewhere OpenBLAS http://www.openblas.net/ + +3) In MSYS2 console of Stack, i.e.: C:\Users\{User}\AppData\Local\Programs\stack\x86_64-windows\msys2-{version}\msys2_shell.bat + + > cd /.../OpenBLAS + > pacman -Sy + > pacman -S make perl gcc-fortran + > make clean + > make + > make install + +3) Then in normal Windows console for building hmatrix base lib (fill in user name, versions and check if paths are different on your machine): + + > stack install --flag hmatrix:openblas --extra-include-dirs=C:\Users\{User}\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\opt\OpenBLAS\include --extra-lib-dirs=C:\Users\{User}\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\opt\OpenBLAS\bin --extra-lib-dirs=C:\Users\{User}\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\usr\lib\gcc\x86_64-pc-msys\6.3.0\ + +### Cabal-based build + (Not tested). It should be possible to install the new package hmatrix >= 0.16 using the dlls contributed by Gilberto Camara available in [gsl-lapack-windows.zip][winpack]. @@ -67,20 +92,6 @@ using this method. > cabal install --flags=openblas --extra-lib-dirs=C:\...\OpenBLAS\lib --extra-include-dirs=C:\...\OpenBLAS\include -### Stack-based Windows build - -Similar should be build under other OSes, like Linux and OSX. - -1) - - > stack setup - -2) Download and unzip somewhere OpenBLAS http://www.openblas.net/ - -3) Example in a normal Windows cmd for building hmatrix base lib: - - > stack install hmatrix --flag hmatrix:openblas --extra-lib-dirs=C:\...\OpenBLAS\lib --extra-include-dirs=C:\...\OpenBLAS\include - ## Tests ############################################### After installation we can verify that the library works as expected: diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index f1bc8e6..51df463 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal @@ -121,7 +121,7 @@ library if os(windows) if flag(openblas) - extra-libraries: libopenblas, libgcc_s_seh-1, libgfortran-3, libquadmath-0 + extra-libraries: libopenblas, libgcc_s_seh-1, libgfortran, libquadmath-0 else extra-libraries: blas lapack diff --git a/stack.yaml b/stack.yaml index ee89f64..1198e57 100644 --- a/stack.yaml +++ b/stack.yaml @@ -14,4 +14,4 @@ packages: - packages/glpk/ - packages/base/ extra-deps: [] -resolver: lts-3.3 +resolver: lts-8.15 -- cgit v1.2.3 From 80d809f7e6df7196bb711420698f173c7a8e6e9c Mon Sep 17 00:00:00 2001 From: Vassil Keremidchiev Date: Mon, 29 May 2017 15:36:51 +0300 Subject: Update cabal version for new C dependency change --- packages/base/hmatrix.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 51df463..7015695 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal @@ -1,5 +1,5 @@ Name: hmatrix -Version: 0.18.0.0 +Version: 0.18.0.1 License: BSD3 License-file: LICENSE Author: Alberto Ruiz -- cgit v1.2.3