Hello, I am on julia 0.7 and I have the following problem.
This code runs without any problems:
using Libdl
dlopen(:libgslcblas, RTLD_GLOBAL)
sf_gamma_inc_Q(a, x) = ccall((:gsl_sf_gamma_inc_Q, :libgsl), Cdouble, (Cdouble, Cdouble), a, x)
sf_gamma_inc_Q(1.0, 2.0)
Now, when I put this into a Module and then try to use it, it does not work:
Gamma.jl:
module Gamma
using Libdl
dlopen(:libgslcblas, RTLD_GLOBAL)
sf_gamma_inc_Q(a, x) = ccall((:gsl_sf_gamma_inc_Q, :libgsl), Cdouble, (Cdouble, Cdouble), a, x)
end
somewhere else:
using Gamma
Gamma.sf_gamma_inc_Q(1.0, 2.0)
returns:
ERROR: LoadError: error compiling sf_gamma_inc_Q: could not load library "libgsl"
/usr/lib/libgsl.so: undefined symbol: cblas_ctrmv
When manually add using Libdl; dlopen(:libgslcblas, RTLD_GLOBAL)
into this file everything works again.
But I want to work it without the need that Gamma.jl
needs some additional libraries.
What is happening here and how can I fix it?
Thanks.