guix-devel
[Top][All Lists]
Advanced

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

Re: ccall mechanism in Julia


From: Ludovic Courtès
Subject: Re: ccall mechanism in Julia
Date: Mon, 09 Mar 2015 10:09:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

I think you want to things:

  1. That the libraries that Julia requires are automatically resolved
     to those that were available at build time.  The static map you
     propose is the right thing for that, as Andreas notes.

  2. That any other libraries users may want to load is search for using
     the normal dynamic linker mechanism–essentially LD_LIBRARY_PATH in
     our case.

In Guile, ‘dynamic-link’ is essentially a wrapper around lt_dlopen,
itself a wrapper around dlopen, so LTDL_LIBRARY_PATH and LD_LIBRARY_PATH
are honored (and if libc is configured with ldconfig support, then
/etc/ld*.conf are honored as well.)  This addresses #2.

In Guile applications, such as Guix, we hard-code the absolute path to
libraries that are dlopened, as is the case with libgcrypt in (guix
config) (specifically, see the recipe for Guix in (gnu packages
package-management).)

Yet, Guile knows where to find its own extensions, such as
guile-readline.  For that it has ‘load-extension’, which is sort-of like
‘dynamic-link’ except that it first searches $libdir (roughly.)  That
addresses #1.

HTH!

Ludo’.



reply via email to

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