[R-SIG-Mac] ANSI escape weirdness on M1 (libedit issue?)
Gábor Csárdi
c@@rd|@g@bor @end|ng |rom gm@||@com
Fri Nov 12 23:11:56 CET 2021
Thanks for the answer, I actually just saw this today, it went into my
spam folder for some reason.
Anyway, I tried to build readline 5.2 and it wasn't that bad. I got
the source for the libreadline-gplv2-dev Debian package
(https://packages.debian.org/stretch/libreadline-gplv2-dev). This is
readline 5.2 plus some readline patches and some more Debian patches.
It is easiest to do this in Debian, where `apt-get source` applies the
patches automatically. I used Debian Buster. After that I only had to
add two
#include <sys/ioctl.h>
lines to terminal.c and rltty.c.
I put the patched tarball here if you don't want to patch it yourself:
https://files.r-hub.io/readline/ I did build R-devel against it, and
it seems to work great.
In summary, this should do it:
curl -O https://files.r-hub.io/readline/readline5-5.2+dfsg-1.tar.gz
tar xzf readline5-5.2+dfsg-1.tar.gz
cd readline5-5.2+dfsg
./configure --prefix=/opt/R/arm64 --enable-static --enable-shared=NO
make
sudo make install
(Some info doc is missing for me, but that does not seem important.)
I am hopeful that this will work out.
Best,
Gabor
On Wed, Nov 3, 2021 at 11:00 PM Simon Urbanek
<simon.urbanek using r-project.org> wrote:
>
> Gabor,
>
> as you can see the x86_64 readline is a very old build 5.2-14 - it is the last version released under GPL-2. Later versions are to my best knowledge license-incompatible since they are released under GPL-3 only and thus do not allow the use in GPL-2 software. The arm64 version currently relies on the system library which is libedit. If it is of interest I can check if readline 5.2 can be built for arm64, but it predates the architecture by quite a few years ;).
>
> Cheers,
> Simon
>
>
> > On Nov 4, 2021, at 7:12 AM, Gábor Csárdi <csardi.gabor using gmail.com> wrote:
> >
> > On Wed, Nov 3, 2021 at 7:00 PM Prof Brian Ripley <ripley using stats.ox.ac.uk> wrote:
> > [...]
> >> AFAIK the reason for not distributing readline with binary distributions
> >> of R is perceived licence restrictions.
> >
> > So is the license different for x86_64? Because those builds come with readline:
> > ❯ R-4.1 -q -e 'extSoftVersion()[["readline"]]'
> >> extSoftVersion()[["readline"]]
> > [1] "5.2"
> >
> > Whereas the arm64 build has:
> > ❯ R-4.1-arm64 -q -e 'extSoftVersion()[["readline"]]'
> >> extSoftVersion()[["readline"]]
> > [1] "4.2 (EditLine wrapper)"
> >
> > Gabor
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac using r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
>
More information about the R-SIG-Mac
mailing list