On Sat, 22 Sep 2012 12:16, christ...@grothoff.org said: > compatibility check. GNUnet follows *exactly* (AFAIK) the > recommendations of the libgcrypt manual:
The manual might be a bit too strict here, but that should not matter. The comment in the gcrypt header is partly wrong: /* The version of this header should match the one of the library. It should not be used by a program because gcry_check_version() should return the same version. The purpose of this macro is to let autoconf (using the AM_PATH_GCRYPT macro) check that this header matches the installed library. */ #define GCRYPT_VERSION "1.6.0-gitbaf0dc7" The mentioned purpose is not anymore correct; the AM macro uses only the version as told by "libgcrypt-config --version". Note that gcry_check_version ignores everything after the "-" and compares only major, minor, and micro. > So if the gcry_check_version test is somehow too strict, you should take > it up with Werner Koch (libgcrypt/gnupg maintainer). If Werner > recommends that we change this test in any way, I'll of course be happy > to do so. What I do is /* Check that the libraries are suitable. Do it here because the option parsing may need services of the library. */ if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) ) { log_fatal( _("%s is too old (need %s, have %s)\n"), "libgcrypt", NEED_LIBGCRYPT_VERSION, gcry_check_version (NULL) ); } and in configure I have this: NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.5.0 # ... maybe other stuff ... AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", have_libgcrypt=yes,have_libgcrypt=no) # ... close to the end if test "$have_libgcrypt" = "no"; then die=yes AC_MSG_NOTICE([[ *** *** You need libgcrypt to build this program. ** This library is for example available at *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/ *** (at least version $NEED_LIBGCRYPT_VERSION (API $NEED_LIBGCRYPT_API) *** is required.) ***]]) fi Thus if my code requires feature from libgcrypt 1.5.0 I tell it to check for that version. Any newer version will work as well. The NEED_LIBGCRYPT_API allows to detect incompatible API checks in newer version). The problem at hand might be that the application was build with Libgcrypt 1.5.20 but used on a system where 1.5.19 is installed. With if (!gcry_check_version (GCRYPT_VERSION) ) this will fail, despite that it is probably okay. Thus the more relaxed test with if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) ) and a manually maintained NEED_LIBGCRYPT_VERSION might be better. A bit more work on the GNUnet site but still might be worth to do. Salam-Shalom, Werner -- Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org