guile-user
[Top][All Lists]
Advanced

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

Re: FFI nuisance


From: Aidan Gauland
Subject: Re: FFI nuisance
Date: Thu, 3 Mar 2011 07:43:39 +1300
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Mar 02, 2011 at 03:49:22PM +0100, Andreas Rottmann wrote:
> address@hidden (Ludovic Courtès) writes:
> 
> > Hi,
> >
> > Aidan Gauland <address@hidden> writes:
> >
> >> I'm trying to use SDL through Guile's dynamic FFI.  There's a slight
> >> nuisance with the procedure `dynamic-link': the name of the so file on
> >> my system (Debian squeeze) is `libSDL-1.2.so.0'
> >
> > Isn’t it a packaging bug?  There should be a
> > ‘libSDL-1.2.so’ -> ‘libSDL-1.2.so.0’ symlink.
> >
> Only in the -dev package, which should not be required for running Guile
> programs that excercise the FFI.  It is also good practice to use the
> entire SONAME of the library in the Guile program, as to avoid random
> breakage when the ABI changes (which does imply a SONAME bump on
> sanely-maintained libraries).

When I try to use the entire soname of the library, I get an error.
(`libSDL-1.2.so.0' is actually a link to the regular file
`libSDL-1.2.so.0.11.3'.)  What am I doing wrong?

Example session:
GNU Guile 2.0.0
Copyright (C) 1995-2011 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (define sdl (dynamic-link "libSDL-1.2.so.0.11.3"))
ERROR: In procedure dynamic-link:
ERROR: In procedure dynamic-link: file: "libSDL-1.2.so.0.11.3", message: "file 
not found"

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In current input:
      1:0  1 (#<procedure a34a0d0 at <current input>:1:0 ()>)
In unknown file:
           0 (dynamic-link "libSDL-1.2.so.0.11.3")
scheme@(guile-user) [1]> ,q
scheme@(guile-user)> ,q

By the way, there is a symlink libSDL.so -> libSDL-1.2.so.11.3, so
there is no packaging bug.  Now I'm trying to figure out how to do as
Andreas says and use the entire soname of the library.

--Aidan

Attachment: signature.asc
Description: Digital signature


reply via email to

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