Dear gcrypt developers,
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:
----
/bin/sh ../libtool --tag=CC --mode=link gcc
-I/opt/x86_64-redhat-linux/libgpg-error/1.41/include -g -O2
-fvisibility=hidden -fno-delete-null-pointer-checks -Wall -no-install
-o t-secmem t-secmem.o ../src/libgcrypt.la ../compat/libcompat.la
libtool: link: gcc
-I/opt/x86_64-redhat-linux/libgpg-error/1.41/include -g -O2
-fvisibility=hidden -fno-delete-null-pointer-checks -Wall -o t-secmem
t-secmem.o ../src/.libs/libgcrypt.so ../compat/.libs/libcompat.a
-Wl,-rpath -Wl,/tmp/src/tmp/x86_64-redhat-linux/ports/libgcrypt/1.9.0/libgcrypt-1.9.0/src/.libs
-Wl,-rpath -Wl,/opt/x86_64-redhat-linux/libgcrypt/1.9.0/lib
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fprintf@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpg_err_code_from_syserror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_get_syscall_clamp@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_init@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpg_err_code_from_errno@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_unlock@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_b64dec_start@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_rewind@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_b64dec_finish@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_lock@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpg_err_set_errno@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_strsource@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fclose@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_b64dec_proc@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fopenmem@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_strerror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_fclose_snatch@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_ferror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_destroy@GPG_ERROR_1.0'
collect2: error: ld returned 1 exit status
make[2]: *** [t-secmem] Error 1
----
Seeing the log, I think we need to specify the location of
libgpg-error for the linker to correctly link these executables.
Commenting out the following lines in tests/Makefile.am seems to fix
the problem (these lines overrides LDADD to drop -lgcrypt-error):
----
pkbench_LDADD = $(standard_ldadd)
prime_LDADD = $(standard_ldadd)
t_mpi_bit_LDADD = $(standard_ldadd)
t_secmem_LDADD = $(standard_ldadd)
testapi_LDADD = $(standard_ldadd)
----
I will provide the full configure/make logs if necessary.
_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
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:
----
/bin/sh ../libtool --tag=CC --mode=link gcc
-I/opt/x86_64-redhat-linux/libgpg-error/1.41/include -g -O2
-fvisibility=hidden -fno-delete-null-pointer-checks -Wall -no-install
-o t-secmem t-secmem.o ../src/libgcrypt.la ../compat/libcompat.la
libtool: link: gcc
-I/opt/x86_64-redhat-linux/libgpg-error/1.41/include -g -O2
-fvisibility=hidden -fno-delete-null-pointer-checks -Wall -o t-secmem
t-secmem.o ../src/.libs/libgcrypt.so ../compat/.libs/libcompat.a
-Wl,-rpath -Wl,/tmp/src/tmp/x86_64-redhat-linux/ports/libgcrypt/1.9.0/libgcrypt-1.9.0/src/.libs
-Wl,-rpath -Wl,/opt/x86_64-redhat-linux/libgcrypt/1.9.0/lib
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fprintf@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpg_err_code_from_syserror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_get_syscall_clamp@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_init@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpg_err_code_from_errno@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_unlock@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_b64dec_start@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_rewind@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_b64dec_finish@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_lock@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpg_err_set_errno@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_strsource@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fclose@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_b64dec_proc@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_fopenmem@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpg_strerror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_fclose_snatch@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to `gpgrt_ferror@GPG_ERROR_1.0'
../src/.libs/libgcrypt.so: undefined reference to
`gpgrt_lock_destroy@GPG_ERROR_1.0'
collect2: error: ld returned 1 exit status
make[2]: *** [t-secmem] Error 1
----
Seeing the log, I think we need to specify the location of
libgpg-error for the linker to correctly link these executables.
Commenting out the following lines in tests/Makefile.am seems to fix
the problem (these lines overrides LDADD to drop -lgcrypt-error):
----
pkbench_LDADD = $(standard_ldadd)
prime_LDADD = $(standard_ldadd)
t_mpi_bit_LDADD = $(standard_ldadd)
t_secmem_LDADD = $(standard_ldadd)
testapi_LDADD = $(standard_ldadd)
----
I will provide the full configure/make logs if necessary.
_______________________________________________
Gcrypt-devel mailing list
Gcrypt-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel