Re: Seeking suggestions for fixing the R gpg package

2022-05-09 Thread Kyle
Thanks so much, that worked! It was not at all clear to me that such a 
dependency existed or that if it did it would not already be encapsulated by 
GPGME itself. 



On May 6, 2022 4:56:00 AM EDT, zimoun  wrote:
>Hi,
>
>On Thu, 05 May 2022 at 13:37, Kyle Andrews  wrote:
>
>> (propagated-inputs (list r-askpass r-curl))
>> (native-inputs (list pkg-config r-knitr gpgme))
>
>[...]
>
>> 8<-
>> Error: package or namespace load failed for ‘gpg’:
>
>I have looked at all the details, but ’gpg’ seems required, no?
>
>Maybe try to add it as native-inputs.
>
>
>Cheers,
>simon


Re: Seeking suggestions for fixing the R gpg package

2022-05-06 Thread zimoun
Hi,

On Thu, 05 May 2022 at 13:37, Kyle Andrews  wrote:

> (propagated-inputs (list r-askpass r-curl))
> (native-inputs (list pkg-config r-knitr gpgme))

[...]

> 8<-
> Error: package or namespace load failed for ‘gpg’:

I have looked at all the details, but ’gpg’ seems required, no?

Maybe try to add it as native-inputs.


Cheers,
simon



Seeking suggestions for fixing the R gpg package

2022-05-05 Thread Kyle Andrews


Hi,

I want to use the R package gpg which provides bindings to GPGME from
within Guix. Most of the time packaging R things is really easy thanks
to the handy `guix import cran' command. Unfortunately, something is
breaking with GPGME which is making this not work as I
expected. Unfortunately, I don't really have any experience with dealing
with this problem. Can anyone suggest how they would go about debugging
this? 

I opened a bug report on the R gpg, but I don't really know if that's
the appropriate place. There I included the Guix build error report. The
key problem seems to be that

> error: GPGME setting OpenPGP path/home error: Invalid crypto engine

  https://github.com/jeroen/gpg/issues/14

My non-working package code is below:

8<-
(use-modules (guix packages)
 (guix download)
 (guix build-system r)
 (guix git-download)
 ((guix licenses) #:prefix license:)
 (gnu packages pkg-config)
 (gnu packages compression)
 (gnu packages gnupg)
 (gnu packages maths)
 (gnu packages cran)
 (gnu packages statistics)
 (gnu packages gcc))

(define-public r-gpg
  (package
(name "r-gpg")
(version "1.2.6")
(source
 (origin
   (method url-fetch)
   (uri (cran-uri "gpg" version))
   (sha256
(base32 "17rvi3qff2kanqr3g20dzhn48bfh5sv57g0wsamndzcif7rhjhby"
(properties `((upstream-name . "gpg")))
(build-system r-build-system)
(propagated-inputs (list r-askpass r-curl))
(native-inputs (list pkg-config r-knitr gpgme))
(home-page "https://github.com/jeroen/gpg;)
(synopsis "GNU Privacy Guard for R")
(description
 "Bindings to GnuPG for working with OpenGPG (RFC4880) cryptographic 
methods.
Includes utilities for public key encryption, creating and verifying digital
signatures, and managing your local keyring.  Some functionality depends on the
version of GnuPG that is installed on the system.  On Windows this package can
be used together with 'GPG4Win' which provides a GUI for managing keys and
entering passphrases.")
(license license:expat)))
->8

The build of the R package seemed to go fine. It only fails when it
tries to test that the package can be loaded into an R session.

8<-
Using 
PKG_CFLAGS=-I/gnu/store/33x095pip87pxcn23cz8k96jq6bka51s-gpgme-1.15.1/include 
-I/gnu/store/imh6q627pj1jpcxdzjpvdwmlwh8kl5kw-libassuan-2.5.5/include 
-I/gnu/store/pilv2s68v4xamxwk1ahfy7q32j6wnf7l-libgpg-error-1.42/include
Using PKG_LIBS=-L/gnu/store/33x095pip87pxcn23cz8k96jq6bka51s-gpgme-1.15.1/lib 
-lgpgme -L/gnu/store/imh6q627pj1jpcxdzjpvdwmlwh8kl5kw-libassuan-2.5.5/lib 
-lassuan -L/gnu/store/pilv2s68v4xamxwk1ahfy7q32j6wnf7l-libgpg-error-1.42/lib 
-lgpg-error
** libs
gcc 
-I"/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/include" 
-DNDEBUG -I/gnu/store/33x095pip87pxcn23cz8k96jq6bka51s-gpgme-1.15.1/include 
-I/gnu/store/imh6q627pj1jpcxdzjpvdwmlwh8kl5kw-libassuan-2.5.5/include 
-I/gnu/store/pilv2s68v4xamxwk1ahfy7q32j6wnf7l-libgpg-error-1.42/include  
-I/usr/local/include   -fpic  -g -O2  -c encrypt.c -o encrypt.o
gcc 
-I"/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/include" 
-DNDEBUG -I/gnu/store/33x095pip87pxcn23cz8k96jq6bka51s-gpgme-1.15.1/include 
-I/gnu/store/imh6q627pj1jpcxdzjpvdwmlwh8kl5kw-libassuan-2.5.5/include 
-I/gnu/store/pilv2s68v4xamxwk1ahfy7q32j6wnf7l-libgpg-error-1.42/include  
-I/usr/local/include   -fpic  -g -O2  -c engine.c -o engine.o
gcc 
-I"/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/include" 
-DNDEBUG -I/gnu/store/33x095pip87pxcn23cz8k96jq6bka51s-gpgme-1.15.1/include 
-I/gnu/store/imh6q627pj1jpcxdzjpvdwmlwh8kl5kw-libassuan-2.5.5/include 
-I/gnu/store/pilv2s68v4xamxwk1ahfy7q32j6wnf7l-libgpg-error-1.42/include  
-I/usr/local/include   -fpic  -g -O2  -c keys.c -o keys.o
gcc 
-I"/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/include" 
-DNDEBUG -I/gnu/store/33x095pip87pxcn23cz8k96jq6bka51s-gpgme-1.15.1/include 
-I/gnu/store/imh6q627pj1jpcxdzjpvdwmlwh8kl5kw-libassuan-2.5.5/include 
-I/gnu/store/pilv2s68v4xamxwk1ahfy7q32j6wnf7l-libgpg-error-1.42/include  
-I/usr/local/include   -fpic  -g -O2  -c keysig.c -o keysig.o
gcc 
-I"/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/include" 
-DNDEBUG -I/gnu/store/33x095pip87pxcn23cz8k96jq6bka51s-gpgme-1.15.1/include 
-I/gnu/store/imh6q627pj1jpcxdzjpvdwmlwh8kl5kw-libassuan-2.5.5/include 
-I/gnu/store/pilv2s68v4xamxwk1ahfy7q32j6wnf7l-libgpg-error-1.42/include  
-I/usr/local/include   -fpic  -g -O2  -c options.c -o options.o
gcc 
-I"/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/include" 
-DNDEBUG