From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catonano Subject: Re: [outreach] Help trying to create R package Date: Sat, 13 Oct 2018 20:25:06 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000096a51905782053c8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gBObR-0006Rk-3w for guix-devel@gnu.org; Sat, 13 Oct 2018 14:25:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gBObN-0004ho-Ns for guix-devel@gnu.org; Sat, 13 Oct 2018 14:25:28 -0400 Received: from mail-yw1-xc29.google.com ([2607:f8b0:4864:20::c29]:42952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gBObM-0004YE-Vd for guix-devel@gnu.org; Sat, 13 Oct 2018 14:25:25 -0400 Received: by mail-yw1-xc29.google.com with SMTP id a197-v6so6165270ywh.9 for ; Sat, 13 Oct 2018 11:25:21 -0700 (PDT) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: laura.lazzati.15@gmail.com Cc: guix-devel , Ricardo Wurmus --00000000000096a51905782053c8 Content-Type: text/plain; charset="UTF-8" Hi Laura ! Il giorno sab 13 ott 2018 alle ore 15:37 Laura Lazzati < laura.lazzati.15@gmail.com> ha scritto: > > Hi! > I'm creating a new thread so that it does not end up messy. > I am reading about defining new packages, and since I have always > installed R with apt, I am trying to do so with ./configure make make > install to have it running on my VM, and then try to create the > package and check if both works you don't need to package R yourself, R is already packaged and available in Guix, i believe. If you want to package a R based package for Guix you can use the so called Cran importer Try this line at the prompt guix import cran your-R-package This line invokes a so called importer and the importer should return you the recipe of your R package written in scheme You could append such definition to an existing Guix file (probably with some minor tweaks) and that should allow you to build the package and all the dependencies will be taken care of automatically I did this myself some time ago In order to append the definition of your package to an existing Guix file you will probably need some more guidance, but for now you could just run the importer and let us now what you obtained Probably you'll need to build the package, then modify the recipe a bit, build it again... for a few times; that's ok You can read about the importers here https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-import.html#Invoking-guix-import > substitute: guile: warning: failed to install locale > substitute: hint: Consider installing the `glibc-utf8-locales' or > `glibc-locales' package and > substitute: defining `GUIX_LOCPATH', along these lines: > substitute: > substitute: guix package -i glibc-utf8-locales > substitute: export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" > substitute: > substitute: See the "Application Setup" section in the manual, for more info. > > When I run guix package -I I get: > hello 2.10 out /gnu/store/bihfrh609gkxb9dp7n96wlpigiv3krfy-hello-2.10 > recutils 1.7 out > /gnu/store/6h02na6yz9smc7c7g62ss03kp4yhqpc1-recutils-1.7 > glibc-locales 2.27 out > /gnu/store/s28fmfrq8r0c688x59cj0fcyh2pv87nj-glibc-locales-2.27 > glibc-utf8-locales 2.27 out > /gnu/store/mbns811n696fl7g060cx6jqjh75mlj8i-glibc-utf8-locales-2.27 > gfortran 7.3.0 out > /gnu/store/mw65pcca7x7mmq8v2r427f3plrahhyxl-gfortran-7.3.0 > zlib 1.2.11 out /gnu/store/fxiwj2wpp11sif613axdax7gmwzsg6kp-zlib-1.2.11 > bzip2 1.0.6 out /gnu/store/rw1ilvs76rf2p4p0bi1fx3bffprwwb7g-bzip2-1.0.6 > > And even at the bottom of my .bashrc I have: > > export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" > export PATH="/home/laura/.guix-profile/bin${PATH:+:}$PATH" > export CPATH="/home/laura/.guix-profile/include${CPATH:+:}$CPATH" > export LIBRARY_PATH="/home/laura/.guix-profile/lib${LIBRARY_PATH:+:}$LIBRARY_PATH" when running Guix on top of a foreign distribution, this problem is very common. I lived with this for several months myself Reaching a solution to this can be tedious and often the solutions are short lived Because this has to do with how the basic C libraries provided by Guix and those provided by the foreign distro relate with each other (usually not so well) But this is not critical, you can successfully package some R based packages for Guix anyway Hope this helps ! --00000000000096a51905782053c8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Laura !

Il giorno sab 13 ott 2018 alle ore = 15:37 Laura Lazzati <laura= .lazzati.15@gmail.com> ha scritto:
>
> =C2=A0Hi!
>= I'm creating a new thread so that it does not end up messy.
> I = am reading about defining new packages, and since I have always
> ins= talled R with apt, I am trying to do so with ./configure make make
> = install to have it running on my VM, and then try to create the
> pac= kage and check if both works

you don't need to package R yoursel= f, R is already packaged and available in Guix, i believe.

If you wa= nt to package a R based package for Guix you can use the so called Cran imp= orter

Try this line at the prompt

guix import cran your-R-pac= kage

This line invokes a so called importer and the importer should = return you the recipe of your R package written in scheme

You could = append such definition to an existing Guix file (probably with some minor t= weaks) and that should allow you to build the package and all the dependenc= ies will be taken care of automatically

I did this myself some time = ago

In order to append the definition of your package to an existing= Guix file you will probably need some more guidance, but for now you could= just run the importer and let us now what you obtained

Probably you= 'll need to build the package, then modify the recipe a bit, build it a= gain... for a few times; that's ok

You can read about the import= ers here

https://www.gnu.org/s= oftware/guix/manual/en/html_node/Invoking-guix-import.html#Invoking-guix-im= port


> substitute: guile: warning: failed to install loca= le
> substitute: hint: Consider installing the `glibc-utf8-locales= 9; or
> `glibc-locales' package and
> substitute: defining = `GUIX_LOCPATH', along these lines:
> substitute:
> substitu= te: =C2=A0 =C2=A0 =C2=A0guix package -i glibc-utf8-locales
> substitu= te: =C2=A0 =C2=A0 =C2=A0export GUIX_LOCPATH=3D"$HOME/.guix-profile/lib= /locale"
> substitute:
> substitute: See the "Applica= tion Setup" section in the manual, for more info.
>
> When= I run guix package -I I get:
> hello =C2=A0 =C2=A02.10 =C2=A0 =C2=A0= out =C2=A0 =C2=A0/gnu/store/bihfrh609gkxb9dp7n96wlpigiv3krfy-hello-2.10
= > recutils =C2=A0 =C2=A01.7 =C2=A0 =C2=A0out
> /gnu/store/6h02na6y= z9smc7c7g62ss03kp4yhqpc1-recutils-1.7
> glibc-locales =C2=A0 =C2=A02.= 27 =C2=A0 =C2=A0out
> /gnu/store/s28fmfrq8r0c688x59cj0fcyh2pv87nj-gli= bc-locales-2.27
> glibc-utf8-locales =C2=A0 =C2=A02.27 =C2=A0 =C2=A0o= ut
> /gnu/store/mbns811n696fl7g060cx6jqjh75mlj8i-glibc-utf8-locales-2= .27
> gfortran =C2=A0 =C2=A07.3.0 =C2=A0 =C2=A0out
> /gnu/store= /mw65pcca7x7mmq8v2r427f3plrahhyxl-gfortran-7.3.0
> zlib =C2=A0 =C2=A0= 1.2.11 =C2=A0 =C2=A0out =C2=A0 =C2=A0/gnu/store/fxiwj2wpp11sif613axdax7gmwz= sg6kp-zlib-1.2.11
> bzip2 =C2=A0 =C2=A01.0.6 =C2=A0 =C2=A0out =C2=A0 = =C2=A0/gnu/store/rw1ilvs76rf2p4p0bi1fx3bffprwwb7g-bzip2-1.0.6
>
&g= t; And even at the bottom of my .bashrc I have:
>
> =C2=A0 expo= rt GUIX_LOCPATH=3D"$HOME/.guix-profile/lib/locale"
> =C2=A0= =C2=A0 export PATH=3D"/home/laura/.guix-profile/bin${PATH:+:}$PATH&qu= ot;
> =C2=A0 =C2=A0 export CPATH=3D"/home/laura/.guix-profile/in= clude${CPATH:+:}$CPATH"
> =C2=A0 =C2=A0 export LIBRARY_PATH= =3D"/home/laura/.guix-profile/lib${LIBRARY_PATH:+:}$LIBRARY_PATH"=

when running Guix on top of a foreign distributio= n, this problem is very common.
I lived with this for severa= l months myself

Reaching a solution to this can be= tedious and often the solutions are short lived

Because this has to do with how the basic C libraries provided by Guix a= nd those provided by the foreign distro relate with each other (usually not= so well)

But this is not critical, you can succes= sfully package some R based packages for Guix anyway

Hop= e this helps !
--00000000000096a51905782053c8--