guile-user
[Top][All Lists]
Advanced

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

Re: Use GUIX installed packages / libraries in Guile


From: Catonano
Subject: Re: Use GUIX installed packages / libraries in Guile
Date: Sat, 12 Jan 2019 17:52:00 +0100

Il giorno sab 12 gen 2019 alle ore 17:20 Zelphir Kaltstahl <
address@hidden> ha scritto:

> On 1/12/19 1:49 PM, swedebugia wrote:
> > Zelphir Kaltstahl <address@hidden> skrev: (12 januari 2019
> > 13:18:49 CET)
> >
> >     Hi,
> >
> >     A while ago I installed Guix, initially only to be able to install
> >     GNUTLS, to be able to make HTTPS requests with the standard library's
> >     web client procedures http-get and similar.
> >
> >     Now I have Guix and I installed GNUTLS, but Guile does not know
> where it
> >     is to find GNUTLS. For example the following code will tell me that
> >     GNUTLS is required:
> >
> >     ~~~
> >     (use-modules (web client)
> >                  #;(ice-9 receive))
> >
> >     (call-with-values
> >         (lambda ()
> >           (http-get "https://duckduckgo.com";
> >                     #:port (open-socket-for-uri "https://duckduckgo.com
> ")
> >                     #:version '(1 . 1)
> >                     #:keep-alive? #f
> >                     #:headers '()
> >                     #:decode-body? #t
> >                     #:streaming? #f))
> >       (lambda (response response-text)
> >         (display response)
> >         (display response-text)))
> >     ~~~
> >
> >     Output:
> >
> >     ~~~
> >     (… some backtrace here …)
> >
> >     web/client.scm:105:2: In procedure tls-wrap:
> >     Throw to key `gnutls-not-available' with args `("(gnutls) module not
> available")'.
> >     ~~~
> >
> >     I located something at:
> >
> >
>  
> /gnu/store/z0g1wsiw2n5d1hspbj7xkhj6vnc2qlvp-gnutls-3.5.18/share/guile/site/2.2/gnutls.scm
> >
> >     Also I found:
> >
> >     ~~~
> >     ll /gnu/store/ | grep gnutls
> >     -r--r--r--   2 root root           735 Jan  1  1970
> 259dacgq58awd2l8zq7i2p16l7j6a283-gnutls-3.5.18.tar.xz.drv
> >     -r--r--r--   2 root root          2834 Jan  1  1970
> 7iajc4kiddris32jdkfn28gykvs25g1w-gnutls-3.5.18.tar.xz-builder
> >     -r--r--r--   2 root root          3656 Jan  1  1970
> csji08kzw1rswy13jm7xk7f0rp130d55-gnutls-3.5.18.drv
> >     -r--r--r--   2 root root          1315 Jan  1  1970
> ivyr33ppfcwkdmkyhk1p6ky7mijanhjj-gnutls-3.5.18.tar.xz.drv
> >     -r--r--r--   2 root root          4414 Jan  1  1970
> kd0x57fwwvqqx8jircvs4bcawxskqzmh-gnutls-3.5.18-guile-builder
> >     -r--r--r--   4 root root           579 Jan  1  1970
> l8ap56kw9nan13lkgrg8v8ayzfrn2gc5-gnutls-skip-trust-store-test.patch
> >     -r--r--r--   4 root root          1008 Jan  1  1970
> sfg2p3l0363yk3s7hrzs1032fl0dga64-gnutls-skip-pkgconfig-test.patch
> >     ~~~
> >
> >     For this and other libraries: How do I make Guile automatically use
> >     libraries installed through Guix?
> >
> >
> >     Here is some more technical detail:
> >
> >     - I am using a Xubuntu 18.04 (lsb_release -d: Description:    Ubuntu
> >     18.04.1 LTS)
> >     - Guile version: 2.2.4
> >     - Guix version: 0.16.0 (installed binary distribution using the
> install
> >     script from the website)
> >     - I have the following in my ~/.bashrc related to Guile and Guix:
> >
> >     ~~~
> >     # Guile Scheme Load Path
> >     export GUILE_LOAD_PATH=/home/xiaolong/development/Guile/libs  #
> (this is where I put manually built and installed libraries)
> >     # GNU GUIX locales
> >     export GUIX_LOCPATH="${HOME}/.guix-profile/lib/locale"
> >     export PATH="${HOME}/.guix-profile/bin${PATH:+:}$PATH"
> >     ~~~
> >
> >     - I have the following in my ~/.profile relating to Guile / Guix:
> >
> >     ~~~
> >     # changes for GNU GUIX
> >     export GUIX_PROFILE="$HOME/.guix-profile"
> >     source "$GUIX_PROFILE/etc/profile"
> >     export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale"
> >     export LC_ALL="en_US.UTF-8"
> >     ~~~
> >
> >     Regards,
> >
> >     Zelphir
> >
> >
> > Your path is probably wrong.
> > Try installing guile in your profile and guix will tell you which path
> > to set.
> > --
> > Sent from my p≡p for Android.
>
>
> Hey,
>
> Thanks for your quick response. I have a few questions:
>
> * What do you mean by "install it in your profile"? Do you mean I should
> add the lines for Guile in my ~/.profile?
>


Disclaimer: I'm not sure how things go on Guix (without the final SD) and I
haven't been using Guix for some time now so I don't remember well

In GuixSD (please notice the final SD) the user profile and the root
profile are distinct
I don't remember if they are distinct in Guix too

But when I used GuixSD I experienced this fact: Guile libraries installed
in your user profile were not accessible to the Guix root profile Guile. I
had to install Guile in my user profile along with some Guile based
packages.

If you installed Gnutls in your user profile (that is, if you installed
gnutls with the line: "guix package -i gnutls" as a normal user) then the
Guile in the Guix root profile may be not able to acces your gnutls
installation

So, I guess Swedebugia means installing Guile through Guix, along with
Gnutls

Like this:

guix package -i guile

If you don't do this, it's possible that you are using the Guile provided
by Ubuntu

Or that you are using the Guile provided by the Guix root profile (again: I
don't remember if this distinction applies to Guix too)

In fact I'm inclined to think this is what is happening because you
reported that you are using Guile 2.2.4 but I'm pretty sure that the Guile
in Ubuntu is Guile 2.2.3.
I know because I am using that one, I haven't got Guix on my machine

Was that helpful ?


> * How or where does Guix tell me which path I have to set? I moved the
> Guile stuff to my ~/.profile and ran a few Guix commands (install a
> package, upgrade packages, pull), but it did not mention anything about
> my path.
>

I haven't been using Guix for a while now so I'll pass on this one

But please consider asking these questions on the guix-help mailing list !


reply via email to

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