##Building hmatrix on Windows 7
Replace minghc-7.10.2-x86_64\ghc-7.10.2\mingw
with
mingw
from x86_64-mingw32-gcc-4.6.3-release-c,c++,fortran-sjlj.zip
Here you have a full Fortran compiler, not shipped with minghc-7.10.2.
So you should have the following
$ gcc --version
gcc.exe (niXman's build) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
Then run the mingw-w64
shell installed with msys2-x86_64-20150512. Check again
gcc --version
should be 4.6.3
if not, uninstall gcc
from msys
pacman -R gcc
Replace 4
with number of your processors in the following commands or just leave the command make
alone.
git clone https://github.com/xianyi/OpenBLAS
cd OpenBLAS
make -j4 NUM_THREADS=4
make PREFIX=/d/Prog/OpenBLAS install
If you don't have make
or git
, run this.
pacman -Sy git, make
Clone hmatrix
git clone https://github.com/alogic0/hmatrix
then
cd hmatrix/packages/base
cabal install --only-dep
cabal configure --flags=openblas --flags=windowshack --extra-include-dirs=/d/OpenBLAS/include --extra-lib-dirs=/d/OpenBLAS/bin --extra-lib-dirs=/d/OpenBLAS/lib
cabal build
cabal install --flags=openblas --flags=windowshack --extra-include-dirs=/d/OpenBLAS/include --extra-lib-dirs=/d/OpenBLAS/bin --extra-lib-dirs=/d/OpenBLAS/lib
or from Win cmd
cd hmatrix\packages\base
cabal install --only-dep
cabal configure --flags=openblas --flags=windowshack --extra-include-dirs=D:\Prog\OpenBLAS\include --extra-lib-dirs=D:\Prog\OpenBLAS\bin --extra-lib-dirs=D:\Prog\OpenBLAS\lib
cabal build
cabal install --flags=openblas --flags=windowshack --extra-include-dirs=D:\Prog\OpenBLAS\include --extra-lib-dirs=D:\Prog\OpenBLAS\bin --extra-lib-dirs=D:\Prog\OpenBLAS\lib
To install cmake
pacman -Sy
pacman -S mingw-w64-x86_64-gsl make
take cmake, tweak it
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -168,7 +168,7 @@ namespace std { typedef ios ios_base; }
# endif
#endif
-#if defined( _MSC_VER )
+#if defined( _MSC_VER ) || defined( __MINGW32__)
typedef unsigned short mode_t;
#endif
then
./bootstrap --no-qt-gui --parallel=4
change in cmake_install.cmake
string to CMAKE_INSTALL_PREFIX "D:/msys64/mingw64"
then
make -j4
make -j4 install