gpg-rs / gpgme

GPGme bindings for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to build test cases

HectorIX opened this issue · comments

Running: "cargo run --example keylist --" on master branch returns:

error: failed to run custom build command for libgpg-error-sys v0.2.3``

process didn't exit successfully: C:...\rust-gpgme-master\target\debug\build\libgpg-error-sys-d4e48e575169ab8b\build-script-build (exit code: 1)

both in Linux Mint (Ubuntu like) and Windows 10. Are there any other dependencies? What am I doing wrong?

My goal is to use a key pair to encrypt/decrypt a string (i.e. a hash value from sha512). However it is not clear to me how to achieve that from the given sample codes.

Windows is not currently supported. On Linux there is a dependency on either recent versions of autotools/make/gcc or libgpgme (package libgpgme11-dev in Ubuntu). Can you post the output of running cargo build -vv?

After running cargo build -vv I get:

OPT_LEVEL = Some("0") TARGET = Some("x86_64-unknown-linux-gnu") HOST = Some("x86_64-unknown-linux-gnu") TARGET = Some("x86_64-unknown-linux-gnu") TARGET = Some("x86_64-unknown-linux-gnu") HOST = Some("x86_64-unknown-linux-gnu") CC_x86_64-unknown-linux-gnu = None CC_x86_64_unknown_linux_gnu = None HOST_CC = None CC = None HOST = Some("x86_64-unknown-linux-gnu") TARGET = Some("x86_64-unknown-linux-gnu") HOST = Some("x86_64-unknown-linux-gnu") CFLAGS_x86_64-unknown-linux-gnu = None CFLAGS_x86_64_unknown_linux_gnu = None HOST_CFLAGS = None CFLAGS = None PROFILE = Some("debug") running: "sh" "autogen.sh" autogen.sh: 1: autogen.sh: autoconf: not found **Error**: autoconf' not installed or too old.
Version 2.59 or newer is required.
autogen.sh: 1: autogen.sh: automake: not found
Error: `automake' not installed or too old.
Version 1.14 or newer is required.

Note that you may use alternative versions of the tools by setting
the corresponding environment variables; see README.GIT for details.

autogen.sh: Stop.
command did not execute successfully: "sh" "autogen.sh"
expected success, got: exit code: 1
running: "sh" "-c" "gpg-error-config --prefix"
sh: 1: gpg-error-config: not found
command did not execute successfully: "sh" "-c" "gpg-error-config --prefix"
expected success, got: exit code: 127
running: "sh" "-c" "gpg-error-config --mt --libs"
sh: 1: gpg-error-config: not found
command did not execute successfully: "sh" "-c" "gpg-error-config --mt --libs"
expected success, got: exit code: 127
running: "sh" "-c" "gpg-error-config --libs"
sh: 1: gpg-error-config: not found
command did not execute successfully: "sh" "-c" "gpg-error-config --libs"
expected success, got: exit code: 127
error: failed to run custom build command for libgpg-error-sys v0.2.3
process didn't exit successfully: /home/hector/Desktop/gpgme/target/debug/build/libgpg-error-sys-4aef12f6d97fce36/build-script-build (exit code: 1)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
PROFILE = Some("debug")
running: "sh" "autogen.sh"

Note that you may use alternative versions of the tools by setting
the corresponding environment variables; see README.GIT for details.

command did not execute successfully: "sh" "autogen.sh"
expected success, got: exit code: 1
running: "sh" "-c" "gpg-error-config --prefix"
command did not execute successfully: "sh" "-c" "gpg-error-config --prefix"
expected success, got: exit code: 127
running: "sh" "-c" "gpg-error-config --mt --libs"
command did not execute successfully: "sh" "-c" "gpg-error-config --mt --libs"
expected success, got: exit code: 127
running: "sh" "-c" "gpg-error-config --libs"
command did not execute successfully: "sh" "-c" "gpg-error-config --libs"
expected success, got: exit code: 127

--- stderr
autogen.sh: 1: autogen.sh: autoconf: not found
Error: autoconf' not installed or too old. Version 2.59 or newer is required. autogen.sh: 1: autogen.sh: automake: not found **Error**: automake' not installed or too old.
Version 1.14 or newer is required.
autogen.sh: Stop.
sh: 1: gpg-error-config: not found
sh: 1: gpg-error-config: not found
sh: 1: gpg-error-config: not found
`

It looks like your versions of autoconf and automake are too old and libgpgme11-dev is not installed.

Hi @johnschug , let me start thanking you for GPGME-rs, which made share-secrets-safely possible in the first place!
For the most part, it was smooth sailing.

Now there seems to be a rising demand for windows support, and I wonder what I could do to help making that happen. Maybe you have some hints on how a windows build would be possible.
Thanks in advance.