ladc / lgsl

LGSL: A numerical library for Lua based on GSL
GNU General Public License v3.0
24 stars 3 forks source link

Make LGSL work on Windows #10

Open ladc opened 8 years ago

ladc commented 8 years ago

@franko wrote in #4

Probably what is important for LGSL on windows is to provide:

  • a set of working binaries
  • install informations for the expert users that may wish to use its own BLAS library or just compile the software by themselves

The first can perhaps be solved by providing a binary rock which includes a dll. The loading of libraries will need to be adapted for Windows.

ladc commented 8 years ago

One problem is that ffi.load() doesn't use package.cpath at all, so it won't just find the binaries installed by LuaRocks. One can however just pass ffi.load() the whole path as given by package.searchpath(libname,package.cpath).

franko commented 8 years ago

Hi,

after some troubles I was able to produce a DLL libraries of GSL which is dynamically linked to the official openblas library. If it is ok I can upload the binaries.

I can also produce a GSL library DLL linked with the GSL CBLAS DLL as you want.

The binaries was created using gcc 4.8.1 with flags "-march=i686 -O2". The DLL target 32bit systems.

ladc commented 8 years ago

That's great, thank you very much! Now we just need to pack these in a rock somehow :-) I'll look into it. I think a gsl+gslcblas version would be useful as well. Which version did you compile? On Jan 12, 2016 18:23, "Francesco" notifications@github.com wrote:

Hi,

after some troubles I was able to produce a DLL libraries of GSL which is dynamically linked to the official openblas library. If it is ok I can upload the binaries.

I can also produce a GSL library DLL linked with the GSL CBLAS DLL as you want.

The binaries was created using gcc 4.8.1 with flags "-march=i686 -O2". The DLL target 32bit systems.

— Reply to this email directly or view it on GitHub https://github.com/ladc/lgsl/issues/10#issuecomment-170981568.

franko commented 8 years ago

I have compiled GSL 1.16. Tomorrow I should be able to upload on github the DLLs GSL + openblas and GSL + gslcblas but only the 32bit versions. As for openblas everything seems to work well but the library itself is +20 Mb big.

franko commented 8 years ago

Ok. It was quite a bit of work but now we have the binaries with gslcblas:

https://github.com/franko/lgsl/tree/windows-binaries-no-libgcc

and with openblas (statically linked with gsl dll)

https://github.com/franko/lgsl/tree/windows-binaries-openblas-no-libgcc

in this latter case I've made a minor modification to lgsl/gsl.lua to omit loading libblas if not found.

franko commented 8 years ago

I've added algo the graphics toolkit library package which require pthreadGC2.dll. Otherwise this latter file can be omitted.

The binaries I've created should work on any windows machine AFAIK.

ladc commented 8 years ago

OK, I've created two binary rocks, but I'm not sure how to get this pthreadGC2.dll installed where Windows will look for it, using LuaRocks.

http://lgsl.duckdns.org/download.html

ladc commented 8 years ago

@franko @ignacio Do you have LuaRocks for windows? It's quite straightforward to install - could you test if any of these rocks work for you? Thanks!

http://lgsl.duckdns.org/download.html

franko commented 8 years ago

I should be able to test the rocks tomorrow, at work. I'll let you know.

ladc commented 8 years ago

I'm sorry, I guess the rocks cannot work since they don't have a rockspec. Not sure how to make this work since LuaRocks appears to look for the rockspec in the luarocks tree.

As for the graph package, perhaps the best solution is to statically link pthreadGC2.dll into graphcore.dll?