From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs,gmane.comp.gnu.libtool.bugs Subject: documentation / behavior discrepancy with lt_dlopenext Date: Wed, 30 Mar 2011 19:19:18 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1301505558 883 80.91.229.12 (30 Mar 2011 17:19:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2011 17:19:18 +0000 (UTC) Cc: bug-guile@gnu.org To: bug-libtool@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Mar 30 19:19:13 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4z33-0001Z6-IG for guile-bugs@m.gmane.org; Wed, 30 Mar 2011 19:19:13 +0200 Original-Received: from localhost ([127.0.0.1]:34760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4z32-0004gV-VA for guile-bugs@m.gmane.org; Wed, 30 Mar 2011 13:19:13 -0400 Original-Received: from [140.186.70.92] (port=36179 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4z2w-0004gP-8g for bug-guile@gnu.org; Wed, 30 Mar 2011 13:19:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4z2u-00080t-QK for bug-guile@gnu.org; Wed, 30 Mar 2011 13:19:06 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:37280 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4z2u-00080U-NR; Wed, 30 Mar 2011 13:19:04 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 1FEEA4742; Wed, 30 Mar 2011 13:20:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=sasl; bh=GqluE8fu2uEwKR5LYWrmV9bDU o8=; b=GAdi89AlGpGcsIY648F8/ruh33B0Likwt+r0AkxVsbcoTrSDTH8pnF0p4 c7IR3xqotVzAMRw0q/sjCJr9EnZfVGn5qFF1rJRQlPFACzlhj+eyMNU1Sl6KKm2M olEg0juCvBjt9RRF15VUdriUMG3OLpUqXtWoemJKcSDsWi0pHc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=sasl; b=oNt5zadWa0v60lWXD10 oCmEiawm80rzrXQmQtgduc5VObwQbhQRWkLk3O6Do4Dh0bN/xPSKGGKRomM/A0PC ayJLzl9f1T1yVFxaTN/W5utnC2A+MpBykphpvTQ7gF+MmWvTesW6WAJ0CMJRjr5v IPrpzXaaADatx9vd5oFycrEI= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 07B4E4741; Wed, 30 Mar 2011 13:20:48 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 52EEE4740; Wed, 30 Mar 2011 13:20:46 -0400 (EDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 0DB2951C-5AF2-11E0-8BB1-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5387 gmane.comp.gnu.libtool.bugs:7736 Archived-At: Hello list, The ltdl docs say: =E2=80=94 Function: lt_dlhandle lt_dlopenext (const char *filename) The same as lt_dlopen, except that it tries to append different file name extensions to the file name. If the file with the file name FILENAME cannot be found libltdl tries to append the following extensions: [...] However, there are cases in which lt_dlopenext does not look for a bare filename. Specifically the code does: if (!filename || !advise || !advise->try_ext || has_library_ext (filename)) try the bare file else if (filename && *filename) try extensions... So, we see that if has_library_ext is FALSE, we don't try the bare file. But that check fails for full paths, like "/usr/lib64/libSDL-1.2.so.0.11.3". $ strace guile -c '(dynamic-link "/usr/lib64/libSDL-1.2.so.0.11.3")' [...] open("/usr/lib64/libSDL-1.2.so.0.11.3.la", O_RDONLY) =3D -1 ENOENT (No = such file or directory) open("/usr/lib64/libSDL-1.2.so.0.11.3.so", O_RDONLY) =3D -1 ENOENT (No = such file or directory) [...] The documentation and the code do not agree. I propose that we fix the code, to add another `stat' (I know) -- of the bare file name, before trying to add extensions, in the dlopenext case. What do you think? Andy --=20 http://wingolog.org/