* FFI nuisance @ 2011-03-01 3:27 Aidan Gauland 2011-03-02 10:47 ` Ludovic Courtès 0 siblings, 1 reply; 7+ messages in thread From: Aidan Gauland @ 2011-03-01 3:27 UTC (permalink / raw) To: guile-user [-- Attachment #1: Type: text/plain, Size: 658 bytes --] Hi, 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', so because of the `.0' at the end, (dynamic-link "libSDL-1.2") fails to find the file, even if I give it the full path name (dynamic-link "/usr/lib/libSDL-1.2.so.0"). I can work around this by making a symlink `libSDL-1.2.so' to `libSDL-1.2.so.0'. I really think that it should be possible to load a so file that doesn't end in .so without having to touch the filesystem. Is there a way to do this, or should I submit a feature request? Regards, Aidan Gauland [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FFI nuisance 2011-03-01 3:27 FFI nuisance Aidan Gauland @ 2011-03-02 10:47 ` Ludovic Courtès 2011-03-02 14:49 ` Andreas Rottmann 0 siblings, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2011-03-02 10:47 UTC (permalink / raw) To: guile-user Hi, Aidan Gauland <aidalgol@no8wireless.co.nz> 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. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FFI nuisance 2011-03-02 10:47 ` Ludovic Courtès @ 2011-03-02 14:49 ` Andreas Rottmann 2011-03-02 15:30 ` Ludovic Courtès 2011-03-02 18:43 ` Aidan Gauland 0 siblings, 2 replies; 7+ messages in thread From: Andreas Rottmann @ 2011-03-02 14:49 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guile-user ludo@gnu.org (Ludovic Courtès) writes: > Hi, > > Aidan Gauland <aidalgol@no8wireless.co.nz> 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). Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FFI nuisance 2011-03-02 14:49 ` Andreas Rottmann @ 2011-03-02 15:30 ` Ludovic Courtès 2011-03-02 18:43 ` Aidan Gauland 1 sibling, 0 replies; 7+ messages in thread From: Ludovic Courtès @ 2011-03-02 15:30 UTC (permalink / raw) To: Andreas Rottmann; +Cc: guile-user Hi, Andreas Rottmann <a.rottmann@gmx.at> writes: > ludo@gnu.org (Ludovic Courtès) writes: >> >> Aidan Gauland <aidalgol@no8wireless.co.nz> 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). Unfortunately, I think this cannot be done portably, because the mapping of a library’s set of supported interfaces to the SONAME and file name is system-dependent, at least when using Libtool. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FFI nuisance 2011-03-02 14:49 ` Andreas Rottmann 2011-03-02 15:30 ` Ludovic Courtès @ 2011-03-02 18:43 ` Aidan Gauland 2011-03-02 23:31 ` Andreas Rottmann 2011-03-30 17:21 ` Andy Wingo 1 sibling, 2 replies; 7+ messages in thread From: Aidan Gauland @ 2011-03-02 18:43 UTC (permalink / raw) To: guile-user [-- Attachment #1: Type: text/plain, Size: 2055 bytes --] On Wed, Mar 02, 2011 at 03:49:22PM +0100, Andreas Rottmann wrote: > ludo@gnu.org (Ludovic Courtès) writes: > > > Hi, > > > > Aidan Gauland <aidalgol@no8wireless.co.nz> 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 #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FFI nuisance 2011-03-02 18:43 ` Aidan Gauland @ 2011-03-02 23:31 ` Andreas Rottmann 2011-03-30 17:21 ` Andy Wingo 1 sibling, 0 replies; 7+ messages in thread From: Andreas Rottmann @ 2011-03-02 23:31 UTC (permalink / raw) To: guile-user Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > On Wed, Mar 02, 2011 at 03:49:22PM +0100, Andreas Rottmann wrote: >> ludo@gnu.org (Ludovic Courtès) writes: >> >> > Hi, >> > >> > Aidan Gauland <aidalgol@no8wireless.co.nz> 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? > You are doing nothing wrong, that seems to be a limitation of Guile. I just wrote a mail regarding that to guile-devel, unfortunatly it doesn't show up in the mail archive yet; check <http://lists.gnu.org/archive/html/guile-devel/2011-03/threads.html> in a few hours -- it should be there then. Regards, Rotty -- Andreas Rottmann -- <http://rotty.yi.org/> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FFI nuisance 2011-03-02 18:43 ` Aidan Gauland 2011-03-02 23:31 ` Andreas Rottmann @ 2011-03-30 17:21 ` Andy Wingo 1 sibling, 0 replies; 7+ messages in thread From: Andy Wingo @ 2011-03-30 17:21 UTC (permalink / raw) To: guile-user On Wed 02 Mar 2011 19:43, Aidan Gauland <aidalgol@no8wireless.co.nz> writes: > 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? Nothing. It is an ltdl bug. I just sent a mail to their list: http://thread.gmane.org/gmane.lisp.guile.bugs/5387 Thanks for the report, Andy -- http://wingolog.org/ ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-30 17:21 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-03-01 3:27 FFI nuisance Aidan Gauland 2011-03-02 10:47 ` Ludovic Courtès 2011-03-02 14:49 ` Andreas Rottmann 2011-03-02 15:30 ` Ludovic Courtès 2011-03-02 18:43 ` Aidan Gauland 2011-03-02 23:31 ` Andreas Rottmann 2011-03-30 17:21 ` Andy Wingo
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).