Page MenuHome GnuPG

1.18.0: gpgme pythpn bindings fails because it tries to use gpg-error-config
Closed, DuplicatePublic

Description

Freom autoconf output:

foreach ($list as $item) {
checking for gpg-error-config... no
checking for gpgrt-config... /usr/bin/gpgrt-config
configure: Use gpgrt-config with /usr/lib64 as gpg-error-config
checking for GPG Error - version >= 1.36... yes (1.46-unknown)
configure: Use gpgrt-config as libassuan-config
checking for LIBASSUAN - version >= 2.4.2... yes (2.5.5-unknown)
checking LIBASSUAN API version... okay

}

However python bindingd build fails because it tries use gpg-error-config script which is no longer provided by libgpg-error.

Making all in python
Making all in .
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/gpgme-1.18.0/lang/python'
ln -sf "../../src/data.h" .
ln -sf "../../conf/config.h" .
ln -sf "./src" gpg
touch copystamp
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/gpgme-1.18.0/lang/python'
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/gpgme-1.18.0/lang/python'
set -e ; for PYTHON in /usr/bin/python3.8; do \
  CPP="/usr/bin/gcc -E" \
  CFLAGS="-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -I/usr/include/libassuan2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wno-format-y2k -Wno-missing-field-initializers -Wno-sign-compare -Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div" \
  srcdir="." \
  top_builddir="../.." \
    $PYTHON setup.py build --verbose --build-base="$(basename "${PYTHON}")-gpg" ; \
done
running build
Using gpgme.h from ../../src/gpgme.h
Could not find gpg-error-config.  Please install the libgpg-error development package.
make[3]: *** [Makefile:760: all-local] Error 1
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/gpgme-1.18.0/lang/python'
make[2]: *** [Makefile:478: all-recursive] Error 1
make[1]: *** [Makefile:463: all-recursive] Error 1
make: *** [Makefile:540: all-recursive] Error 1

Details

Version
1.18.0

Event Timeline

kloczek renamed this task from 1.18.0: gpgme pythpn bindings fails because it teies to use gpg-error-config to 1.18.0: gpgme pythpn bindings fails because it ties to use gpg-error-config.Dec 7 2022, 9:44 PM
kloczek renamed this task from 1.18.0: gpgme pythpn bindings fails because it ties to use gpg-error-config to 1.18.0: gpgme pythpn bindings fails because it tries to use gpg-error-config.
kloczek created this task.

Thank you for your report.
Please look T6204.
Closed as duplicate.

I cannot find the commit which fixes this issue.

GTW IMO it would be good to make kind of announcement that with some exact versions of some projects maintained on gnupg.org all *-config scripts will be abandoned.
This would allow greatly simplify autoconf files useg by all projects (not only gnupg.org but external as well).
At the momemt already majority of external projests are using pkgconfig.

T6204: gpgme:python Fix setup.py, using pkg-config (not deprecated gpg-error-config and gpgme-config) has two commits attached which together fix the issue.

External projects should have been using pkgconfig since a long time. The *-config scripts are for systems which lack pkgconfig.

Just checked those two commits and I see in autoconf output:

checking for gpg-error-config... no
checking for gpgrt-config... /usr/bin/gpgrt-config
configure: Use gpgrt-config with /usr/lib64 as gpg-error-config
checking for GPG Error - version >= 1.36... yes (1.46-unknown)
configure: Use gpgrt-config as libassuan-config
checking for LIBASSUAN - version >= 2.4.2... yes (2.5.5-unknown)
checking LIBASSUAN API version... okay

So looks like there is more use of *-config scripts and those detections takes longer time so it would be good to move that as well to pkgconfig.

It is yet another issue related to git repository.
Time to time on downloading patches ober http rest interface I see

console
warning: Downloading https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=patch;h=ae9258fb#/gpgme-python-Fix-configure-generating-setup.py.patch to /home/tkloczko/rpmbuild/SOURCES/gpgme-python-Fix-configure-generating-setup.py.patch
curl: (56) OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0

If that web content is behind loadballancer it may mean that some nodes may have some issues.

I've hit that issu on downloading two times so I think that there are two nodes behind LB :P