Page MenuHome GnuPG

gpg-error.m4 should search gpg-error.pc under the paths of gpgrt-config
Closed, ResolvedPublic

Description

Currently, it is only tried by two places:
(1) place using prefix
(2) system place by gcc -print-file-name=crt1.o

But it is possible to have different prefix (like make distcheck time).

We should try more places to find it:
(3) $prefix-of-gpgrt-config/lib/pkg-config
‎(4) $prefix-of-gpgrt-config/lib/$host-triplet/pkg-config

Event Timeline

Considered again, I realized that (1) is no need to check.

$host-triplet is the one of Debian style.
We need to check libdir like /usr/lib32 or /usr/lib64 style one of Fedora/openSUSE.

gniibe changed the task status from Open to Testing.Feb 12 2021, 7:32 AM

For other libraries, like libgcrypt, it is mostly OK with old gpg-error.m4, because those libraries don't depend on new libgpg-error features.

But for the specific case when there is older libgpg-error (for particular library build) in /usr/local and newer one in system, user may encounter problem after its installation. Build goes success with newer system one, but runtime uses /usr/local.

To solve this issue, gpg-error.m4 in those libraries should be also updated to detect older libgpg-error in /usr/local.

We also need to support the use case of GNU cross style, like when we build with MinGW toolchain.

I found that the use of $CC -print-file-name=crt1.o won't work with some cross compiler.
For example, on my system of Debian bullseye for cross compiler ppc64el, while it's for multiarch configuration, crt1.o is under GNU cross style directory: /usr/powerpc64le-linux-gnu/lib

Use of $CC --print-search-dirs is more reliable.