From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: ccall mechanism in Julia Date: Fri, 6 Mar 2015 23:25:16 +0100 Message-ID: <20150306222516.GA2650@debian> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YU0gU-0002NH-3b for guix-devel@gnu.org; Fri, 06 Mar 2015 17:25:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YU0gQ-0003wb-CG for guix-devel@gnu.org; Fri, 06 Mar 2015 17:25:29 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:58032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YU0gQ-0003wL-3C for guix-devel@gnu.org; Fri, 06 Mar 2015 17:25:26 -0500 Content-Disposition: inline In-Reply-To: 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 On Fri, Mar 06, 2015 at 04:48:59PM +0100, Ricardo Wurmus wrote: > Julia's bindings to these libraries use the ccall mechanism; ccall > builds a map from library names to paths by parsing the output of > "ldconfig -p" at runtime. I worked around this problem by patching the > sources to include a static map of library names to store paths. Then I > noticed, however, that my patch effectively cripples the FFI. It is no > longer possible to call a function that is exported by a shared library > unless it happens to be in the static map that is created at build time. This looks like a good approach for guix, where we try to not use random libraries lying around in the user profile. Setting the rpath with our ld-wrapper behaves also like a static map. Otherwise, updating some other library in the user profile would modify the behaviour of julia, which would contradict our functional approach. Or did I misunderstand anything? Andreas