unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Kyle Andrews <kyle@posteo.net>
To: help-guix@gnu.org
Subject: Seeking suggestions for fixing the R gpg package
Date: Thu, 05 May 2022 13:37:54 +0000	[thread overview]
Message-ID: <874k24cclm.fsf@posteo.net> (raw)


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 -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 register.c -o register.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 sign.c -o sign.o
gcc -shared -L/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/lib -L/usr/local/lib -o gpg.so encrypt.o engine.o keys.o keysig.o options.o register.o sign.o -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 -L/gnu/store/fm6grlr7rvb176ls6kkamadim64w3jli-r-minimal-4.1.3/lib/R/lib -lR
--------------------------------------------------------------------------------->8

After that comes the error:

8<---------------------------------------------------------------------------------
Error: package or namespace load failed for ‘gpg’:
 .onLoad failed in loadNamespace() for 'gpg', details:
  call: NULL
  error: GPGME setting OpenPGP path/home error: Invalid crypto engine
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/gnu/store/zrsgwmxcqd7dxinsj477lm2rw9mnyhi1-r-gpg-1.2.6/site-library/gpg’
error: in phase 'install': uncaught exception:
%exception #<&invoke-error program: "R" arguments: ("CMD" "INSTALL" "--install-tests" "--library=/gnu/store/zrsgwmxcqd7dxinsj477lm2rw9mnyhi1-r-gpg-1.2.6/site-library/" "--built-timestamp=1970-01-01" ".") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `install' failed after 2.2 seconds
command "R" "CMD" "INSTALL" "--install-tests"
 "--library=/gnu/store/zrsgwmxcqd7dxinsj477lm2rw9mnyhi1-r-gpg-1.2.6/site-library/"
 "--built-timestamp=1970-01-01" "." failed with status 1
--------------------------------------------------------------------------------->8

I would to see this package in guix and mainly want to use it myself in
leu of the menu interface in the command line app.

Thanks in advance for any suggestions.


             reply	other threads:[~2022-05-05 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 13:37 Kyle Andrews [this message]
2022-05-06  8:56 ` Seeking suggestions for fixing the R gpg package zimoun
2022-05-09 11:47   ` Kyle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k24cclm.fsf@posteo.net \
    --to=kyle@posteo.net \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).