From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laura Lazzati Subject: Re: [outreach] Help trying to create R package Date: Mon, 15 Oct 2018 19:47:38 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCBfB-0007fJ-M1 for guix-devel@gnu.org; Mon, 15 Oct 2018 18:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCBfA-0005FX-AZ for guix-devel@gnu.org; Mon, 15 Oct 2018 18:48:37 -0400 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: Guix-devel , Ricardo Wurmus , =?UTF-8?B?QmrDtnJuIEjDtmZsaW5n?= , =?UTF-8?Q?Ludovic_Court=C3=A8s?= Hi! I don't know why when I reppied to all in my last mail some of you were not included On Sat, Oct 13, 2018 at 9:40 PM Laura Lazzati wrote: > > On Sat, Oct 13, 2018 at 3:25 PM Catonano wrote: > > > > Hi Laura ! > > > > Il giorno sab 13 ott 2018 alle ore 15:37 Laura Lazzati 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 availab= le in Guix, i believe. > > > > If you want to package a R based package for Guix you can use the so ca= lled 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 y= ou the recipe of your R package written in scheme > > > > You could append such definition to an existing Guix file (probably wit= h 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 I've reading the documentation as well as trying some commands,and there are some problems I am facing. I don't know what I am doing wrong. First, I ran: $ guix package -s r-* | recsel -p name >> resultOfSearchingRpackages.txt And reading the output file, I found that the packages belonging to R that are available are: name: r-rtracklayer name: r-rcas name: r-qtl name: r-ggridges name: r-feather I also took a look at each of them with $guix package --show=3DPACKAGENAME Then, I tried: $ guix import cran --archive=3Dbioconductor tracklayer But got this output: acktrace: 17 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 16 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 15 (_ #(#(#))) In guix/ui.scm: 1578:12 14 (run-guix-command _ . _) In guix/scripts/import.scm: 114:11 13 (guix-import . _) In guix/scripts/import/cran.scm: 107:23 12 (guix-import-cran . _) In guix/memoization.scm: 98:0 11 (_ # ("tracklayer" #) _) In unknown file: 10 (_ # =E2=80=A6) In guix/import/cran.scm: 349:12 9 (_ _ _) 183:21 8 (fetch-description _ "tracklayer") 160:15 7 (latest-bioconductor-package-version _) In ice-9/boot-9.scm: 829:9 6 (catch _ _ # =E2=80=A6) In guix/import/cran.scm: 153:36 5 (_) In ice-9/boot-9.scm: 829:9 4 (catch _ _ # =E2=80=A6) In guix/http-client.scm: 182:20 3 (_) 88:25 2 (http-fetch _ #:port _ #:text? _ #:buffered? _ # _ # _ # =E2= =80=A6) In guix/build/download.scm: 398:4 1 (open-connection-for-uri _ #:timeout _ # _) 296:6 0 (tls-wrap # _ # _) guix/build/download.scm:296:6: In procedure tls-wrap: X.509 certificate of 'bioconductor.org' could not be verified: signer-not-found invalid I don't know what's wrong, could you give me a hand? > > In order to append the definition of your package to an existing Guix f= ile you will probably need some more guidance, but for now you could just r= un 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-imp= ort.html#Invoking-guix-import > > > Thanks both of you for helping with this, since I was reading all the > reference guide to see how to create a package for whole R while > thinking that there is no time for that. > > > > > 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=3D"$HOME/.guix-profile/lib/local= e" > > > substitute: > > > substitute: See the "Application Setup" section in the manual, for mo= re info. > > > > > > When I run guix package -I I get: > > > hello 2.10 out /gnu/store/bihfrh609gkxb9dp7n96wlpigiv3krfy-h= ello-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=3D"$HOME/.guix-profile/lib/locale" > > > export PATH=3D"/home/laura/.guix-profile/bin${PATH:+:}$PATH" > > > export CPATH=3D"/home/laura/.guix-profile/include${CPATH:+:}$CPAT= H" > > > export LIBRARY_PATH=3D"/home/laura/.guix-profile/lib${LIBRARY_PAT= H:+:}$LIBRARY_PATH" > > > > when running Guix on top of a foreign distribution, this problem is ver= y 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 no= t so well) > > > > But this is not critical, you can successfully package some R based pac= kages for Guix anyway > Thank you for this too , I have been stuck with it without knowing > "why is this happening if I have already exported, sourced just in > case" and so on. It is a warning and things end up installed but you > never know if it can affect something else. > > > > Hope this helps ! Regards! Laura