Ticket #14426: ecl-12.12.1.p2.diff

File ecl-12.12.1.p2.diff, 5.0 KB (added by jdemeyer, 9 years ago)
  • SPKG.txt

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1365419504 -7200
    # Node ID eff222c835df5344fe5ad528db63287ff484625a
    # Parent  6c2567358f7165b2af602c90f2daf43d8e0a5903
    #14426: write_error.patch: avoid an infinite loop when writing to stderr fails
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    4141 * Deleting the following directories saves space: without doing
    4242   this, the spkg can grow from under 2.5 megabytes to almost 7
    4343   megabytes.  Deleting these files is done automatically by the
    44    `spkg-make` script.
     44   `spkg-src` script.
    4545   - The directory src/msvc/
    4646   - The directory src/src/gc-unstable
    4747   - The directory src/src/libffi
     
    5454   Building with --enable-unicode=yes, the default in the latest ECL
    5555   source, leads to problems with some strings in the Sage-Maxima-ECL
    5656   interface.
    57  * Note: the way we configure Sage, CXX and CXXFLAGS are unused.
    5857 * Note: for the time being, ECL is built single threaded library as it
    5958   seems to interact badly with the pexpect interface and Sage's signal
    6059   handling when built multithreaded.
     
    6867
    6968== Changelog ==
    7069
     70=== ecl-12.12.1.p2 (Jeroen Demeyer, 9 April 2013) ===
     71 * #14426: write_error.patch: avoid an infinite loop when reporting
     72   an error while writing to stderr.
     73 * Rename spkg-make to spkg-src.
     74 * Don't unset MAKEFLAGS (it was not clear why this was needed).
     75 * It seems no longer needed to disable Altivec.
     76 * Support ECL_CONFIGURE environment variable for options to
     77   ./configure.
     78
    7179=== ecl-12.12.1.p1 (Jean-Pierre Flori, 18 December 2012) ===
    7280 * #9167: Resolve ecl.dll conflict on Cygwin.
    7381 * Add a patch (implib.patch) to follow usual naming scheme for dlls on Cygwin
  • new file patches/write_error.patch

    diff --git a/patches/write_error.patch b/patches/write_error.patch
    new file mode 100644
    - +  
     1diff -ru src/src/c/file.d b/src/c/file.d
     2--- src/src/c/file.d    2012-12-07 22:01:02.000000000 +0100
     3+++ b/src/c/file.d      2013-04-10 09:07:24.537513659 +0200
     4@@ -3335,7 +3335,8 @@
     5        ecl_disable_interrupts();
     6        do {
     7                out = fwrite(c, sizeof(char), n, IO_STREAM_FILE(strm));
     8-       } while (out < n && restartable_io_error(strm, "fwrite"));
     9+        /* Ignore write errors to stderr to avoid an infinite loop */
     10+       } while (out < n && (IO_STREAM_FILE(strm) != stderr) && restartable_io_error(strm, "fwrite"));
     11        ecl_enable_interrupts();
     12        return out;
     13 }
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    4141fi
    4242
    4343if [ "x$SAGE_DEBUG" = "xyes" ] ; then
    44     CFLAGS="$CFLAGS -g -O0"
    45     CXXFLAGS="$CXXFLAGS -g -O0"
     44    CFLAGS="-g -O0 $CFLAGS"
     45    CXXFLAGS="-g -O0 $CXXFLAGS"
    4646else
    4747    CFLAGS="-g -O2 $CFLAGS"
    4848    CXXFLAGS="-g -O2 $CXXFLAGS"
    4949fi
    5050
    51 if [ "`uname -sm`" = "Darwin Power Macintosh" ] ; then
    52 # Disabling altivec instructions (trac 11297)
    53     CFLAGS="$CFLAGS -mno-altivec -mabi=no-altivec"
    54     export CFLAGS
    55 fi
    56 
    5751# These are all used by GNU to specify compilers.
    5852echo "Using CC=$CC"
    5953echo "Using CXX=$CXX"
     
    7367export CPPFLAGS
    7468export LDFLAGS
    7569
    76 # End of pretty general spkg-install file.
    77 # Now do the specific things needed for this package (ECL)
    78 
    79 # 'export MAKE='make -j n' where n>1, breaks ECL builds, so use only one thread
     70# Building ECL in parallel doesn't work, so use only 1 thread
    8071MAKE="$MAKE -j1"
    8172
    82 # We clear MAKEFLAGS because of issues on OS X.
    83 if [ "$UNAME" = "Darwin" ]; then
    84     export MAKEFLAGS=
    85 fi
    8673
    87 if [ "x`uname -sm`" = "xSunOS i86pc" ] && [ "x$SAGE64" = xyes ]  ; then
     74if [ "`uname -sm`" = "SunOS i86pc" ] && [ "x$SAGE64" = xyes ]; then
    8875    # Need to add --with-dffi=no to disable assembly code on OpenSolaris x64.
    8976    # and Solaris 10 on x64.
    9077    # The option is only given if all the following are true
    9178    # 1) Solaris, Solaris Express or OpenSolaris (SunOS)
    9279    # 2) Intel or AMD CPU
    9380    # 3) 64-bit build
    94     ./configure --prefix="$SAGE_LOCAL" --with-gmp-prefix=$SAGE_LOCAL \
    95       --libdir="$SAGE_LOCAL/lib" --with-dffi=no --disable-threads \
    96       --enable-unicode=no
    97 else
    98     ./configure --prefix="$SAGE_LOCAL" --with-gmp-prefix=$SAGE_LOCAL \
    99       --libdir="$SAGE_LOCAL/lib" --disable-threads \
    100       --enable-unicode=no
     81    ECL_CONFIGURE="--with-dffi=no $ECL_CONFIGURE"
    10182fi
    10283
     84./configure --prefix="$SAGE_LOCAL" --with-gmp-prefix=$SAGE_LOCAL \
     85    --libdir="$SAGE_LOCAL/lib" --disable-threads \
     86    --enable-unicode=no $ECL_CONFIGURE
    10387if [ $? -ne 0 ]; then
    10488    echo >&2 "Error - Failed to configure ECL ... exiting"
    10589    exit 1
  • (a) a/spkg-make vs. (b) b/spkg-src

    diff --git a/spkg-make b/spkg-src
    rename from spkg-make
    rename to spkg-src
    a b  
    77#
    88# HOW TO MAKE THE SPKG:
    99# 1) cp [pathto]/ecl-$ECLVERSION.tar.gz ../
    10 # 2) ./spkg-make
     10# 2) ./spkg-src
    1111# 3) cd ..; sage -pkg ecl-[version]
    1212#
    1313# AUTHOR: Jeroen Demeyer (November 2011)
    1414
    1515# Sanity check: must be run from current directory
    16 if ! [ -f spkg-make ]; then
     16if ! [ -f spkg-src ]; then
    1717    echo >&2 "This script must be run from its own source directory!"
    1818    exit 1
    1919fi