From: Matt Wette <matt.wette@gmail.com>
To: guile-user@gnu.org
Subject: (dynamic-link "libm") fails [was Re: Integrate Guile with GNU Scientific Library]
Date: Sat, 5 Oct 2019 09:55:40 -0700 [thread overview]
Message-ID: <78ee84e0-0c75-bf55-ae73-4136db094d35@gmail.com> (raw)
In-Reply-To: <872711be-6794-bb44-3634-b90baf568751@gmail.com>
scheme@(guile-user)> (dynamic-link "libffi")
$1 = #<dynamic-object "libffi">
scheme@(guile-user)> (dynamic-link "libm")
ERROR: In procedure dynamic-link:
In procedure dynamic-link: file: "libm", message: "file not found"
Both libraries are linked into guile, so being already linked is not an
issue.
However:
mwette$ file /usr/lib/x86_64-linux-gnu/libm.so
/usr/lib/x86_64-linux-gnu/libm.so: ASCII text
mwette$ cat /usr/lib/x86_64-linux-gnu/libm.so
/* GNU ld script
*/
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib/x86_64-linux-gnu/libm.so.6 AS_NEEDED (
/usr/lib/x86_64-linux-gnu/libmvec_nonshared.a
/lib/x86_64-linux-gnu/libmvec.so.1 ) )
This is an apparent redirection. I think this is a bug (or feature) of
dlopen:
mwette$ cat z2.c
#include <stdio.h>
#include <dlfcn.h>
int main() {
void *p;
p = dlopen("/usr/lib/x86_64-linux-gnu/libm.so", RTLD_NOW);
printf("%p\n", p);
}
mwette$ gcc z2.c -ldl
mwette$ ./a.out
(nil)
Matt
On 10/3/19 6:10 PM, Matt Wette wrote:
> $ guild compile-ffi gsl-sort.ffi
> ...
> ERROR: In procedure dynamic-link:
> In procedure dynamic-link: file: "libm", message: "file not found"
>
> So for some reason the linker is not finding libm.so on my Unbuntu.
> I will need to look into that.
prev parent reply other threads:[~2019-10-05 16:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-03 7:28 Integrate Guile with GNU Scientific Library Freeduck via General Guile related discussions
2019-10-04 1:10 ` Matt Wette
2019-10-04 14:32 ` Unknown
2019-10-04 22:41 ` Matt Wette
2019-10-05 16:55 ` Matt Wette [this message]
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=78ee84e0-0c75-bf55-ae73-4136db094d35@gmail.com \
--to=matt.wette@gmail.com \
--cc=guile-user@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).