guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't use dynamic-link with any shared object file


From: Jan Wedekind
Subject: Re: Can't use dynamic-link with any shared object file
Date: Mon, 26 Dec 2016 22:24:21 +0000 (GMT)
User-agent: Alpine 2.11 (DEB 23 2013-08-11)

On Mon, 26 Dec 2016, address@hidden wrote:

Hello,
I am working on a project that involves writing some core
functionality in C/C++ and composing behavior in Guile (as I
understand it, this one of the ways that Guile was intended to be
used). However, I cannot load any libraries with dynamic-link. I first
encountered this with my code, but I'm going to use libc in my
examples since the error message is identical, libc is ubiquitous, and
it is the library that is given as an example in the manual. I am on
Arch Linux and I am fully upgraded; this is the error message that I
get:
ERROR: In procedure dynamic-link:
ERROR: in procedure dynamic-link: file "libc.so", message: "file not
found"
I've seen dynamic-link called with and without the 'so' prefix in
various places, so I have tried using "c", "libc", and "libc.so" as
the argument in my call to dynamic-link. They all produced the same
error message. Other people with a similar problem have been asked to
show the output of `ldd -r` or `ldd -d`. Both of them give me the same
output:
ldd: warning: you do not have execute permission for "/lib/libc.so"not
a dynamic executable
Do you know why this error would occur? Any help you can give me would
be appreciated.
Thanks,saffronsnail


I think "libc" is normally loaded already. E.g. the C function "abs" can be accessed as follows:

    (define main (dynamic-link))
    (define cabs (pointer->procedure long (dynamic-func "abs" main) (list 
long)))
    (cabs -42)
    ; 42

Regards
Jan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]