From maechler at stat.math.ethz.ch  Tue May 24 16:30:11 2016
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Tue, 24 May 2016 16:30:11 +0200
Subject: [Rd] Latest R-devel build failing on OS X
In-Reply-To: <C29B5317-0925-4439-B736-FB210FD761DD@gmail.com>
References: <70CBF2CD-1B4C-48CA-AFFD-E3F1DDBDC073@nyu.edu>
	<1771C0EE-8B59-4921-B648-60DB197824C2@gmail.com>
	<22332.40522.266571.404208@stat.math.ethz.ch>
	<25CBCECC-52C0-4228-978B-44BE848C7CF3@gmail.com>
	<604481D6-9DE0-49D1-89A6-41B8A8D537B7@gmail.com>
	<0C7F9946-4666-493C-BE88-5805B56902A5@gmail.com>
	<20160518220330.GA1621@ofb.net>
	<22333.30916.298334.864817@stat.math.ethz.ch>
	<22333.33080.885593.770604@stat.math.ethz.ch>
	<22340.13100.530498.599867@stat.math.ethz.ch>
	<C29B5317-0925-4439-B736-FB210FD761DD@gmail.com>
Message-ID: <22340.25971.182938.655839@stat.math.ethz.ch>

>>>>> peter dalgaard <pdalgd at gmail.com>
>>>>>     on Tue, 24 May 2016 13:47:27 +0200 writes:

    > I had a regression in config.site so the nightly build didn't. Retrying....
    > Looks like it will build, but the ctl-R, ctl-C bug is still present on OSX (w/Simon's libs). This _was_ fixed for a while, was it not?

I thought it was never fixed, for readline versions 5.x (or all
of readline_version < 6.3 ?) because the patch assumed features
not available, e.g., for Frederik (who got compilation errors
which I think you confirmed on pre-6 readline).

I remember you having two different readlines installed on OSX
but the standard Mac binary (from CRAN, i.e. Simon) would use
the old readline version ?

so that whole  resetReadline() solution is now conditionalized inside

#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0603
   ...
   ...
#endif

and hence the previous code (which is buggy) is used for
readline versions < 6.3.
As a consequence the bug is only fixed for readline >= 6.3,
because the current patch did not compile and hence seemed not
appropriate for  readline < 6.3 (and hence the above conditionalization).


    > (The NEWS entry is also wrong: The issue existed before readline 6.3)

Aah.. you are right. The API change with 6.3 was for the other, the
"SIGWINCH" bug.

Here's a an update proposal for that NEWS entry :

         ? The API for readline libraries >= 6.3 had changed such
           terminal window resizes where no longer properly signalled
           (PR#16604).  Also, ?Ctrl C? in incremental search behaved
           confusingly in R (unix) consoles (PR#16603) also for older
           readline versions. These have been fixed (for readline >=
           6.3 only), thanks to patches by Frederick Eaton.


Martin

    > -pd

    > On 24 May 2016, at 12:55 , Martin Maechler <maechler at stat.math.ethz.ch> wrote:

    >> 
    >> Can you (Frederick, Peter, Keith, but ideally others, too)
    >> confirm that you don't see any problems anymore, when building a
    >> version of R-devel from sources that are newer 
    >> than (or equal to)  svn revision 70632 (2016-05-19 10:59:51, see below)?
    >> 
    >> I'm asking because the question is open if these should be
    >> "back ported" to R 3.3.0 patched or not.
    >> 
    >> Best regards,
    >> Martin
    >> 
    >>>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
    >>>>>>> on Thu, 19 May 2016 11:02:48 +0200 writes:
    >> 
    >>>>>>> <frederik at ofb.net>
    >>>>>>> on Wed, 18 May 2016 15:03:31 -0700 writes:
    >> 
    >>>>> Readline <= 6.2 shouldn't require the SIGWINCH patch, so
    >>>>> if older versions have trouble finding rl_resize_terminal
    >>>>> then you could wrap a macro around that part.
    >> 
    >>>> I find python related patches that use
    >> 
    >>>> #ifdef HAVE_RL_RESIZE_TERMINAL
    >> 
    >>>> so they must have configured for that.  We could and
    >>>> probably should do the same, but as a Linux_only guy
    >>>> currently (even basically only one flavor of Linux), I'd
    >>>> appreciate others to produce code for that.
    >> 
    >>> Actually that was easy (in hindsight.. I took too long!)
    >>> enough, so I've now committed
    >> 
    >>> ------------------------------------------------------------------------
    >>> r70632 | maechler | 2016-05-19 10:59:51 +0200 (Thu, 19 May 2016) | 1 line
    >>> Changed paths:
    >>> M configure
    >>> M configure.ac
    >>> M src/include/config.h.in
    >>> M src/unix/sys-std.c
    >> 
    >>> check for rl_resize_terminal() now
    >>> ------------------------------------------------------------------------
    >> 
    >>> ... and Keith should even not see the warning anymore
    >>> (nor Peter the error, when compiling using readline 5.x instead of 6.[23]).
    >> 
    >> 
    >> [...........]

    > -- 
    > Peter Dalgaard, Professor,
    > Center for Statistics, Copenhagen Business School
    > Solbjerg Plads 3, 2000 Frederiksberg, Denmark
    > Phone: (+45)38153501
    > Office: A 4.23
    > Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] Latest R-devel build failing on OS X
Martin Maechler