Is there some dependency tree or graph for libraries used by Gpg2, such as libgpg-error
orlibassuan &c.
?
Or another way to determine which ones I need to recompile after one of them gets new version? E.g. libgpg-error is, I understand, pretty basic one and so if it gets upgraded perhaps all the others should be recompiled?
I sometimes run into troubles when after upgrading a library I cannot compile new version of Gpg2 since it tries to link old, already removed version of that library (I have a non-standard directory structure for those), and crashes with 'cannot find library'. And after some—not very thorough—research I believe it is caused by taking information of that particular library version from other libraries that have been built before the upgraded one.
An example: I recently upgraded libgpg-error to 1.32. Today I tried (and failed (and had to fix that manually)) to compile Gpg 2.2.10.
The command that failed was this (shortened):
/usr/local/bin/gcc -std=gnu99 ... \
-I/usr/local/libgpg-error-1.31/include \
-I/usr/local/libgpg-error-1.25/include \
-I/usr/local/libgpg-error-1.31/include \
-I/usr/local/libgpg-error-1.32/include \
-o dirmngr dirmngr.o server.o crlcache.o crlfetch.o certcache.o ... \
../common/libcommonpth.a -lresolv \
-L/usr/local/libgpg-error-1.31/lib -lgpg-error \
-L/usr/local/libgpg-error-1.31/lib -lgpg-error \
-L/usr/local/libgpg-error-1.25/lib -lgpg-error \
...
Notice how it tries to include versions 1.25, 1.31 and 1.32 of libgpg-error headers and link versions 1.25 and 1.31 (but NOT 1.32) of libgpg-error.so, although none of those version is present on the disk any more except the current one, i.e. 1.32. They were however present earlier when some of the other libs were compiled.
It seems no answer is available, so I tried at least to look into the configure
scripts of the respective libraries and here is (very much without any warranty) what I came up with—some dependency graph and suggested order of compilation:
level 0
| libgpg-error
| nPth
level 1
| libgcrypt (libgpg-error)
| libksba (libgpg-error)
| libassuan (libgpg-error)
level 2
| ntbTLS (libgpg-error, libgcrypt, libksba)
| pinentry (libgpg-error, libassuan)
level N
| gpg2 (libgpg-error, libgcrypt, libassuan, libksba, nPth) [pinentry, ntbTLS]
level N+1
| GPGME (libgpg-error, libassuan)
level N+2
| GPA (libgpg-error, libassuan, GPGME)
(Edited as suggested by Ben in his comment.)