[PATCH] Generate and install a pkg-config file for gpg-error

Dennis Schridde devurandom at gmx.net
Tue Sep 18 09:37:22 CEST 2012

Hi Werner!

Am Dienstag, 18. September 2012, 09:07:04 schrieb Werner Koch:
> On Mon, 17 Sep 2012 23:46, devurandom at gmx.net said:
> > This aids in cross-compiling, where the output of gpg-error-config cannot
> > directly be used, e.g. because the paths may need an additional prefix.
> It is quite interesting that we are cross compiling the whole GnuPG
> system for a decade without any problems:
>   ./configure --prefix=${sysroot} \
>               --with-gpg-error-prefix=${sysroot}
Doesn't --prefix specify a path within the target system? E.g. /usr?
Won't the paths within the software come out wrongly if used like that? I.e. 
what if the software is later run not from the system that built it inside 
$sysroot, but if it is actually being booted? Then its own -config script 
would report wrong paths, wouldn't it?

In particular, my issue was that gpg-error-config reported its library as 
/usr/lib/libgpg-error.so -- relative to the $sysroot it was installed into. 
Obviously that does not work, since the library at that location is for a 
different architecture.
So I would have to wrap the -config script by something that mangles the paths 
to start with $sysroot. Doing that with pkg-config is easy (in fact it comes 
included), but if I am not using it, I have to wrap each and every package's -
config script using my own sed magic.
On the other hand including a pkg-config file with libgpg-error and libgcrypt 
is easy and not too much of a maintainance burden, especially since it changes 
almost never.

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20120918/3daa59df/attachment.pgp>

More information about the Gnupg-devel mailing list