unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#49232: load-foreign-library does not find versioned .so files
@ 2021-06-26 11:37 Sören Tempel
  2022-07-23 11:09 ` [PATCH] load-foreign-library: perform substring match on library files soeren
  0 siblings, 1 reply; 7+ messages in thread
From: Sören Tempel @ 2021-06-26 11:37 UTC (permalink / raw)
  To: 49232

Hello,

Many Linux distributions (e.g. Alpine Linux and Debian) split packages
into multiple subpackages. For instance, library development headers are
usually separated from .so files since the former are commonly not
needed as a run-time dependency. As part of this split, only versioned
sonames are commonly provided by library packages (e.g.
libexample.so.4.2.0), the symbolic link to the current .so (e.g.
libexample.so -> libexample.so.4.2.0) is provided in a separate
development subpackage for every library. This is done to ensure that
the unversioned .so symbolic link is only used during compilation, for
loading purposes a versioned .so name should always be used. This eases
rebuilding packages on ABI changes (i.e. soname version bumps).

Many scripting languages, e.g. python, implement a fuzzy search in their
FFI library to also match .so files with version numbers [1].
Unfortunately, guile's load-foreign-library does not do so. That is,
(load-foreign-library "libexample") will only match libexample.so but
not libexample.so.4.2.0. As a consequence, guile packages using FFI will
always require a run-time dependency on development subpackages
(including headers), only for the .so symbolic link, which is very
inconvenient for us at Alpine [2].

Would it be possible to modify load-foreign-library to also match .so
file names with a version postfix (like python does for instance)?

Please CC me, I am not subscribed to the list.

Greetings,
Sören

[1]: https://docs.python.org/3/library/ctypes.html?highlight=find_library#ctypes.util.find_library
[2]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12783





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-20 18:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-26 11:37 bug#49232: load-foreign-library does not find versioned .so files Sören Tempel
2022-07-23 11:09 ` [PATCH] load-foreign-library: perform substring match on library files soeren
2022-07-23 13:17   ` Maxime Devos
2022-07-24 12:16     ` Sören Tempel
2022-08-20 13:52       ` Sören Tempel
2022-08-20 18:30         ` bug#49232: " Maxime Devos
2022-08-20 18:30       ` Maxime Devos

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).