[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)

From: Chet Ramey
Subject: Re: Bash 5.1: rl_readline_version = 0x801 (shouldn't it be 0x0801 ?)
Date: Wed, 9 Dec 2020 18:00:14 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.5.1

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.


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

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    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]