Open freeman42x opened 8 years ago
Hmm...
I suspect that the problem is still in how hmatrix is installed. SubHask doesn't use openblas directly at all. It only accesses it through hmatrix.
I'm not very familiar with either Windows or stack. Is there a chance that stack is not using the fixed version of hmatrix you have installed?
@razvan-panda You need to have libopenblas.dll into your PATH to work.
@varosi I had libopenblas.dll in the PATH under /c/WINDOWS/system32
. Checked with echo $PATH in the MINGW64 console where I ran the stack build
(the shell that comes with latest git for windows 2.5.0).
Upgraded stack from 1.2.* to latest 0.1.4.1 and getting the same error. No idea why this is happening as it built ok when building hmatrix alone.
This might have something to do with dynamic / enable shared options:
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/using-shared-libs.html
Possibly related: https://ghc.haskell.org/trac/ghc/ticket/8618
or
@razvan-panda: I tried right now to copy libopenblas.dll to root of subhask and it stopped to give that message about the DLL. But now it gives different message:
ghc.exe: unable to load package `hmatrix-0.17.0.1'
ghc.exe: D:\Projects\workspace\subhask.cabal-sandbox\x86_64-windows-ghc-7.10.2\hmatrix-0.17.0.1-BKZgcz6cUJt3k7Bf3waJkr\HShmatrix-0.17.0.1-BKZgcz6cUJt3k7Bf3waJkr.o: unknown symbol `__muldc3'
with GHC 7.10.2 x64
I found that this has to do with GCC: http://lists.mcs.anl.gov/pipermail/mpich-discuss/2012-August/012920.html
May be this OpenBLAS is built with GCC and this is the problem. I have tried do get DLLs (mingw64) that are needed for libopenblas.dll into subhask root folder: http://sourceforge.net/projects/openblas/files/v0.2.14/
But without success.
__muldc3 symbol is found in LIBGCC_S_SEH-1.DLL library.
@varosi Thank you for the investigation. I am not sure how to approach figuring this out. Tried copying libopenblas.dll into subhask root and the error message did not change for me, same error when copying in the build directory subhask\.stack-work\dist\i386-windows\Cabal-1.22.4.0
.
@razvan-panda You are welcome! I think somehow it doesn't load your DLL by three possible reasons:
http://comments.gmane.org/gmane.linux.lib.musl.general/4007
Have more information. I think that the problem comes from OpenBLAS library itself.
@varosi I placed the DLL (same architecture as the one which worked for building only hmatrix by itself) in the subhask root folder and built using stack and it did not see it (haven't tried with cabal-install).
@razvan-panda, I have changed this line in hmatrix.cabal:
extra-libraries: libopenblas, libgcc_s_seh-1, libgfortran-3, libquadmath-0
and now it giving me next linker error:
ghc.exe: D:\Projects\workspace\HL.stack-work\install\x86_64-windows\lts-3.3\7.10.2\lib\x86_64-windows-ghc-7.10.2\hmatrix-0.17.0.1-BKZgcz6cUJt3k7Bf3waJkr\HShmatrix-0.17.0.1-BKZgcz6cUJt3k7Bf3waJkr.o: unknown symbol `atanh'
It is connected with GCC StdLib and math functions, I think.
May be the problem is in OpenBLAS Windows distribution itself... It's just too much time wasted because of BLAS/LAPACK stuff.
May be radical solution like this better: https://github.com/albertoruiz/hmatrix/pull/159
Or use some pure Haskell solution.
hm, I think that if the person that is built OpenBLAS for Windows could provide us with DLL that have math functions in it, this could help a lot.
I tried to comment math functions, so almost all math functions are missing in DLLs.
I applied the hmatrix commits for
stack
and build on windows found in https://github.com/varosi/hmatrix/tree/feature/base-stack over the hmatrix 0.16.1.5 which is required as a subhask dependency. When I build only hmatrix it builds without any error.Adding the altered hmatrix package above to the subhask package yaml configuration yields the following error:
The modified subhask yaml file used for building is:
Could instead have passed the extra setting by command line as mentioned in: https://github.com/varosi/hmatrix/blob/feature/base-stack/INSTALL.md