From: Andy Wingo <wingo@pobox.com>
To: bug-libtool@gnu.org
Cc: bug-guile@gnu.org
Subject: documentation / behavior discrepancy with lt_dlopenext
Date: Wed, 30 Mar 2011 19:19:18 +0200 [thread overview]
Message-ID: <m3oc4s1q7d.fsf@unquote.localdomain> (raw)
Hello list,
The ltdl docs say:
— 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) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libSDL-1.2.so.0.11.3.so", O_RDONLY) = -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
--
http://wingolog.org/
next reply other threads:[~2011-03-30 17:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 17:19 Andy Wingo [this message]
2011-03-30 19:20 ` documentation / behavior discrepancy with lt_dlopenext Ralf Wildenhues
2011-03-30 21:36 ` Andy Wingo
2011-03-31 1:31 ` Bob Friesenhahn
2011-03-31 8:33 ` Andy Wingo
2011-07-01 15:03 ` Andy Wingo
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3oc4s1q7d.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=bug-guile@gnu.org \
--cc=bug-libtool@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).