Page MenuHome GnuPG

gpgme-1.11.1 fails to build: cJSON.c:45:20: fatal error: gpgrt.h: Datei oder Verzeichnis nicht gefunden
Closed, ResolvedPublic

Description

Hi all,
trying to build gpgme-1.11.1 from source on Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux.
./configure finishes fine (Exit 0, no erros found)
make fires an error afterwards:

gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -MT gpgme-json.o -MD -MP -MF .deps/gpgme-json.Tpo -c -o gpgme-json.o gpgme-json.c
mv -f .deps/gpgme-json.Tpo .deps/gpgme-json.Po
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -MT cJSON.o -MD -MP -MF .deps/cJSON.Tpo -c -o cJSON.o cJSON.c
cJSON.c:45:20: fatal error: gpgrt.h: Datei oder Verzeichnis nicht gefunden

  1. include <gpgrt.h> ^

compilation terminated.
Makefile:908: die Regel für Ziel „cJSON.o“ scheiterte
make[2]: * [cJSON.o] Fehler 1
make[2]: Verzeichnis „/opt/GPGME/gpgme-1.11.1/src“ wird verlassen
Makefile:521: die Regel für Ziel „all-recursive“ scheiterte
make[1]:
* [all-recursive] Fehler 1
make[1]: Verzeichnis „/opt/GPGME/gpgme-1.11.1“ wird verlassen
Makefile:452: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2

Thx for your support.
Best wishes, Elan

Event Timeline

Elan created this object in space S1 Public.

It seems that Debian does not install te required libgpg-error correctl.

I don't think this is an error in Debian. Debian Squeeze is packed with libgpg-error 1.26 in the latest stable release [1].
According to the list of changes, gpgrt.h is addes as an alias for gpg-error.h in 1.27 [2].
I think a quick (and correct) fix is to increase the NEED_GPG_ERROR_VERSION in configure.ac to at least 1.27 [3], so the build will fail nicely in the configure-step with a correct error.

[1] https://packages.debian.org/stretch/libgpg-error-dev
[2] https://github.com/gpg/libgpg-error/blob/master/NEWS#L117
[3] https://github.com/gpg/gpgme/blob/master/configure.ac#L76

werner claimed this task.

Please dee the commit for a description of this fix.