note that Pkg.dir("Sundials",...) should probably be
joinpath(@__FILE__, ...) so that this actually has the intended
behavior. although the first gives you a location that the user has
write accessalso, when you build & distribute binaries for windows, it is preferable if you can include $(WORD_SIZE) in the path, for your users benefit (bonus points if you can provide both usr32/ and usr64/ in the same download) also, note that the user can push!(DL_LOAD_PATH, "C:/path/to/lib/") to tell julia where to find a dependency, without needing to modify the library. therefore it is preferable for a library not to hardcode a path, since this limits the user (Base.find_library is also provided to help with this shared library resolution) On Tue, May 27, 2014 at 7:45 PM, Tony Kelman <[email protected]> wrote: > Here, this might help as a starting point: > http://sourceforge.net/projects/juliadeps-win/files/sundials-2.5.0-x86_64-w64-mingw32.7z/download > > For reference, I configured this in Cygwin as > > ../configure --enable-shared --host=x86_64-w64-mingw32 > F77=x86_64-w64-mingw32-gfortran --prefix=$PWD/usr > > then built as (extra linker flags are important to get libtool to make > shared libraries on Windows, and skip version suffix) > > make LDFLAGS="-no-undefined -avoid-version" > > Then we need to go in to Sundials.jl and do something like > > @unix_only shlib = :libsundials_nvecserial > @windows_only shlib = > Pkg.dir("Sundials","usr","bin","libsundials_nvecserial") > include("nvector.jl") > @unix_only shlib = :libsundials_cvode > @windows_only shlib = Pkg.dir("Sundials","usr","bin","libsundials_cvode") > include("libsundials.jl") > include("cvode.jl") > @unix_only shlib = :libsundials_cvodes > @windows_only shlib = Pkg.dir("Sundials","usr","bin","libsundials_cvodes") > include("cvodes.jl") > @unix_only shlib = :libsundials_ida > @windows_only shlib = Pkg.dir("Sundials","usr","bin","libsundials_ida") > include("ida.jl") > @unix_only shlib = :libsundials_idas > @windows_only shlib = Pkg.dir("Sundials","usr","bin","libsundials_idas") > include("idas.jl") > @unix_only shlib = :libsundials_kinsol > @windows_only shlib = Pkg.dir("Sundials","usr","bin","libsundials_kinsol") > include("kinsol.jl") > > to handle not having sundials libraries on the path (or a better version of > same that uses BinDeps). > > Looks like there are some undefined references in Sundials (to > `N_VNewEmpty_Serial' and `N_VCloneVectorArrayEmpty_Serial') that are > preventing libsundials_nvecserial from building as a dll. Anyone familiar > with the code know where to hunt around for those? Should just need another > link flag or two, if I can find where they're hiding. > > > -Tony > > > On Tuesday, May 27, 2014 3:36:06 PM UTC-7, Tony Kelman wrote: >> >> Sundials needs BinDeps integration. I can help here, but haven't used >> Sundials before. Anyone have experience using it under MinGW, any hangups to >> watch out for? >> >> >> On Tuesday, May 27, 2014 2:35:01 PM UTC-7, Alex wrote: >>>> >>>> The Sundials.jl interfaces the Sundials library, which includes stiff >>>> ODE solvers. >>> >>> >>> I think Frederick knows about Sundials.jl. Apparently he had problems to >>> get it working (or to get the Sundials library installed?). Rereading his >>> email I just realized that he is on Windows, which might be tricky in that >>> respect? >>> >>> - Alex.
