all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: ccall mechanism in Julia
Date: Mon, 09 Mar 2015 10:09:03 +0100	[thread overview]
Message-ID: <87wq2qpmfk.fsf@gnu.org> (raw)
In-Reply-To: <87egoz8slg.fsf@mango.localdomain> (Ricardo Wurmus's message of "Sun, 8 Mar 2015 15:35:39 +0100")

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	other threads:[~2015-03-09  9:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 15:48 ccall mechanism in Julia Ricardo Wurmus
2015-03-06 22:25 ` Andreas Enge
2015-03-08 14:35   ` Ricardo Wurmus
2015-03-09  9:09     ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wq2qpmfk.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.