libgcrypt1.9.0: Failure on linking test executables

NIIBE Yutaka gniibe at fsij.org
Thu Jan 21 06:23:20 CET 2021


Kasumi Fukuda via Gcrypt-devel <gcrypt-devel at gnupg.org> writes:
> I'm trying to build libgcrypt 1.9.0 on amazonlinux2, with its
> dependency library (libgpg-error) built from source and installed in a
> non-default prefixed location (and libgcrypt-config is on the $PATH
> when configure).
> The test executables such as tests/t-secmem and tests/t-mpi-bit fail
> to link in my environment with the following error:

Thank you for the report.

What's the version of your GCC and linker (from binutils)?

I don't see the reason why your linker emits error when linking t-secmem
with libgcrypt.so.  The t-secmem.o object has no use of any libgpg-error
sympols.  It seems that your linker tries to resolve all symbols in
linked library, which is not needed at all.

I tried with my environment (Debian GNU/Linux): Clang-3.8, GCC 6, GCC 8,
GCC 9,... with ld.gold or ld.bfd.  I was unable to replicate the linkage
error.

> Seeing the log, I think we need to specify the location of
> libgpg-error for the linker to correctly link these executables.

FWIW, it is me who droped -lgpg-error for these programs.  It is
intentional change to minimize library dependency, assuming modern
toolchain.

However, if it results build error(s) on some systems, it should be
reverted.
-- 



More information about the Gcrypt-devel mailing list