From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#21076: dynamic-link often fails to load libraries Date: Sun, 22 Mar 2020 00:26:44 +0100 Message-ID: <87lfntuw5n.fsf@gnu.org> References: <2096431437065554@web11m.yandex.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="62709"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 21076-done@debbugs.gnu.org, Matt Wette To: Isaac Jurado Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sun Mar 22 00:27:10 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFnWI-000GDH-8B for guile-bugs@m.gmane-mx.org; Sun, 22 Mar 2020 00:27:10 +0100 Original-Received: from localhost ([::1]:41772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFnWH-0001jv-9n for guile-bugs@m.gmane-mx.org; Sat, 21 Mar 2020 19:27:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37124) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFnWB-0001jV-Rx for bug-guile@gnu.org; Sat, 21 Mar 2020 19:27:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFnWA-000644-L1 for bug-guile@gnu.org; Sat, 21 Mar 2020 19:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42474) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFnWA-00063x-Ht for bug-guile@gnu.org; Sat, 21 Mar 2020 19:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jFnWA-0006OH-FN for bug-guile@gnu.org; Sat, 21 Mar 2020 19:27:02 -0400 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Sat, 21 Mar 2020 23:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21076 X-GNU-PR-Package: guile Mail-Followup-To: 21076@debbugs.gnu.org, ludo@gnu.org, f.webster@yandex.com Original-Received: via spool by 21076-done@debbugs.gnu.org id=D21076.158483321424541 (code D ref 21076); Sat, 21 Mar 2020 23:27:02 +0000 Original-Received: (at 21076-done) by debbugs.gnu.org; 21 Mar 2020 23:26:54 +0000 Original-Received: from localhost ([127.0.0.1]:48446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFnW2-0006Nk-9G for submit@debbugs.gnu.org; Sat, 21 Mar 2020 19:26:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jFnW1-0006NY-AD for 21076-done@debbugs.gnu.org; Sat, 21 Mar 2020 19:26:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jFnVw-0005yE-4G; Sat, 21 Mar 2020 19:26:48 -0400 Original-Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=56556 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jFnVv-0007Sb-26; Sat, 21 Mar 2020 19:26:47 -0400 In-Reply-To: (Isaac Jurado's message of "Sat, 8 Jun 2019 14:37:23 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9679 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Isaac, Isaac Jurado skribis: > From b337d412b3c10cabe355df07d2295c4d0a560b10 Mon Sep 17 00:00:00 2001 > From: Isaac Jurado > Date: Sat, 8 Jun 2019 14:00:29 +0200 > Subject: [PATCH] Interpret dynamic library name as literal path first. > > Fixes . > > * libguile/dynl.c (sysdep_dyn_link): Try plain lt_dlopen first, to > interpret fname as a literal path. > * doc/ref/api-foreign.texi: Update explanation to describe the new > behavior. It=E2=80=99s taken a while (!), but thanks to Matt Wette=E2=80=99s ping, it= =E2=80=99s now applied on =E2=80=98master=E2=80=99 and will make it into 3.0.2. I slightly modified the documentation wording as shown in the patch below (the GNU convention is to use =E2=80=9Cfile name=E2=80=9D for file na= mes and =E2=80=9Cpath=E2=80=9D for search paths). Like you wrote, it=E2=80=99s hard to test, but I think it=E2=80=99s OK to l= eave it as is. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/doc/ref/api-foreign.texi b/doc/ref/api-foreign.texi index 94fabf23c..b0d6c249b 100644 --- a/doc/ref/api-foreign.texi +++ b/doc/ref/api-foreign.texi @@ -75,14 +75,14 @@ Scheme object suitable for representing the linked object file. Otherwise an error is thrown. How object files are searched is system dependent. -Guile first tries to load @var{library} as a full path to a shared -library file. If that fails, then it falls back to interpret +Guile first tries to load @var{library} as the absolute file name of a shared +library. If that fails, it then falls back to interpret @var{library} as just the name of some shared library that will be searched for in the places where shared libraries usually reside, such as @file{/usr/lib} and @file{/usr/local/lib}. @var{library} should not contain an extension such as @code{.so}, unless -@var{library} represents the full path to the shared library file. The +@var{library} represents the absolute file name to the shared library. The correct file name extension for the host operating system is provided automatically, according to libltdl's rules (@pxref{Libltdl interface, lt_dlopenext, @code{lt_dlopenext}, libtool, Shared Library Support for --=-=-=--