[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to use gsl with the guile ffi

From: tantalum
Subject: Re: how to use gsl with the guile ffi
Date: Sat, 29 Dec 2018 10:39:33 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3

only thing is, im not sure yet what i would set LD_LIBRARY_PATH to, as the 
following are all the library files gsl installs:

gsl /usr/lib/
gsl /usr/lib/
gsl /usr/lib/
gsl /usr/lib/
gsl /usr/lib/
gsl /usr/lib/

ldd output is
  ldd /usr/lib/ (0x00007ffeb5ded000) => /usr/lib/ (0x00007f804bc32000) => /usr/lib/ (0x00007f804ba6e000)
        /usr/lib64/ (0x00007f804c282000)

something that works in my c test program is preloading libgslcblas with 

  void* a = dlopen("/usr/lib/", RTLD_NOW | RTLD_GLOBAL);
  void* b = dlopen("/usr/lib/", RTLD_NOW);

but guile uses libtool of course. as far as i understand it, libgslcblas is a 
cblas implementation that can be replaced with other ones, and that is why it 
is separate.

the RTLD_GLOBAL feature has been referenced in a mailing list post from 2012 "Re: 
using GSL with cblas via FFI"

what might eventually work is to compile gsl myself with the dependency 
excluded or statically linked. or using a c extension instead of the ffi.
but it is interesting also how the example from the manual does not work and gives the 
same error message. (define libm (dynamic-link "libm"))

it would be interesting to know if it works for others.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]