Hi! CLN 1.2.2 has been released. This release re-establishes binary compatibility with CLN-1.2.0 and fixes the ARM build, both inadvertently broken in the previous release. Cheers -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Hi Richy,
This release re-establishes binary compatibility with CLN-1.2.0 and fixes the ARM build, both inadvertently broken in the previous release.
The binary compatibility is restored for 32-bit platforms. For 64-bit platforms there is another binary-incompatible change. Doing a diff between the include files of cln-1.2.0 and cln-1.2.2 I found the attached differences. The decorated name of the functions read_integer, read_rational, read_float have changed. To reproduce: On a Linux/x86_64 machine (I used td189.testdrive.hp.com), do $ export CPPFLAGS="m64" LDFLAGS="-m64" and configure & build cln-1.2.0 and cln-1.2.2. $ nm cln-1.2.0/src/cl_I_readparsed.o | grep ' T ' 00000000000000ae T _ZN3cln12read_integerEjiPKcjj $ nm cln-1.2.2/src/cl_I_readparsed.o | grep ' T ' 00000000000000ae T _ZN3cln12read_integerEjiPKcmm and finally $ diff <(nm cln-1.2.0/src/.libs/libcln.so.5.0.0 | grep ' T ' | awk '{print $3}' | sort) \ <(nm cln-1.2.2/src/.libs/libcln.so.5.0.2 | grep ' T ' | awk '{print $3}' | sort) 145c145 < _ZN3cln10cl_sstringEPKcj ---
_ZN3cln10cl_sstringEPKcm 172c172 < _ZN3cln10read_floatEjNS_14float_format_tEiPKcjjjj
_ZN3cln10read_floatEjNS_14float_format_tEiPKcmmmm 275c275 < _ZN3cln12read_integerEjiPKcjj
_ZN3cln12read_integerEjiPKcmm 310c310 < _ZN3cln13read_rationalEjiPKcjjj
_ZN3cln13read_rationalEjiPKcmmm 463a464 _ZN3cln22cl_float_to_FF_pointerEf 468a470 _ZN3cln23cl_double_to_DF_pointerEd
Maintaining binary compatibility is more work than one would think... Bruno *** include/cln/integer_io.h 15 Sep 2007 21:34:15 -0000 1.3 --- include/cln/integer_io.h 22 Feb 2008 21:30:26 -0000 1.4 *************** *** 21,27 **** // (also index2-index1 Ziffern, incl. evtl. Dezimalpunkt am Schluß) // < ergebnis: Integer extern const cl_I read_integer (unsigned int base, ! cl_signean sign, const char * string, uintL index1, uintL index2); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the rational, complex and float number --- 21,27 ---- // (also index2-index1 Ziffern, incl. evtl. Dezimalpunkt am Schluß) // < ergebnis: Integer extern const cl_I read_integer (unsigned int base, ! cl_signean sign, const char * string, uintC index1, uintC index2); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the rational, complex and float number *** include/cln/rational_io.h 15 Sep 2007 21:34:15 -0000 1.3 --- include/cln/rational_io.h 22 Feb 2008 21:30:26 -0000 1.4 *************** *** 21,27 **** // (also index3-index1 Zähler-Ziffern, index2-index3-1 Nenner-Ziffern) // < ergebnis: rationale Zahl extern const cl_RA read_rational (unsigned int base, ! cl_signean sign, const char * string, uintL index1, uintL index3, uintL index2); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the complex and float number --- 21,27 ---- // (also index3-index1 Zähler-Ziffern, index2-index3-1 Nenner-Ziffern) // < ergebnis: rationale Zahl extern const cl_RA read_rational (unsigned int base, ! cl_signean sign, const char * string, uintC index1, uintC index3, uintC index2); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the complex and float number *** include/cln/float_io.h 15 Sep 2007 21:34:15 -0000 1.3 --- include/cln/float_io.h 22 Feb 2008 21:30:26 -0000 1.4 *************** *** 26,32 **** // Exponenten-Ziffer) // < ergebnis: Float extern const cl_F read_float (unsigned int base, float_format_t prec, ! cl_signean sign, const char * string, uintL index1, uintL index4, uintL index2, uintL index3); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the complex and rational number --- 26,32 ---- // Exponenten-Ziffer) // < ergebnis: Float extern const cl_F read_float (unsigned int base, float_format_t prec, ! cl_signean sign, const char * string, uintC index1, uintC index4, uintC index2, uintC index3); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the complex and rational number
Hi, On Sun, Apr 06, 2008 at 07:21:02AM +0200, Bruno Haible wrote:
The binary compatibility is restored for 32-bit platforms. For 64-bit platforms there is another binary-incompatible change.
The reason is Author: Richard Kreckel <kreckel@ginac.de> Date: Fri Feb 22 21:30:26 2008 +0000 Make index variables uintC. This changes the argument(s) of functions from unsigned int to unsigned long int, which clearly breaks binary compatibility on 64-bit platforms. Best regards, Alexei -- All science is either physics or stamp collecting.
Add obsolete signatures (only for 64-bit platforms), but don't expose them. --- src/float/input/cl_F_readparsed.cc | 7 +++++++ src/integer/input/cl_I_readparsed.cc | 8 ++++++++ src/rational/input/cl_RA_readparsed.cc | 7 +++++++ 3 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/float/input/cl_F_readparsed.cc b/src/float/input/cl_F_readparsed.cc index ebb471d..c215680 100644 --- a/src/float/input/cl_F_readparsed.cc +++ b/src/float/input/cl_F_readparsed.cc @@ -94,4 +94,11 @@ const cl_F read_float (unsigned int base, float_format_t prec, cl_signean sign, ); } +#if long_bitsize > int_bitsize +const cl_F read_float(unsigned int base, float_format_t prec, cl_signean sign, const char * string, uintL index1, uintL index4, uintL index2, uintL index3) +{ + // binary compatibility with CLN 1.2.0 + return read_float(base, prec, sign, string, uintC(index1), uintC(index4), uintC(index2), uintC(index3)); +} +#endif } // namespace cln diff --git a/src/integer/input/cl_I_readparsed.cc b/src/integer/input/cl_I_readparsed.cc index 66609b9..29245d5 100644 --- a/src/integer/input/cl_I_readparsed.cc +++ b/src/integer/input/cl_I_readparsed.cc @@ -22,4 +22,12 @@ const cl_I read_integer (unsigned int base, cl_signean sign, const char * string return -x; // negatives Vorzeichen -> Vorzeichenwechsel } +#if long_bitsize > int_bitsize +const cl_I read_integer(unsigned int base, cl_signean sign, const char* string, uintL index1, uintL index2) +{ + // binary compatibility with CLN 1.2.0 + return read_integer(base, sign, string, uintC(index1), uintC(index2)); +} +#endif + } // namespace cln diff --git a/src/rational/input/cl_RA_readparsed.cc b/src/rational/input/cl_RA_readparsed.cc index bdf80f0..f73e78b 100644 --- a/src/rational/input/cl_RA_readparsed.cc +++ b/src/rational/input/cl_RA_readparsed.cc @@ -29,4 +29,11 @@ const cl_RA read_rational (unsigned int base, cl_signean sign, const char * stri return I_posI_div_RA(num,den); } +#if long_bitsize > int_bitsize +const cl_RA read_rational (unsigned int base, cl_signean sign, const char * string, uintL index1, uintL index3, uintL index2) +{ + // binary compatibility with CLN 1.2.0 + return read_rational(base, sign, string, uintC(index1), uintC(index3), uintC(index2)); +} +#endif } // namespace cln -- 1.5.4.2 Best regards, Alexei -- All science is either physics or stamp collecting.
Dear Richard, On Sat, Apr 05, 2008 at 11:45:51PM +0200, Richard B. Kreckel wrote:
Hi!
CLN 1.2.2 has been released.
This commit Author: Richard Kreckel <kreckel@ginac.de> Date: Sat Mar 15 21:13:51 2008 +0000 Optional support for configure --with-gmp=GMP-PREFIX. breaks VPATH builds: $ mkdir _build; cd _build $ ../configure --disable-static [skipped autoconfish boilerplate] configure: checking for integer types and behaviour... creating include/cln/intparam.h mv: cannot move `conftest.h' to `include/cln/intparam.h': No such file or directory configure: checking for floating-point types and behaviour... creating include/cln/floatparam.h mv: cannot move `conftest.h' to `include/cln/floatparam.h': No such file or directory The patch below reverts incorrect changes: diff --git a/configure.ac b/configure.ac index d9c5d66..048996a 100644 --- a/configure.ac +++ b/configure.ac @@ -154,6 +154,7 @@ dnl checks for compiler characteristics dnl AC_C_CHAR_UNSIGNED dnl DEFS __CHAR_UNSIGNED__ if char is unsigned +test -d 'include/cln' || mkdir -p 'include/cln' CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,[CL_INTPARAM_CROSS],include/cln/intparam.h,cl_cv_file_intparam_h) dnl builds include/cln/intparam.h CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,[CL_FLOATPARAM_CROSS],include/cln/floatparam.h,cl_cv_file_floatparam_h) BTW, --with-gmp=PREFIX doesn't work properly and is very confusing. It doesn't set correct linker flags, so the *run-time* linker either can't find libgmp.so or even worse -- uses one found in the default library search path. Best regards, Alexei -- All science is either physics or stamp collecting.
Dear Alexei, Alexei Sheplyakov wrote:
The patch below reverts incorrect changes:
diff --git a/configure.ac b/configure.ac index d9c5d66..048996a 100644 --- a/configure.ac +++ b/configure.ac @@ -154,6 +154,7 @@ dnl checks for compiler characteristics dnl AC_C_CHAR_UNSIGNED dnl DEFS __CHAR_UNSIGNED__ if char is unsigned +test -d 'include/cln' || mkdir -p 'include/cln' CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,[CL_INTPARAM_CROSS],include/cln/intparam.h,cl_cv_file_intparam_h) dnl builds include/cln/intparam.h CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,[CL_FLOATPARAM_CROSS],include/cln/floatparam.h,cl_cv_file_floatparam_h)
Ooops. Can you, please, word a comment what this line does and why, and I'll happily apply it. I'm afraid someone will remove it again some day because it looks sooo much like nonsense. (Incidentally, that is exactly what happened to that poor line recently.)
BTW, --with-gmp=PREFIX doesn't work properly and is very confusing. It doesn't set correct linker flags, so the *run-time* linker either can't find libgmp.so or even worse -- uses one found in the default library search path.
That feature is useful for people like Paul Zimmermann, who have fifty-some versions of libgmp sitting in /opt/. Most people will have only one version of libgmp isntalled at a more common prefix and won't be interested in it. And it can only work for shared libraries which record their dependencies. That being said, it is working just fine over here: Step 1, install GMP in non-standard prefix: $ tar xjf gmp-4.2.2.tar.bz2 $ cd gmp-4.2.2 $ ./configure --prefix=/opt/gmp-4.2.2 $ make install Step 2, build CLN using the newly built gmp: $ tar xjf cln-1.2.2.tar.bz2 $ cd cln-1.2.2 $ ./configure --with-gmp=/opt/gmp-4.2.2 $ make Step 3, link applications with -cln will pull in that libgmp: $ ldd src/.libs/libcln.so.5.0.2 libgmp.so.3 => /opt/gmp-4.2.2/lib/libgmp.so.3 (0x00002baa170bf000) [...] And LD_LIBRARY_PATH does not contain /opt/gmp-4.2.2 and I do have a /usr/lib/libgmp.so.3 on my system which would have been used without specifying a GMP prefix. Cheers -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Dear Richard, On Sun, Apr 06, 2008 at 09:47:04PM +0200, Richard B. Kreckel wrote:
Ooops. Can you, please, word a comment what this line does and why, and I'll happily apply it. I'm afraid someone will remove it again some day because it looks sooo much like nonsense.
[PATCH] configure.ac: create subdirectory to hold auto-generated headers. This is necessary for VPATH builds (i.e. when build directory is different from the source one). --- configure.ac | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index d9c5d66..32325d9 100644 --- a/configure.ac +++ b/configure.ac @@ -154,6 +154,13 @@ dnl checks for compiler characteristics dnl AC_C_CHAR_UNSIGNED dnl DEFS __CHAR_UNSIGNED__ if char is unsigned + +dnl Create a subdirectory in the ${top_builddir} to hold auto-generated +dnl headers. This subdirectory does not exist when ${top_builddir} != ${top_srcdir} +dnl (a.k.a. "VPATH build"). +if test ! -d include/cln; then + AS_MKDIR_P([include/cln]) +fi CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,[CL_INTPARAM_CROSS],include/cln/intparam.h,cl_cv_file_intparam_h) dnl builds include/cln/intparam.h CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,[CL_FLOATPARAM_CROSS],include/cln/floatparam.h,cl_cv_file_floatparam_h) -- 1.5.4.2
That feature is useful for people like Paul Zimmermann, who have fifty-some versions of libgmp sitting in /opt/.
I understand why such feature is useful. But it doesn't work properly. That is, /usr/lib/libgmp.so.? is used anyway, unless I manually set LDFLAGS, i.e. LDFLAGS="-Wl,--rpath=~/package/gmp/4.2.2/lib" ../configure --with-gmp=~/package/gmp/4.2.2 --disable-static Best regards, Alexei -- All science is either physics or stamp collecting.
Dear Alexei, You wrote:
I understand why such feature is useful. But it doesn't work properly.
My point in that last email was to assert that it *does* work.
That is, /usr/lib/libgmp.so.? is used anyway, unless I manually set LDFLAGS, i.e.
LDFLAGS="-Wl,--rpath=~/package/gmp/4.2.2/lib" ../configure --with-gmp=~/package/gmp/4.2.2 --disable-static
Are you absolutely 100% sure? I swear I don't have to manually set LDFLAGS. I just tried again just using --with-gmp=/opt/gmp-4.2.2 --disable-static and the link line looks like this: g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtbeginS.o .libs/cl_alloca.o .libs/cl_as_exception.o [...] -Wl,--rpath -Wl,/opt/gmp-4.2.2/lib -Wl,--rpath -Wl,/opt/gmp-4.2.2/lib -L/opt/gmp-4.2.2/lib /opt/gmp-4.2.2/lib/libgmp.so -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/crtn.o -Wl,-soname -Wl,libcln.so.5 -o .libs/libcln.so.5.0.2 Cheers -richy. PS: I've applied the two patches you sent. Thanks. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
participants (3)
-
Alexei Sheplyakov
-
Bruno Haible
-
Richard B. Kreckel