On 12/9/20 3:55 PM, Testing Purposes wrote:
In Appendix A of the official Bash manual, it says that "suggestions and
‘philosophical’ bug reports" are requested — so please bear with me while I
get a bit philosophical about the experience that led to this thread.
Sure.
-------------
MY EXPERIENCE:
-------------
When Bash 5.1 came out two days ago, I was excited to build it and try it!
However, since I knew the latest version of Bash was dependent on the
latest version of Readline in order to work properly, it was reasonable for
a non-expert like me to assume that Readline also needed to be built. This
is especially true since I could find no step-by-step building instructions
or clear-cut requirements in either the online or offline documentation.
That's an interesting perspective, since the INSTALL file covers this, and
the steps ("configure" ; "make") are contained in it.
Nonetheless, as an experiment, I went ahead and built Bash 5.1 anyway —
without first building its core dependency, Readline 8.1.
`configure' takes care of this for you. Since you didn't specify that you
wanted to use a separate version of readline (INSTALL tells you how to do
this), it made sure to use the appropriate included version. If you had
needed to build and install some dependency, or specified the wrong
version, configure would have told you.
I was surprised to discover that everything worked perfectly!
I hope it wasn't that big a surprise.
And, when I pasted a script into LXTerminal, all the pasted text was
selected / highlighted by default — a brand-new behavior. That was my
tip-off that my build of Bash 5.1 was somehow using Readline 8.1 — even
though I had not consciously done anything to build or install it.
That's the idea -- you don't have to.
So, on my Debian Buster-based Raspberry Pi OS system, I ran this command
line to search for all Readline-related packages:
sudo apt list --installed | grep readline
And this was the output:
libreadline-dev/stable,now 7.0-5 arm64 [installed]
libreadline7/stable,now 7.0-5 arm64 [installed]
readline-common/stable,stable,now 7.0-5 all [installed]
And indeed, 7.0 is the Readline version that currently comes with Debian:
https://packages.debian.org/source/buster/readline
<https://packages.debian.org/source/buster/readline>
Yet I also know that 5.0 is the Bash version that currently comes with
Debian — so I was a bit surprised that Debian's version of Bash wasn't
accompanied by its "sister" package — Readline 8.0:
https://packages.debian.org/buster/bash
<https://packages.debian.org/buster/bash>
Since you are savvy enough to check that far, you could have looked at the
bash binary that you had just built and checked whether or not it used any
external libraries, using `ldd'.
It was at this point that I realized the latest version of Readline must
have been included with the Bash source code — and that I didn't need to do
anything more.
Nonetheless, like any good "amateur scientist" that wasn't sure about his
theory, it was only natural to see if I could confirm my hypothesis.
Absolutely. I think reading INSTALL would have cleared that up for you,
especially the description of the `--with-installed-readline' configure
option.
Bash is a critical piece of software to me — so I wanted to make sure that
everything was proper. I assumed it would be a simple task.
But I was surprised to discover that there was no easy way to determine
what version of Readline my copy of Bash was using — even though Bash is
intimately dependent on having the proper version of Readline.
The thing is, configure takes care of that for you so you don't have to
figure it out yourself.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/