bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: link error with libgcrypt


From: Jia Zhang
Subject: Re: link error with libgcrypt
Date: Mon, 30 Oct 2017 09:35:40 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:24.0) Gecko/20100101 Thunderbird/24.3.0


于 2017/10/29 下午11:00, Bruno Haible 写道:
> Hi Jia,
> 
>> I will still have a link failure with crypto/gc-sm3 and even
>> crypto/gc.
>>
>> In order to reproduce this link failure, I need to have a latest
>> libgcrypt installed, and then configure gnulib in this way:
>>
>> $ ./gnulib-tool --create-testdir --dir=testdir --single-configure
>> crypto/gc-sm3 // or crypto/gc
>> $ cd testdir
>> $ ./configure CPPFLAGS=-Wall --with-libgcrypt
>> --with-libgcrypt-prefix=<path_to_libgcrypt> // with gc-libgcrypt
>> $ make
>>
>> ... the gc-libgcrypt case will require
>> libgcrypt, and we will see a link failure.
>>
>> To fix this issue, I must specify *--libtool* with gnulib-tool.
> 
> In normal situations, you need libtool only for _creating_ shared
> libraries, not for merely linking with shared libraries. And a
> gnulib testdir does not create shared libraries.
> 
> What exactly was the link error about? Did it not find libgcrypt,
> or did it not find a dependency of it (libgpg-error)?
> 
> Did you install the "latest libgcrypt" in system directories?

I didn't install the latest libgcrypt in system directory. Instead, it
is at <path_to_libgcrypt>.

Here are the instructions to reproduce the link failure:

- ./gnulib-tool --create-testdir --dir=testdir --single-configure
crypto/gc // or gc-sha1, gc-sm3 ...
- ./configure --with-libgcrypt --with-libgcrypt-prefix=<path_to_libgcrypt>
- make

make  all-recursive
make[1]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir'
Making all in gllib
make[2]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib'
rm -f limits.h-t limits.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
      -e 's|@''INCLUDE_NEXT''@|include_next|g' \
      -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
      -e 's|@''PRAGMA_COLUMNS''@||g' \
      -e 's|@''NEXT_LIMITS_H''@|<limits.h>|g' \
      < ./limits.in.h; \
} > limits.h-t && \
mv limits.h-t limits.h
rm -f stdint.h-t stdint.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
      -e 's/@''HAVE_STDINT_H''@/1/g' \
      -e 's|@''INCLUDE_NEXT''@|include_next|g' \
      -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
      -e 's|@''PRAGMA_COLUMNS''@||g' \
      -e 's|@''NEXT_STDINT_H''@|<stdint.h>|g' \
      -e 's/@''HAVE_C99_STDINT_H''@/1/g' \
      -e 's/@''HAVE_SYS_TYPES_H''@/1/g' \
      -e 's/@''HAVE_INTTYPES_H''@/1/g' \
      -e 's/@''HAVE_SYS_INTTYPES_H''@/0/g' \
      -e 's/@''HAVE_SYS_BITYPES_H''@/0/g' \
      -e 's/@''HAVE_WCHAR_H''@/1/g' \
      -e 's/@''HAVE_LONG_LONG_INT''@/1/g' \
      -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/1/g' \
      -e 's/@''APPLE_UNIVERSAL_BUILD''@/0/g' \
      -e 's/@''BITSIZEOF_PTRDIFF_T''@//g' \
      -e 's/@''PTRDIFF_T_SUFFIX''@//g' \
      -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@//g' \
      -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@//g' \
      -e 's/@''SIG_ATOMIC_T_SUFFIX''@//g' \
      -e 's/@''BITSIZEOF_SIZE_T''@//g' \
      -e 's/@''SIZE_T_SUFFIX''@//g' \
      -e 's/@''BITSIZEOF_WCHAR_T''@//g' \
      -e 's/@''HAVE_SIGNED_WCHAR_T''@//g' \
      -e 's/@''WCHAR_T_SUFFIX''@//g' \
      -e 's/@''BITSIZEOF_WINT_T''@//g' \
      -e 's/@''HAVE_SIGNED_WINT_T''@//g' \
      -e 's/@''WINT_T_SUFFIX''@//g' \
      -e 's/@''GNULIB_OVERRIDES_WINT_T''@/0/g' \
      < ./stdint.in.h; \
} > stdint.h-t && \
mv stdint.h-t stdint.h
/bin/mkdir -p sys
rm -f sys/types.h-t sys/types.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
      -e 's|@''INCLUDE_NEXT''@|include_next|g' \
      -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
      -e 's|@''PRAGMA_COLUMNS''@||g' \
      -e 's|@''NEXT_SYS_TYPES_H''@|<sys/types.h>|g' \
      -e 's|@''WINDOWS_64_BIT_OFF_T''@|0|g' \
      -e 's|@''WINDOWS_STAT_INODES''@|0|g' \
      < ./sys_types.in.h; \
} > sys/types.h-t && \
mv sys/types.h-t sys/types.h
make  all-recursive
make[3]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib'
make[4]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib'
gcc -DHAVE_CONFIG_H -I. -I..  -DGNULIB_STRICT_CHECKING=1
-I/home/qianyue/Documents/git/libgcrypt/install/include  -g -O2 -MT
sha1.o -MD -MP -MF .deps/sha1.Tpo -c -o sha1.o sha1.c
mv -f .deps/sha1.Tpo .deps/sha1.Po
gcc -DHAVE_CONFIG_H -I. -I..  -DGNULIB_STRICT_CHECKING=1
-I/home/qianyue/Documents/git/libgcrypt/install/include  -g -O2 -MT
gc-libgcrypt.o -MD -MP -MF .deps/gc-libgcrypt.Tpo -c -o gc-libgcrypt.o
gc-libgcrypt.c
mv -f .deps/gc-libgcrypt.Tpo .deps/gc-libgcrypt.Po
rm -f libgnu.a
ar cr libgnu.a sha1.o gc-libgcrypt.o
ranlib libgnu.a
make[4]: Leaving directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib'
make[3]: Leaving directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib'
make[2]: Leaving directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib'
Making all in glm4
make[2]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/glm4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/glm4'
Making all in gltests
make[2]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gltests'
rm -f inttypes.h-t inttypes.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's/@''HAVE_INTTYPES_H''@/1/g' \
      -e 's|@''INCLUDE_NEXT''@|include_next|g' \
      -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
      -e 's|@''PRAGMA_COLUMNS''@||g' \
      -e 's|@''NEXT_INTTYPES_H''@|<inttypes.h>|g' \
      -e 's/@''PRI_MACROS_BROKEN''@/0/g' \
      -e 's/@''APPLE_UNIVERSAL_BUILD''@/0/g' \
      -e 's/@''HAVE_LONG_LONG_INT''@/1/g' \
      -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/1/g' \
      -e 's/@''PRIPTR_PREFIX''@/"l"/g' \
      -e 's/@''GNULIB_IMAXABS''@/0/g' \
      -e 's/@''GNULIB_IMAXDIV''@/0/g' \
      -e 's/@''GNULIB_STRTOIMAX''@/0/g' \
      -e 's/@''GNULIB_STRTOUMAX''@/0/g' \
      -e 's/@''HAVE_DECL_IMAXABS''@/1/g' \
      -e 's/@''HAVE_DECL_IMAXDIV''@/1/g' \
      -e 's/@''HAVE_DECL_STRTOIMAX''@/1/g' \
      -e 's/@''HAVE_DECL_STRTOUMAX''@/1/g' \
      -e 's/@''REPLACE_STRTOIMAX''@/0/g' \
      -e 's/@''REPLACE_STRTOUMAX''@/0/g' \
      -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/1/g' \
      -e 's/@''INT64_MAX_EQ_LONG_MAX''@/1/g' \
      -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/1/g' \
      -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/1/g' \
      -e '/definitions of _GL_FUNCDECL_RPL/r ./c++defs.h' \
      -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \
      -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h' \
      < ./inttypes.in.h; \
} > inttypes.h-t && \
mv inttypes.h-t inttypes.h
rm -f wchar.h-t wchar.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
      -e 's|@''INCLUDE_NEXT''@|include_next|g' \
      -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
      -e 's|@''PRAGMA_COLUMNS''@||g' \
      -e 's|@''HAVE_FEATURES_H''@|1|g' \
      -e 's|@''NEXT_WCHAR_H''@|<wchar.h>|g' \
      -e 's|@''HAVE_WCHAR_H''@|1|g' \
      -e 's/@''HAVE_CRTDEFS_H''@/0/g' \
      -e 's/@''GNULIB_OVERRIDES_WINT_T''@/0/g' \
      -e 's/@''GNULIB_BTOWC''@/0/g' \
      -e 's/@''GNULIB_WCTOB''@/0/g' \
      -e 's/@''GNULIB_MBSINIT''@/0/g' \
      -e 's/@''GNULIB_MBRTOWC''@/0/g' \
      -e 's/@''GNULIB_MBRLEN''@/0/g' \
      -e 's/@''GNULIB_MBSRTOWCS''@/0/g' \
      -e 's/@''GNULIB_MBSNRTOWCS''@/0/g' \
      -e 's/@''GNULIB_WCRTOMB''@/0/g' \
      -e 's/@''GNULIB_WCSRTOMBS''@/0/g' \
      -e 's/@''GNULIB_WCSNRTOMBS''@/0/g' \
      -e 's/@''GNULIB_WCWIDTH''@/0/g' \
      -e 's/@''GNULIB_WMEMCHR''@/0/g' \
      -e 's/@''GNULIB_WMEMCMP''@/0/g' \
      -e 's/@''GNULIB_WMEMCPY''@/0/g' \
      -e 's/@''GNULIB_WMEMMOVE''@/0/g' \
      -e 's/@''GNULIB_WMEMSET''@/0/g' \
      -e 's/@''GNULIB_WCSLEN''@/0/g' \
      -e 's/@''GNULIB_WCSNLEN''@/0/g' \
      -e 's/@''GNULIB_WCSCPY''@/0/g' \
      -e 's/@''GNULIB_WCPCPY''@/0/g' \
      -e 's/@''GNULIB_WCSNCPY''@/0/g' \
      -e 's/@''GNULIB_WCPNCPY''@/0/g' \
      -e 's/@''GNULIB_WCSCAT''@/0/g' \
      -e 's/@''GNULIB_WCSNCAT''@/0/g' \
      -e 's/@''GNULIB_WCSCMP''@/0/g' \
      -e 's/@''GNULIB_WCSNCMP''@/0/g' \
      -e 's/@''GNULIB_WCSCASECMP''@/0/g' \
      -e 's/@''GNULIB_WCSNCASECMP''@/0/g' \
      -e 's/@''GNULIB_WCSCOLL''@/0/g' \
      -e 's/@''GNULIB_WCSXFRM''@/0/g' \
      -e 's/@''GNULIB_WCSDUP''@/0/g' \
      -e 's/@''GNULIB_WCSCHR''@/0/g' \
      -e 's/@''GNULIB_WCSRCHR''@/0/g' \
      -e 's/@''GNULIB_WCSCSPN''@/0/g' \
      -e 's/@''GNULIB_WCSSPN''@/0/g' \
      -e 's/@''GNULIB_WCSPBRK''@/0/g' \
      -e 's/@''GNULIB_WCSSTR''@/0/g' \
      -e 's/@''GNULIB_WCSTOK''@/0/g' \
      -e 's/@''GNULIB_WCSWIDTH''@/0/g' \
      -e 's/@''GNULIB_WCSFTIME''@/0/g' \
      < ./wchar.in.h | \
  sed -e 's|@''HAVE_WINT_T''@|1|g' \
      -e 's|@''HAVE_BTOWC''@|1|g' \
      -e 's|@''HAVE_MBSINIT''@|1|g' \
      -e 's|@''HAVE_MBRTOWC''@|1|g' \
      -e 's|@''HAVE_MBRLEN''@|1|g' \
      -e 's|@''HAVE_MBSRTOWCS''@|1|g' \
      -e 's|@''HAVE_MBSNRTOWCS''@|1|g' \
      -e 's|@''HAVE_WCRTOMB''@|1|g' \
      -e 's|@''HAVE_WCSRTOMBS''@|1|g' \
      -e 's|@''HAVE_WCSNRTOMBS''@|1|g' \
      -e 's|@''HAVE_WMEMCHR''@|1|g' \
      -e 's|@''HAVE_WMEMCMP''@|1|g' \
      -e 's|@''HAVE_WMEMCPY''@|1|g' \
      -e 's|@''HAVE_WMEMMOVE''@|1|g' \
      -e 's|@''HAVE_WMEMSET''@|1|g' \
      -e 's|@''HAVE_WCSLEN''@|1|g' \
      -e 's|@''HAVE_WCSNLEN''@|1|g' \
      -e 's|@''HAVE_WCSCPY''@|1|g' \
      -e 's|@''HAVE_WCPCPY''@|1|g' \
      -e 's|@''HAVE_WCSNCPY''@|1|g' \
      -e 's|@''HAVE_WCPNCPY''@|1|g' \
      -e 's|@''HAVE_WCSCAT''@|1|g' \
      -e 's|@''HAVE_WCSNCAT''@|1|g' \
      -e 's|@''HAVE_WCSCMP''@|1|g' \
      -e 's|@''HAVE_WCSNCMP''@|1|g' \
      -e 's|@''HAVE_WCSCASECMP''@|1|g' \
      -e 's|@''HAVE_WCSNCASECMP''@|1|g' \
      -e 's|@''HAVE_WCSCOLL''@|1|g' \
      -e 's|@''HAVE_WCSXFRM''@|1|g' \
      -e 's|@''HAVE_WCSDUP''@|1|g' \
      -e 's|@''HAVE_WCSCHR''@|1|g' \
      -e 's|@''HAVE_WCSRCHR''@|1|g' \
      -e 's|@''HAVE_WCSCSPN''@|1|g' \
      -e 's|@''HAVE_WCSSPN''@|1|g' \
      -e 's|@''HAVE_WCSPBRK''@|1|g' \
      -e 's|@''HAVE_WCSSTR''@|1|g' \
      -e 's|@''HAVE_WCSTOK''@|1|g' \
      -e 's|@''HAVE_WCSWIDTH''@|1|g' \
      -e 's|@''HAVE_WCSFTIME''@|1|g' \
      -e 's|@''HAVE_DECL_WCTOB''@|1|g' \
      -e 's|@''HAVE_DECL_WCWIDTH''@|1|g' \
  | \
  sed -e 's|@''REPLACE_MBSTATE_T''@|0|g' \
      -e 's|@''REPLACE_BTOWC''@|0|g' \
      -e 's|@''REPLACE_WCTOB''@|0|g' \
      -e 's|@''REPLACE_MBSINIT''@|0|g' \
      -e 's|@''REPLACE_MBRTOWC''@|0|g' \
      -e 's|@''REPLACE_MBRLEN''@|0|g' \
      -e 's|@''REPLACE_MBSRTOWCS''@|0|g' \
      -e 's|@''REPLACE_MBSNRTOWCS''@|0|g' \
      -e 's|@''REPLACE_WCRTOMB''@|0|g' \
      -e 's|@''REPLACE_WCSRTOMBS''@|0|g' \
      -e 's|@''REPLACE_WCSNRTOMBS''@|0|g' \
      -e 's|@''REPLACE_WCWIDTH''@|0|g' \
      -e 's|@''REPLACE_WCSWIDTH''@|0|g' \
      -e 's|@''REPLACE_WCSFTIME''@|0|g' \
      -e '/definitions of _GL_FUNCDECL_RPL/r ./c++defs.h' \
      -e '/definition of _GL_ARG_NONNULL/r ./arg-nonnull.h' \
      -e '/definition of _GL_WARN_ON_USE/r ./warn-on-use.h'; \
} > wchar.h-t && \
mv wchar.h-t wchar.h
make  all-recursive
make[3]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gltests'
Making all in .
make[4]: Entering directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gltests'
gcc -DHAVE_CONFIG_H -I. -I..  -DGNULIB_STRICT_CHECKING=1
-DIN_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/home/qianyue/Documents/git/libgcrypt/install/include  -g -O2 -MT
dummy.o -MD -MP -MF .deps/dummy.Tpo -c -o dummy.o dummy.c
mv -f .deps/dummy.Tpo .deps/dummy.Po
rm -f libtests.a
ar cr libtests.a dummy.o
ranlib libtests.a
gcc -DHAVE_CONFIG_H -I. -I..  -DGNULIB_STRICT_CHECKING=1
-DIN_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
-I/home/qianyue/Documents/git/libgcrypt/install/include  -g -O2 -MT
test-gc-sha1.o -MD -MP -MF .deps/test-gc-sha1.Tpo -c -o test-gc-sha1.o
test-gc-sha1.c
mv -f .deps/test-gc-sha1.Tpo .deps/test-gc-sha1.Po
gcc  -g -O2   -o test-gc-sha1 test-gc-sha1.o libtests.a
../gllib/libgnu.a libtests.a
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_init':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:48:
undefined reference to `gcry_control'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:51:
undefined reference to `gcry_control'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:54:
undefined reference to `gcry_check_version'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:57:
undefined reference to `gcry_control'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_cipher_open':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:182:
undefined reference to `gcry_cipher_open'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_cipher_setkey':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:195:
undefined reference to `gcry_cipher_setkey'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_cipher_setiv':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:207:
undefined reference to `gcry_cipher_setiv'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_cipher_encrypt_inline':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:217:
undefined reference to `gcry_cipher_encrypt'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_cipher_decrypt_inline':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:227:
undefined reference to `gcry_cipher_decrypt'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_cipher_close':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:237:
undefined reference to `gcry_cipher_close'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_open':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:331:
undefined reference to `gcry_md_open'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_clone':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:357:
undefined reference to `gcry_md_copy'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_read':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:459:
undefined reference to `gcry_md_ctl'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_close':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:474:
undefined reference to `gcry_md_close'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_buffer':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:551:
undefined reference to `gcry_md_hash_buffer'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_sha1':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:635:
undefined reference to `gcry_md_get_algo_dlen'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:642:
undefined reference to `gcry_md_open'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:646:
undefined reference to `gcry_md_write'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:648:
undefined reference to `gcry_md_read'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:657:
undefined reference to `gcry_md_close'
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:651:
undefined reference to `gcry_md_close'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_set_allocators':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:106:
undefined reference to `gcry_set_allocation_handler'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_hmac_setkey':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:428:
undefined reference to `gcry_md_setkey'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_write':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:441:
undefined reference to `gcry_md_write'
../gllib/libgnu.a(gc-libgcrypt.o): In function `gc_hash_read':
/home/qianyue/Documents/git/coreutils/gnulib/testdir/gllib/gc-libgcrypt.c:460:
undefined reference to `gcry_md_read'
collect2: error: ld returned 1 exit status
Makefile:940: recipe for target 'test-gc-sha1' failed
make[4]: *** [test-gc-sha1] Error 1
make[4]: Leaving directory
'/home/qianyue/Documents/git/coreutils/gnulib/testdir/gltests'

> If yes, try running ldconfig.
> If no, the AC_LIB_HAVE_LINKFLAGS macro may not work right for you.
>   - As a workaround, try using
>     CPPFLAGS="-I<path_to_libgcrypt>/include" 
> LDFLAGS="-L<path_to_libgcrypt>/lib -Wl,-rpath,<path_to_libgcrypt>/lib"
>   - or maybe you are on a bi-arch system, and there is a mismatch
>     between 'lib' and lib64'. You can resolve this by placing a symlink
>     lib64 -> lib or lib -> lib64.

Yes this workaound is working to me with an additional -lgcrypt
specified in LDFLAGS.

So this sounds likes AC_LIB_HAVE_LINKFLAGS is not working for the case
where libgcrypt is not installed to a system location if --libtool is
absent?

Thanks,
Jia

> 
> Bruno
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]