gmp [library] version numbers
Hugh Sasse
hgs at dmu.ac.uk
Thu Jan 11 11:23:33 CET 2007
On Wed, 10 Jan 2007, Richard B. Kreckel wrote:
> Hi!
>
> Hugh Sasse wrote:
>
[...]
> > SONAME libgmp.so.3
> >agrees... So something internal must be tweaked.
> >
> >
>
> Some configury would have to be tweaked.
from remarks below, at Guile's end.
>
> >>So you can rename it to libgmp.so.3.<n>, but not to libgmp.so.4.<m>,
> >>without seriously confusing your dynamic linker.
> >
> >Where n is 4.2.1, 2.1, or what? That's just confused *me* :-)
>
> 2.1.
>
> >>If at all, this is a bug in the configure script you're having there.
> >>
> >
[I was suspecting filename problems given website remark]
> >
>
> In general, the version of the library (4.2.1, in your case) has nothing
> to do with the library name (which suggests 3.4.1, in your case). The
> latter has to do with library interfaces as seen by linkers. Please
> refer to the libtool documentation, the section about "library interface
> versions".
that's the bit about library interface integer ranges, and ages of
release. I'm failing to see how this works with guile. So far I have
had no response from the guile list. If I could get as far as creating
a patch I might get someone to examine it. But I'm unfamiliar with
the details of autoconf. The Guile configure bit that looks relevant
is
<quote>
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_init" >&5
echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_init" >&6; }
if test $ac_cv_lib_gmp___gmpz_init = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBGMP 1
_ACEOF
LIBS="-lgmp $LIBS"
else
{ { echo "$as_me:$LINENO: error: GNU MP not found, see README" >&5
echo "$as_me: error: GNU MP not found, see README" >&2;}
{ (exit 1); exit 1; }; }
fi
</quote>
And AFAICS the configure.in bit that does this is:
<quote>
dnl GMP tests
AC_CHECK_LIB([gmp], [__gmpz_init], ,
[AC_MSG_ERROR([GNU MP not found, see README])])
# mpz_import is a macro so we need to include <gmp.h>
AC_TRY_LINK([#include <gmp.h>],
[mpz_import (0, 0, 0, 0, 0, 0, 0);] , ,
[AC_MSG_ERROR([At least GNU MP 4.1 is required, see README])])
</quote>
Which doesn't seem to mention a version number except in the error
message. So maybe the error message about GNU MP 4.1 is misleading,
because those macros look to me like they are testing linkage, rather
than testing version numbers.
>
> Changing GMP for release 4.2.2 would be bad because that would hurt
> distributions: it would not be possible to provide drop-in replacement
> upgrade packages. Hence, I think the bug is in guile's configury.
OK.
>
> -richy.
>
Thank you,
Hugh
More information about the gmp-discuss
mailing list