Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#24612 - Support gpgme installations which don't install gpgme.h directly into /usr/include

Attached to Project: Pacman
Opened by Nathan Phillip Brink (ohnobinki) - Tuesday, 07 June 2011, 03:55 GMT
Last edited by Allan McRae (Allan) - Saturday, 18 February 2012, 06:53 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version 4.1.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


Summary and Info:

Certain distributions install gpgme.h to /usr/include/gpgme. gpgme includes a gpgme-config binary for this purpose:

ohnobinki@ohnopublishing ~/pacman $ gpgme-config --cflags

The attached patch makes use of this binary during ./configure and also tests the availability of gpgme.h to avoid:

libtool: compile: gcc -std=gnu99 -DLOCALEDIR=\"/tmp/pacman/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -fgnu89-inline -g -O2 -Wall -c pkghash.c -fPIC -DPIC -o .libs/pkghash.o
libtool: compile: gcc -std=gnu99 -DLOCALEDIR=\"/tmp/pacman/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -fgnu89-inline -g -O2 -Wall -c log.c -fPIC -DPIC -o .libs/log.o
libtool: compile: gcc -std=gnu99 -DLOCALEDIR=\"/tmp/pacman/share/locale\" -DHAVE_CONFIG_H -I. -I../.. -pedantic -D_GNU_SOURCE -fvisibility=internal -fgnu89-inline -g -O2 -Wall -c handle.c -fPIC -DPIC -o .libs/handle.o
signing.c:28:19: fatal error: gpgme.h: No such file or directory
compilation terminated.
make[3]: *** [signing.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
This task depends upon

Closed by  Allan McRae (Allan)
Saturday, 18 February 2012, 06:53 GMT
Reason for closing:  Fixed
Additional comments about closing: /commit/?id=115c0381
Comment by Dan McGee (toofishes) - Tuesday, 07 June 2011, 15:57 GMT Comment by Allan McRae (Allan) - Tuesday, 19 July 2011, 05:44 GMT
That check provide by gpgme is actually really crap... it just checks for gpgme-config and gives you GPGME_CFLAGS and GPGME_LIBS based on using that. It does not actually test for the presence of libgpgme or gpgme.h so we still have to manually do that. But it does provide a --with-gpgme-prefix configure flag so that is helpful.

So a combination of AM_PATH_GPGME check and the provided patch is what is really needed.
Comment by Dan McGee (toofishes) - Thursday, 06 October 2011, 04:46 GMT
  • Field changed: Due in Version (4.0.0 → 4.1.0)
Pushing to 4.1- I believe you can work around for now with some sort of CFLAGS="-I" business (and possibly CPPFLAGS too).
Comment by Allan McRae (Allan) - Thursday, 06 October 2011, 07:26 GMT
Yes. This can be easily worked around with adding the needed -I and -L paths to CFLAGS.

(although there might be a patch coming to a mailing list near you as soon as I test it in a few more possible setups....)
Comment by Nathan Phillip Brink (ohnobinki) - Monday, 17 October 2011, 21:44 GMT
This patch from my accidental bug #26495 does things the right way using AM_PATH_GPGME.
Comment by Dan McGee (toofishes) - Monday, 17 October 2011, 22:24 GMT
1. Does it address Allan's comment here? It doesn't appear to at quick glance.
2. Is it AM_PATH_GPGME or AM_GPGME_PATH? Please proofread your commit message for things like this.
Comment by Nathan Phillip Brink (ohnobinki) - Tuesday, 18 October 2011, 03:44 GMT
1. No, but this one does. It's really much cleaner to just use gpgme's macro and assume that everything's fine. I think these checks belong in gpgme's macro, but I don't think I have time to work with the upstream gpgme. But anyways, I've added the requested sanity checks :-).

2. Oops, I had wondered if I made that mistake, checked again, and then still ended up making it :-/.
Comment by Allan McRae (Allan) - Sunday, 12 February 2012, 02:01 GMT
Pushed to my working branch.