GNU bug report logs - #74532
with-extensions does not add native extensions to the load path

Previous Next

Package: guix;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Mon, 25 Nov 2024 17:51:01 UTC

Severity: normal

Full log


Message #8 received at 74532 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 74532 <at> debbugs.gnu.org
Subject: Re: bug#74532: with-extensions does not add native extensions to
 the load path
Date: Thu, 28 Nov 2024 08:54:02 +0100
Hi,

Tomas Volf <~@wolfsden.cz> skribis:

> The documentation for `with-extensions' says:
>
>> In the same vein, sometimes you want to import not just pure-Scheme
>> modules, but also “extensions” such as Guile bindings to C libraries
>> or other “full-blown” packages.

It’s not just bindings but also pure Scheme libraries like Guile-JSON.

> However it does not actually add those C libraries into
> (guile-extensions-path), which means that trying to actually use a
> library imported this way will lead to an error.

[...]

>    190:25  1 (load-foreign-library _ #:extensions _ #:search-ltdl-library-path? _ # _ # _ # …)
> In unknown file:
>            0 (dlopen "libguile-yamlpp.so" 1)
>
> ERROR: In procedure dlopen:
> In procedure dlopen: file "libguile-yamlpp.so", message "libguile-yamlpp.so: cannot open shared object file: No such file or directory"

Usually, packages like these (guile-gnutls, guile-git, guile-ssh, etc.)
have their .so absolute file name hard-coded, which sidesteps this
problem entirely.  I recommend doing that for guile-yamlpp as well.

That said, it would probably make sense to arrange for ‘with-extensions’
to set GUILE_EXTENSIONS_PATH.

Ludo’.

PS: Your MUA sets “Mail-Followup-To: bug-guix <at> gnu.org”, which is kinda
    annoying because that’s the wrong address when replying to a bug.
    :-)




This bug report was last modified 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.