From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: ccall mechanism in Julia Date: Mon, 09 Mar 2015 10:09:03 +0100 Message-ID: <87wq2qpmfk.fsf@gnu.org> References: <20150306222516.GA2650@debian> <87egoz8slg.fsf@mango.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUtgW-0001nX-67 for guix-devel@gnu.org; Mon, 09 Mar 2015 05:09:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUtgR-0005kf-5X for guix-devel@gnu.org; Mon, 09 Mar 2015 05:09:12 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUtgR-0005ka-2N for guix-devel@gnu.org; Mon, 09 Mar 2015 05:09:07 -0400 In-Reply-To: <87egoz8slg.fsf@mango.localdomain> (Ricardo Wurmus's message of "Sun, 8 Mar 2015 15:35:39 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: Guix-devel 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=E2=80=93essentially LD_LIBRARY_PAT= H in our case. In Guile, =E2=80=98dynamic-link=E2=80=99 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 =E2=80=98load-extension=E2=80=99, which is= sort-of like =E2=80=98dynamic-link=E2=80=99 except that it first searches $libdir (rough= ly.) That addresses #1. HTH! Ludo=E2=80=99.