Page MenuHome GnuPG

pinentry-1.2.1 does not configure against libgpg-error-1.47
Closed, ResolvedPublic

Description

This is likely a similar problem to T6443.

Event Timeline

debohman created this object in space S1 Public.

Please describe your problem in a way other people can reproduce.

pinentry 1.2.1 build successfully with libgpg-error 1.47 on various machines.

In the successful build of pinentry, it goes like this:

checking for gpg-error-config... no
checking for gpgrt-config... /usr/local/bin/gpgrt-config
configure: Use gpgrt-config with /usr/local/lib/x86_64-linux-gnu as gpg-error-config
checking for GPG Error - version >= 1.16... yes (1.47)

Newer libgpg-error installs gpgrt-config and does not install libgpg-error-config. If really needed, you can configure libgpg-error by --enable-install-gpg-error-config.

I built and installed libgpg-error-1.47 yesterday. I also deleted gpg-error-config, because it has been replaced by gpgrt-config.

I was surprised that the pinentry and ntbtls configure scripts both require gpg-error-config. I ended up just creating a symlink to gpgrt-config named gpg-error-config.

The functionality of gpg-error-config is replaced by gpgrt-config. However, the script of gpg-error-config itself cannot be replaced by gpgrt-config.
(As the output of configure said,) in the configure script, gpgrt-config is invoked with --libdir somewhere (/usr/local/lib/x86_64-linux-gnu, in my case above) option to work as the gpg-error-config script replacement.

What about people that install libgpg-error-1.47 for the first time?, They won't have gpg-error-config on their system, so ntbtls and pinentry then will not build.

@debohman Please describe your failure.

As I show you the example configure output, there is no gpg-error-config in my machine (see checking for gpg-error-config... no), then it detect gpgrt-config in the system, which is is used to detect libgpg-error.

Possibly, your problem may be gpg-error.m4 in pinentry. If so, you can replace m4/gpg-error.m4 in pinentry by src/gpg-error.m4 in libgpg-error.
Then, regenerate configure of pinentry.
(In the repo of pinentry gpg-error.m4 is already updated.)

% gpg-error-config
zsh: command not found: gpg-error-config
% gpgrt-config --modversion
1.47
% pwd
/tera/tera/debo/Projects/gnupg/pinentry/pinentry-1.2.1
% ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-apple-darwin16.7.0
checking host system type... x86_64-apple-darwin16.7.0
checking whether make sets $(MAKE)... (cached) yes
checking whether build environment is sane... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether ln -s works... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for windres... no
checking for gitlog-to-changelog... no
checking if gcc ignores unknown -Wno-* options... no
checking if gcc supports -Wno-pointer-sign... yes
checking if gcc supports -Wpointer-arith... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking termio.h usability... no
checking termio.h presence... no
checking for termio.h... no
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for seteuid... yes
checking for stpcpy... yes
checking for mmap... yes
checking for stat... yes
checking for mlock... yes
checking for sysconf... yes
checking for getpagesize... yes
checking whether mlock is broken... no
checking for uint32_t... yes
checking for gpg-error-config... no
checking for gpgrt-config... /usr/local/bin/gpgrt-config
checking for GPG Error - version >= 1.16... no
configure: Use gpgrt-config as libassuan-config
checking for LIBASSUAN - version >= 2.1.0... yes (2.5.5)
checking LIBASSUAN API version... okay
checking for byte... no
checking for ulong... no
checking for u64... no
checking for ncursesw... no
checking for ncurses... no
checking for initscr in -lncursesw... no
checking for initscr in -lncurses... yes
checking for ncurses include dir... none
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking if Unix domain socket is supported... yes
checking for elementary >= 1.18,ecore-x... no
configure: WARNING: pkg-config could not find the modules elementary or ecore-x
checking for gtk+-2.0 >= 2.12.0... no
configure: WARNING: pkg-config could not find the module gtk+-2.0
checking for gcr-3,gcr-base-3... no
configure: WARNING: pkg-config could not find the module gcr-3,gcr-base-3
checking for libsecret-1... no
configure: WARNING: pkg-config could not find the module libsecret-1
checking for x11... no
configure: WARNING: pkg-config could not find the module x11
checking for KF5WaylandClient >= 5.60... no
configure: WARNING: pkg-config could not find the module KF5WaylandClient
checking for Qt5Core >= 5.0.0 Qt5Gui >= 5.0.0 Qt5Widgets >= 5.0.0... no
Package Qt5Core was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Core.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Core' found
configure: WARNING: pinentry-qt will be built without Caps Lock warning on Wayland
checking for QtCore >= 4.6.0 QtGui >= 4.6.0... no
checking for fltk-config... no
configure: WARNING: fltk-config is not found
configure:
***
*** You need libgpg-error to build this program.
**  This library is for example available at
***   ftp://ftp.gnupg.org/gcrypt/libgpg-error
*** (at least version 1.16 is required.)
***
configure: error: 
***
*** Required libraries not found. Please consult the above messages
*** and install them before running configure again.
***

Ok, I checked out pinentry-1.2.1 from the git repository, and that fails to configure. I then checked out the master, and it does configure. So, it appears to be already fixed, but not released.

@debohman Thank you for the log. Thank you also for your testing pinentry master.

checking for gpgrt-config... /usr/local/bin/gpgrt-config
checking for GPG Error - version >= 1.16... no
configure: Use gpgrt-config as libassuan-config

This is indeed, due to failure of gpg-error.m4 (older version), described in T6388. It failed to find gpg-error.pc. (It successfully find libassuan.pc because of modification of T6288).

For pinentry (and ntbtls), it's fixed in repo, but not yet released. You are correct.

gniibe changed the task status from Open to Testing.Apr 10 2023, 7:20 AM
gniibe claimed this task.
gniibe triaged this task as Normal priority.
gniibe added a project: pinentry.

Fixed in pinentry 1.3.0.