Skip to content

Commit

Permalink
Trac #20585: Update ecl to 16.1.2
Browse files Browse the repository at this point in the history
Sage-on-gentoo currently uses ecl-16+. It solves some problems when
building sage with gmp instead of mpir.

The upgrade causes a lot of formatting and some numerical noise.

Tarball produced by `spkg-src`:
[http://www.lmona.de/files/sage/ecl-16.1.2.tar.bz2]

URL: http://trac.sagemath.org/20585
Reported by: fbissey
Ticket author(s): François Bissey
Reviewer(s): Volker Braun
  • Loading branch information
Release Manager authored and vbraun committed May 22, 2016
2 parents 99d4e89 + f7973e0 commit 2a19229
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 103 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/ecl/checksums.ini
@@ -1,4 +1,4 @@
tarball=ecl-VERSION.tar.bz2
sha1=a2ba6f17df11e77149869d7d71c2175c284778ce
md5=fdca3688a9171518f301e4200f82532a
cksum=3217462385
sha1=66f99db852b23660668e8c1d5304ec842558d1a2
md5=14740f65bb971127bb10caaff855361e
cksum=1956945543
2 changes: 1 addition & 1 deletion build/pkgs/ecl/package-version.txt
@@ -1 +1 @@
15.3.7.p1
16.1.2.p0
2 changes: 1 addition & 1 deletion build/pkgs/ecl/patches/src/gmp.patch
Expand Up @@ -3,7 +3,7 @@ index bc8d84b..e076e09 100644
--- b/src/configure.ac
+++ a/src/configure.ac
@@ -11,7 +11,7 @@ dnl
AC_INIT([ecl],[15.3.7],[])
AC_INIT([ecl],[16.1.2],[])
AC_REVISION([$Revision$])
AC_CONFIG_SRCDIR([bare.lsp.in])
-AC_CONFIG_AUX_DIR([gmp])
Expand Down
150 changes: 74 additions & 76 deletions build/pkgs/ecl/patches/src/implib.patch
@@ -1,8 +1,27 @@
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 63d8997..79ff24d 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -233,6 +233,8 @@ AC_SUBST(LIBPREFIX)dnl Name components of a statically linked library
diff -Naur a/src/Makefile.in b/src/Makefile.in
--- a/src/Makefile.in 2016-05-11 13:10:51.816673752 +1200
+++ b/src/Makefile.in 2016-05-11 13:33:52.743812049 +1200
@@ -184,10 +184,14 @@
if test -s $$i ; then \
if echo $$i | grep dll; then \
$(INSTALL_LIBRARY) $$i $(DESTDIR)$(bindir); \
- fi; \
- $(INSTALL_LIBRARY) $$i $(DESTDIR)$(libdir); \
+ else \
+ $(INSTALL_LIBRARY) $$i $(DESTDIR)$(libdir); \
+ fi \
fi \
done
+ if [ "x@IMPLIB_NAME@" != "x" -a -f "@IMPLIB_NAME@" ]; then \
+ $(INSTALL_LIBRARY) @IMPLIB_NAME@ $(DESTDIR)$(libdir); \
+ fi
if [ "x@SONAME3@" != "x" -a -f "@SONAME3@" ]; then \
( $(INSTALL_LIBRARY) @SONAME3@ $(DESTDIR)$(libdir) && \
cd $(DESTDIR)$(libdir) && $(RM) -f @SONAME2@ @SONAME1@ @SONAME@ && \
diff -Naur a/src/aclocal.m4 b/src/aclocal.m4
--- a/src/aclocal.m4 2016-05-11 13:10:51.816673752 +1200
+++ b/src/aclocal.m4 2016-05-11 13:27:44.983968151 +1200
@@ -232,6 +232,8 @@
AC_SUBST(LIBEXT)
AC_SUBST(SHAREDEXT)dnl Name components of a dynamically linked library
AC_SUBST(SHAREDPREFIX)
Expand All @@ -11,7 +30,7 @@ index 63d8997..79ff24d 100644
AC_SUBST(OBJEXT)dnl These are set by autoconf
AC_SUBST(EXEEXT)
AC_SUBST(INSTALL_TARGET)dnl Which type of installation: flat directory or unix like.
@@ -242,6 +244,8 @@ ECL_GC_DIR=gc-unstable
@@ -241,6 +243,8 @@
ECL_LDRPATH=''
SHAREDEXT='so'
SHAREDPREFIX='lib'
Expand All @@ -20,55 +39,56 @@ index 63d8997..79ff24d 100644
LIBPREFIX='lib'
LIBEXT='a'
PICFLAG='-fPIC'
@@ -253,6 +257,8 @@ THREAD_OBJ="$THREAD_OBJ threads/process threads/queue threads/mutex threads/cond
@@ -252,6 +256,8 @@
clibs=''
SONAME=''
SONAME_LDFLAGS=''
+IMPLIB_NAME=''
+IMPLIB_LDFLAGS=''
case "${host_os}" in
# libdir may have a dollar expression inside
linux*)
@@ -355,10 +361,14 @@ case "${host_os}" in
shared='yes'
THREAD_CFLAGS='-D_THREAD_SAFE'
THREAD_LIBS='-lpthread'
- SHARED_LDFLAGS="-shared ${LDFLAGS}"
- BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
- SHAREDPREFIX=''
+ SHARED_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
+ BUNDLE_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
+ SHAREDPREFIX='cyg'
SHAREDEXT='dll'
+ IMPLIB_PREFIX='lib'
+ IMPLIB_EXT='dll.a'
+ IMPLIB_NAME="${IMPLIB_PREFIX}ecl.${IMPLIB_EXT}"
+ IMPLIB_LDFLAGS="-Wl,--out-implib,${IMPLIB_NAME}"
PICFLAG=''
if test "x$host_cpu" = "xx86_64" ; then
# Our GMP library is too old and does not support
@@ -373,10 +383,14 @@ case "${host_os}" in
linux-androideabi)
thehost='android'
@@ -369,10 +375,14 @@
shared='yes'
THREAD_CFLAGS='-D_THREAD_SAFE'
THREAD_LIBS='-lpthread'
- SHARED_LDFLAGS="-shared ${LDFLAGS}"
- BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
- SHAREDPREFIX=''
+ SHARED_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
+ BUNDLE_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
+ SHAREDPREFIX='cyg'
SHAREDEXT='dll'
+ IMPLIB_PREFIX='lib'
+ IMPLIB_EXT='dll.a'
+ IMPLIB_NAME="${IMPLIB_PREFIX}ecl.${IMPLIB_EXT}"
+ IMPLIB_LDFLAGS="-Wl,--out-implib,${IMPLIB_NAME}"
PICFLAG=''
if test "x$host_cpu" = "xx86_64" ; then
# Our GMP library is too old and does not support
@@ -387,11 +397,15 @@
enable_threads='yes'
THREAD_CFLAGS='-D_THREAD_SAFE'
THREAD_GC_FLAGS='--enable-threads=win32'
- SHARED_LDFLAGS=''
- BUNDLE_LDFLAGS=''
+ SHARED_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
+ BUNDLE_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
SHAREDPREFIX=''
SHAREDEXT='dll'
+ IMPLIB_PREFIX='lib'
+ IMPLIB_EXT='dll.a'
+ IMPLIB_NAME="${IMPLIB_PREFIX}ecl.${IMPLIB_EXT}"
+ IMPLIB_LDFLAGS="-Wl,--out-implib,${IMPLIB_NAME}"
PICFLAG=''
INSTALL_TARGET='flatinstall'
TCPLIBS='-lws2_32'
diff --git a/src/compile.lsp.in b/src/compile.lsp.in
index 773fe99..697c115 100755
--- a/src/compile.lsp.in
+++ b/src/compile.lsp.in
@@ -58,7 +58,7 @@
THREAD_CFLAGS='-D_THREAD_SAFE'
THREAD_GC_FLAGS='--enable-threads=win32'
- SHARED_LDFLAGS=''
- BUNDLE_LDFLAGS=''
+ SHARED_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
+ BUNDLE_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
SHAREDPREFIX=''
SHAREDEXT='dll'
- PICFLAG=''
+ IMPLIB_PREFIX='lib'
+ IMPLIB_EXT='dll.a'
+ IMPLIB_NAME="${IMPLIB_PREFIX}ecl.${IMPLIB_EXT}"
+ IMPLIB_LDFLAGS="-Wl,--out-implib,${IMPLIB_NAME}"
+ PICFLAG=''
INSTALL_TARGET='flatinstall'
TCPLIBS='-lws2_32'
;;
diff -Naur a/src/compile.lsp.in b/src/compile.lsp.in
--- a/src/compile.lsp.in 2016-05-11 13:10:51.888673915 +1200
+++ b/src/compile.lsp.in 2016-05-11 13:30:13.270308872 +1200
@@ -61,7 +61,7 @@
;;;
;;; * Add include path to not yet installed headers, and remove include flag
;;; (-I) to installed directory, and Notice that we must explicitely mention
Expand All @@ -77,20 +97,19 @@ index 773fe99..697c115 100755
;;; with an already installed copy of ECL.
;;;
(setq c::*cc-flags*
@@ -140,7 +140,7 @@
@@ -143,7 +143,7 @@
;;;
;;; We do not need the -rpath flag for the library, nor -lecl.
;;;
-(let* ((c::*ld-shared-flags* #-msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @SONAME_LDFLAGS@ @CORE_LIBS@ @FASL_LIBS@ @LIBS@"
+(let* ((c::*ld-shared-flags* #-msvc " @IMPLIB_LDFLAGS@ @SHARED_LDFLAGS@ @LDFLAGS@ @SONAME_LDFLAGS@ @CORE_LIBS@ @FASL_LIBS@ @LIBS@"
#+msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @STATICLIBS@ @CLIBS@")
#+msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @STATICLIBS@ @CLIBS@")
(c::*cc-flags* (concatenate 'string "-DECL_API -I@true_builddir@/c " c::*cc-flags*))
(extra-args nil))
diff --git a/src/configure.ac b/src/configure.ac
index e076e09..15d307a 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -588,6 +588,20 @@ AC_SUBST(SONAME1)
diff -Naur a/src/configure.ac b/src/configure.ac
--- a/src/configure.ac 2016-05-11 13:10:51.889673917 +1200
+++ b/src/configure.ac 2016-05-11 13:19:07.721791089 +1200
@@ -600,6 +600,20 @@
AC_SUBST(SONAME)
AC_SUBST(SONAME_LDFLAGS)

Expand All @@ -111,24 +130,3 @@ index e076e09..15d307a 100644
dnl Related to that, the package version number
ECL_VERSION_NUMBER=$(($PACKAGE_MAJOR * 10000 + $PACKAGE_MINOR * 100 + $PACKAGE_LEAST))
AC_SUBST(ECL_VERSION_NUMBER)
diff --git a/src/Makefile.in b/src/Makefile.in
index 12e9f05..74bc216 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -174,10 +174,14 @@ install:
if test -s $$i ; then \
if echo $$i | grep dll; then \
$(INSTALL_LIBRARY) $$i $(DESTDIR)$(bindir); \
- fi; \
- $(INSTALL_LIBRARY) $$i $(DESTDIR)$(libdir); \
+ else \
+ $(INSTALL_LIBRARY) $$i $(DESTDIR)$(libdir); \
+ fi \
fi \
done
+ if [ "x@IMPLIB_NAME@" != "x" -a -f "@IMPLIB_NAME@" ]; then \
+ $(INSTALL_LIBRARY) @IMPLIB_NAME@ $(DESTDIR)$(libdir); \
+ fi
if [ "x@SONAME@" != "x" -a -f "@SONAME@" ]; then \
( cd $(DESTDIR)$(libdir) && $(RM) -f @SONAME3@ @SONAME2@ @SONAME1@ && \
mv @SONAME@ @SONAME3@ && \
25 changes: 13 additions & 12 deletions build/pkgs/ecl/patches/write_error.patch
@@ -1,15 +1,16 @@
diff --git b/src/c/file.d a/src/c/file.d
index de7ba7b..c1f8c1e 100755
--- b/src/c/file.d
+++ a/src/c/file.d
@@ -3341,7 +3341,9 @@ output_stream_write_byte8(cl_object strm, unsigned char *c, cl_index n)
ecl_disable_interrupts();
do {
out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm));
- } while (out < n && restartable_io_error(strm, "fwrite"));
+ /* Ignore write errors to stderr to avoid an infinite loop */
diff -Naur ecl-16.1.2.orig/src/c/file.d ecl-16.1.2/src/c/file.d
--- ecl-16.1.2.orig/src/c/file.d 2016-05-11 13:10:51.867673867 +1200
+++ ecl-16.1.2/src/c/file.d 2016-05-11 14:44:48.121907307 +1200
@@ -3354,8 +3354,10 @@
ecl_disable_interrupts();
do {
out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm));
- } while (out < n && restartable_io_error(strm, "fwrite"));
- ecl_enable_interrupts();
+ /* Ignore write errors to stderr to avoid an infinite loop */
+ } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite"));
+
ecl_enable_interrupts();
return out;
+ ecl_enable_interrupts();
return out;
}

4 changes: 2 additions & 2 deletions build/pkgs/ecl/spkg-src
Expand Up @@ -31,7 +31,7 @@ ECLTARBALL="$SAGE_DISTFILES/ecl-$ECLVERSION.tar.bz2"
rm -rf ecl-*

# Download and extract upstream tarball
sage-download-file https://common-lisp.net/project/ecl/files/release/$ECLVERSION/ecl-$ECLVERSION.tgz |tar xz
sage-download-file https://common-lisp.net/project/ecl/static/files/release/ecl-$ECLVERSION.tgz |tar xz
cd ecl-$ECLVERSION

# Some patches are applied here, if they need to be applied before
Expand All @@ -44,7 +44,7 @@ for patch in ../patches/src/*.patch; do
done

# Remove unneeded files to save space
rm -r msvc src/gc-unstable src/gmp/ src/libffi
rm -r msvc src/gmp/ src/libffi

# Run autotools
cd src
Expand Down
2 changes: 1 addition & 1 deletion src/sage/calculus/calculus.py
Expand Up @@ -723,7 +723,7 @@ def nintegral(ex, x, a, b,
Now numerically integrating, we see why the answer is wrong::
sage: f.nintegrate(x,0,1)
(-480.0000000000001, 5.329070518200754e-12, 21, 0)
(-480.0000000000001, 5.32907051820075e-12, 21, 0)
It is just because every floating point evaluation of return -480.0
in floating point.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/interfaces/interface.py
Expand Up @@ -521,9 +521,9 @@ def function_call(self, function, args=None, kwds=None):
EXAMPLES::
sage: maxima.quad_qags(x, x, 0, 1, epsrel=1e-4)
[0.5,5.5511151231257...e-15,21,0]
[0.5,0.55511151231257...e-14,21,0]
sage: maxima.function_call('quad_qags', [x, x, 0, 1], {'epsrel':'1e-4'})
[0.5,5.5511151231257...e-15,21,0]
[0.5,0.55511151231257...e-14,21,0]
"""
args, kwds = self._convert_args_kwds(args, kwds)
self._check_valid_function_name(function)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/maxima_abstract.py
Expand Up @@ -1518,7 +1518,7 @@ def nintegral(self, var='x', a=0, b=1,
EXAMPLES::
sage: maxima('exp(-sqrt(x))').nintegral('x',0,1)
(0.5284822353142306, 4.16331413788384...e-11, 231, 0)
(0.5284822353142306, 0.41633141378838...e-10, 231, 0)
Note that GP also does numerical integration, and can do so to very
high precision very quickly::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/modules/free_module_element.pyx
Expand Up @@ -3857,11 +3857,11 @@ cdef class FreeModuleElement(Vector): # abstract base class
sage: type(vec)
<type 'sage.modules.vector_real_double_dense.Vector_real_double_dense'>
sage: answers
[(0.5, 5.551115123125784e-15, 21, 0), (0.3333333333333..., 3.70074341541719e-15, 21, 0), (0.45969769413186..., 5.103669643922841e-15, 21, 0)]
[(0.5, 5.55111512312578e-15, 21, 0), (0.3333333333333..., 3.70074341541719e-15, 21, 0), (0.45969769413186..., 5.10366964392284e-15, 21, 0)]

sage: r=vector([t,0,1], sparse=True)
sage: r.nintegral(t,0,1)
((0.5, 0.0, 1.0), {0: (0.5, 5.551115123125784e-15, 21, 0), 2: (1.0, 1.11022302462515...e-14, 21, 0)})
((0.5, 0.0, 1.0), {0: (0.5, 5.55111512312578e-15, 21, 0), 2: (1.0, 1.11022302462515...e-14, 21, 0)})

"""
# If Cython supported lambda functions, we would just do
Expand Down
4 changes: 2 additions & 2 deletions src/sage/tests/french_book/integration_doctest.py
Expand Up @@ -68,13 +68,13 @@
Sage example in ./integration.tex, line 430::
sage: sage.calculus.calculus.nintegral(sin(sin(x)), x, 0, 1)
(0.430606103120690..., 4.780688102287053...e-15, 21, 0)
(0.430606103120690..., 4.78068810228705...e-15, 21, 0)
Sage example in ./integration.tex, line 436::
sage: g(x) = sin(sin(x))
sage: g.nintegral(x, 0, 1)
(0.430606103120690..., 4.780688102287053...e-15, 21, 0)
(0.430606103120690..., 4.78068810228705...e-15, 21, 0)
Sage example in ./integration.tex, line 465::
Expand Down

0 comments on commit 2a19229

Please sign in to comment.