From 6477dbb68d8db0f089e0e1ce059015a67ca6b02f Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Sun, 26 Jul 2020 14:55:27 +0100 Subject: [PATCH] Make repository's packages build on Windows 10 The changes proposed in this pull request allow the respository's packages to be built on Windows 10 version 2004, with: `stack --resolver nightly-2020-07-24 build --flag hmatrix:openblas` See the discussion, including about the use of MSYS2 packages and import libraries, at: https://github.com/haskell-numerics/hmatrix/issues/236 The `.gitignore` file is also updated to exclude `.stack-work`. --- .gitignore | 3 +++ examples/examples.cabal | 3 +-- packages/base/hmatrix.cabal | 3 +-- packages/gsl/hmatrix-gsl.cabal | 3 +-- stack.yaml.lock | 26 ++++++++++++++++++++++++++ 5 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 stack.yaml.lock diff --git a/.gitignore b/.gitignore index 90a8d74a..55e4ffb6 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ title.md /base-reinstall.sh .cabal-sandbox cabal.sandbox.config + +# The Haskell Tool Stack-related +.stack-work diff --git a/examples/examples.cabal b/examples/examples.cabal index e6472210..e24d49d7 100644 --- a/examples/examples.cabal +++ b/examples/examples.cabal @@ -14,8 +14,7 @@ cabal-version: >=1.10 executable vectorShow main-is: VectorShow.hs - build-depends: base >=4.10 && <4.11, + build-depends: base >=4.10 && <5, hmatrix, hmatrix-gsl default-language: Haskell2010 - diff --git a/packages/base/hmatrix.cabal b/packages/base/hmatrix.cabal index 6c6383e4..bbf78b2a 100644 --- a/packages/base/hmatrix.cabal +++ b/packages/base/hmatrix.cabal @@ -140,7 +140,7 @@ library if os(windows) if flag(openblas) - extra-libraries: libopenblas, libgcc_s_seh-1, libgfortran, libquadmath-0 + extra-libraries: openblas, gcc_s else extra-libraries: blas lapack @@ -159,4 +159,3 @@ library source-repository head type: git location: https://github.com/albertoruiz/hmatrix - diff --git a/packages/gsl/hmatrix-gsl.cabal b/packages/gsl/hmatrix-gsl.cabal index 76db835d..d4e9dfd1 100644 --- a/packages/gsl/hmatrix-gsl.cabal +++ b/packages/gsl/hmatrix-gsl.cabal @@ -81,7 +81,7 @@ library extra-libraries: gsl if os(windows) - extra-libraries: gsl-0 + extra-libraries: gsl if os(linux) if arch(x86_64) @@ -98,4 +98,3 @@ library source-repository head type: git location: https://github.com/albertoruiz/hmatrix - diff --git a/stack.yaml.lock b/stack.yaml.lock new file mode 100644 index 00000000..bf42850c --- /dev/null +++ b/stack.yaml.lock @@ -0,0 +1,26 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: +- completed: + hackage: diagrams-rasterific-1.4@sha256:725c29db134366d2c1e5e95b5e5f1ed6f364f04753e906773a81f84447709078,2027 + pantry-tree: + size: 1212 + sha256: 3b0c20d9f5cb8e431c7b2b884a7089c3b0b1189810f89780a785c3de64e03f09 + original: + hackage: diagrams-rasterific-1.4 +- completed: + hackage: plots-0.1.0.2@sha256:3d45b5b973339a50d0686153d77b0f1e438c1a890e75c2274830e878e9fd78d8,2131 + pantry-tree: + size: 5210 + sha256: ff47de4b79b97c735f5cc75ae52a32db807f94a1bd4f2324be9816d5a34f612d + original: + hackage: plots-0.1.0.2 +snapshots: +- completed: + size: 569315 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/10/9.yaml + sha256: c85a3b35a7c2fa3771728a6f19e363c62ff5619afc2670f87450c19e6770c37f + original: lts-10.9