Page MenuHome GnuPG

gpg error check fails
Closed, ResolvedPublic

Description

When trying to compile libgpg-error from master branch commit (https://github.com/gpg/libgpg-error/commit/220a427b4f997ef6af1b2d4e82ef1dc96e0cd6ff), the build will fail. Full log attached.

libtool: link: x86_64-pc-linux-gnu-gcc -m32 -shared -fPIC -DPIC .libs/libgpg_error_la-posix-lock.o .libs/libgpg_error_la-posix-thread.o .libs/libgpg_error_la-spawn-posix.o .libs/libgpg_error_la-init.o .libs/libgpg_error_la-version.o .libs/libgpg_error_la-estream.o .libs/libgpg_error_la-estream-printf.o .libs/libgpg_error_la-strsource.o .libs/libgpg_error_la-strerror.o .libs/libgpg_error_la-code-to-errno.o .libs/libgpg_error_la-code-from-errno.o .libs/libgpg_error_la-visibility.o .libs/libgpg_error_la-sysutils.o .libs/libgpg_error_la-stringutils.o .libs/libgpg_error_la-syscall-clamp.o .libs/libgpg_error_la-logging.o .libs/libgpg_error_la-b64dec.o .libs/libgpg_error_la-b64enc.o .libs/libgpg_error_la-argparse.o -m32 -march=native -O3 -fuse-linker-plugin -flto=auto -Wl,--version-script=/var/tmp/portage/dev-libs/libgpg-error-9999/work/libgpg-error-9999/src/gpg-error.vers -Wl,-O1 -Wl,--as-needed -Wl,-soname -Wl,libgpg-error.so.0 -o .libs/libgpg-error.so.0.32.1
no

make[3]: *** [Makefile:1733: gpg-error-config] Error 1

Details

Version
https://github.com/gpg/libgpg-error/commit/220a427b4f997ef6af1b2d4e82ef1dc96e0cd6ff

Event Timeline

So, please show us gpg-error-config-test.log by your build.

gniibe triaged this task as Normal priority.
gniibe added a project: gpgrt.

Here is the log file requested.

This may also have something to do with this required patch, but it no longer works. I'm on Gentoo by the way.

https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libgpg-error/files/libgpg-error-1.37-remove_broken_check.patch

Thank you for the log.

I think that the variable PKG_CONFIG_LIBDIR is set in your build, and it confuses gpgrt-config.

Here is a possible patch:

diff --git a/src/gpg-error-config-test.sh.in b/src/gpg-error-config-test.sh.in
index b888aa2..cd4a7e3 100644
--- a/src/gpg-error-config-test.sh.in
+++ b/src/gpg-error-config-test.sh.in
@@ -1,5 +1,9 @@
 #!@INSTALLSHELLPATH@
 
+# For this test, we clear PKG_CONFIG_LIBDIR, so that gpgrt-config
+# command can access ./gpg-error.pc
+unset PKG_CONFIG_LIBDIR
+
 srcdir=${0%/*}
 
 PKG_CONFIG_PATH="."

The patch worked, thank you very much.

gniibe added a project: Restricted Project.Dec 17 2021, 12:53 AM

The patch worked, thank you very much.

Good. It's us who should say thank you for your cooperation. You know, it hasn't been reported until your report (since 1.37).

Fixed in master.

gniibe removed a project: Restricted Project.