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: Zelphir Kaltstahl
Subject: Re: Use GUIX installed packages / libraries in Guile
Date: Mon, 14 Jan 2019 00:56:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 1/12/19 5:52 PM, Catonano wrote:
>
>
> Il giorno sab 12 gen 2019 alle ore 17:20 Zelphir Kaltstahl
> <address@hidden <mailto:address@hidden>> ha
> scritto:
>
>     On 1/12/19 1:49 PM, swedebugia wrote:
>     > Zelphir Kaltstahl <address@hidden
>     <mailto: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
Not sure either, but so far I've only noticed one environment / profile
/ thingy that my Guix (not on GuixSD but Xubuntu) uses. If there is a
root profile, I am not aware of it.
>
> 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
Yes, thanks for that clarification!
>
> Like this:
>
> guix package -i guile
>
> If you don't do this, it's possible that you are using the Guile
> provided by Ubuntu
I was using the manually built one, git clone + the usual configure,
make, make install build process.
>
> 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 ?
Yep, thanks, a few things cleared up.
>
>
>     * 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 !
Yep, next time with such case will do : )


reply via email to

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