femtotrader / TALib.jl

A Julia wrapper for TA-Lib
Other
50 stars 11 forks source link

Using BinDeps.jl to build/install dependencies #16

Open femtotrader opened 7 years ago

femtotrader commented 7 years ago

Development of this package was done using Mac OS X.

It doesn't work with Linux (for now)

see https://travis-ci.org/femtotrader/TALib.jl/jobs/165999824

ERROR: LoadError: LoadError: error compiling get_ta_func_constants: error compiling get_dict_of_ta_func: error compiling FunctionDescriptionXML: could not load library "/usr/local/lib/libta_lib.0.0.0.dylib"
/usr/local/lib/libta_lib.0.0.0.dylib.so: cannot open shared object file: No such file or directory

https://github.com/femtotrader/TALib.jl/blob/ca06fea4b567d5f3d9fed90969451a890bce3b84/src/constants.jl#L8

may be fixed

femtotrader commented 7 years ago

See https://github.com/JuliaLang/BinDeps.jl ?

femtotrader commented 7 years ago

Under Linux

$ sudo find / -type f -name libta_lib\*
/usr/lib/libta_lib.a
/usr/lib/libta_lib.la
/usr/lib/libta_lib.so.0.0.0
/home/travis/build/femtotrader/TALib.jl/ta-lib/src/libta_lib.la
/home/travis/build/femtotrader/TALib.jl/ta-lib/src/.libs/libta_lib.a
/home/travis/build/femtotrader/TALib.jl/ta-lib/src/.libs/libta_lib.so.0.0.0
/home/travis/build/femtotrader/TALib.jl/ta-lib/src/.libs/libta_lib.lai

but under OS X

$ sudo find / -type f -name libta_lib\*
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/usr/local/Cellar/ta-lib/0.4.0/lib/libta_lib.0.0.0.dylib
/usr/local/Cellar/ta-lib/0.4.0/lib/libta_lib.a
find: /Volumes/VMware Shared Folders: Input/output error
xgdgsc commented 7 years ago

I think you should consider BinDeps.jl like https://github.com/peterwittek/Somoclu.jl/blob/master/deps/build.jl.

femtotrader commented 7 years ago

Thanks @xgdgsc

I will have a look at https://github.com/peterwittek/Somoclu.jl/blob/master/deps/build.jl

I will also have a look at https://github.com/JuliaGraphics/Cairo.jl/blob/master/deps/build.jl

Some others Julia packages using BindDeps.jl https://github.com/JuliaOpt/Ipopt.jl/blob/master/deps/build.jl https://github.com/JuliaOpt/GLPK.jl/blob/master/deps/build.jl https://github.com/staticfloat/Nettle.jl/blob/master/deps/build.jl

femtotrader commented 7 years ago

A tutorial can be found at https://www.youtube.com/watch?v=XKdKdfHB2KM

but PR are welcome!!!

femtotrader commented 7 years ago

Installing binary dependencies (TALib) using BinDeps works fine with OS X and HomeBrew but I'm still facing issue with source compilation of TA-Lib under Linux

see https://travis-ci.org/femtotrader/TALib.jl/builds/166089465

I'm getting the following error

LoadError: Path /home/travis/.julia/v0.5/TALib/deps/src/ta-lib-0.4.0-src was not created successfully (Tried to run `tar xzf /home/travis/.julia/v0.5/TALib/deps/downloads/ta-lib-0.4.0-src.tar.gz --directory=/home/travis/.julia/v0.5/TALib/deps/src` )
while loading /home/travis/.julia/v0.5/TALib/deps/build.jl, in expression starting on line 31

Any idea ?

see also https://groups.google.com/forum/#!topic/julia-users/CZiVeZe6Sm0

femtotrader commented 7 years ago

Partial fix using unpacked_dir keyword.

provides(Sources, URI("http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz"), libta_lib, unpacked_dir="ta-lib")

but build for Linux is still broken using BinDeps

femtotrader commented 7 years ago

Pinging some people from @JuliaQuant ( @milktrader @tbreloff ) Have you ever experienced BinDeps ? Continuous integration works fine with Mac OS X, but I'd like to have CI works also with Linux.