help-guix
[Top][All Lists]
Advanced

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

Re: How do I set LTDL_LIBRARY_PATH?


From: Ludovic Courtès
Subject: Re: How do I set LTDL_LIBRARY_PATH?
Date: Tue, 29 Sep 2020 16:02:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi,

divoplade <d@divoplade.fr> skribis:

> I have written a small C guile module to access (some parts of) the GNU
> nettle library. I can install it with guix, but then if I try to load
> it from within an environment:
>
> guix environment --ad-hoc guile guile-nettle -- guile <<EOF
> (load-extension "libguile-nettle" "init_nettle")
> EOF
>
> guile does not find "libguile-nettle" (In procedure dynamic-link: file:
> "libguile-nettle", message: "file not found")
>
> This is because guile expects it to be in LTDL_LIBRARY_PATH, and guix
> does not set that up.

Common practice is to arrange so that bindings refer to C libraries by
absolute file name.  For example:

--8<---------------cut here---------------start------------->8---
$ grep /libgcrypt $(find $(guix build guile-gcrypt) -name \*config.scm)
  "/gnu/store/qc3k3kd458pgrqsc7ih641160q81npwq-libgcrypt-1.8.5/lib/libgcrypt")
$ grep /libz $(find $(guix build guile-zlib) -name \*config.scm)
  "/gnu/store/rykm237xkmq7rl1p0nwass01p090p88x-zlib-1.2.11/lib/libz")
--8<---------------cut here---------------end--------------->8---

HTH!

Ludo’.



reply via email to

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