Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#2369 closed task (fixed)

Listing libedit as dependency

Reported by: Ag. Hatzimanikas Owned by: Randy McMurchy
Priority: normal Milestone: 6.3
Component: BOOK Version: SVN
Severity: normal Keywords: libedit editline
Cc:

Description

As it was discussed and mentioned in - http://linuxfromscratch.org/pipermail/blfs-dev/2007-July/017567.html (discussion goes to August) - libedit should be tested for possible conflicts with readline.

Libedit is listed as an optional dependency for the Dash shell. It is also commented out in mysql instructions with a note that libedit causes more problems than it solves.

However that note was for an old unmaintained editline package.

Currently under testing is going to be used, the editline library in - http://www.thrysoee.dk/editline/

which is under active development.

Change History (10)

comment:1 by bdubbs@…, 16 years ago

Priority: highnormal

Changing priority. The current version is libedit-20070831-2.10.tar.gz (Aug 31 2007)

This is a bsd package that implements GNU readline functionality. The only reason to add it to a linux system is if the base package does not accept readline.

comment:2 by Randy McMurchy, 16 years ago

Summary: Listing libedit as dependency.Listing libedit as dependency

I think at this point we should either close this ticket as wont-fix or defer it until after BLFS-6.3 Here is from http://www.thrysoee.dk/editline/ :

At the moment libedit does not support UTF-8 and multi-byte character sets. This thread on the netbsd-users mailing list outlines what's missing: http://marc.info/?t=119056021900002&r=1&w=2

This alone should keep it out of the book for now, seeing how the readline library provides the same functionality and it is already installed in LFS.

Comments welcome.

comment:3 by alexander@…, 16 years ago

Indeed, calling isprint() is a no-no in multibyte locales. So, there is no point to mention libedit or editline when readline is also an option.

I.e., I agree with the original proposal in the referenced mail: mention libedit/editline if they provide the only means to edit command lines (as it is the case with dash, that doesn't support UTF-8 anyway), audit the listed packages that they prefer readline to alternatives if both are present.

comment:4 by dnicholson@…, 16 years ago

I think there is some misinformation here. It used to be the case that editline installed a readline.h header that overwrote the version from GNU readline. This obviously caused lots of problems with packages trying to link to readline.

This is no longer the case, though, and packages that want to use editline have to explicitly include <editline/readline.h>. Probably on the BSDs they symlink readline/readline.h -> editline/editline.h and libreadline.so -> libedit.so so they can use editline as a drop-in readline replacement. That's not the case here.

I know of 3 packages that will explicitly search for editline: dash, openssh and mysql. For dash and openssh (used in sftp), they are only compatible with editline and don't try to link to readline at all.

For mysql, there is a complicated matrix of how --with-libedit and --with-readline work together. If you pass --without-libedit or --without-readline or both, then it uses the system readline. If no flags are passed, the bundled libedit is used. For --with-readline --without-libedit, you get bundled readline. But the fact is that it can't work with the system editline at all (it searches for readline/readline.h).

This is obviously not an exhaustive search, but I think any worries about conflicts with readline are overblown. This package definitely provides new functionality for some packages. IMO, having command editing in sftp alone makes editline worthwhile.

comment:5 by Randy McMurchy, 16 years ago

I will concur that it appears safe enough to reference the library as a valid dependency for packages that support it. And it appears there is *no* conflict whatsoever with readline. I just built the package and here is what is installed (probably looks bad and unformatted on the wiki, see the -book mail for a formatted display):

rml@rmlinux: ~/build/libedit-20070831-2.10 > find destdir

destdir destdir/share destdir/share/man destdir/share/man/man5 destdir/share/man/man5/editrc.5 destdir/share/man/man3 destdir/share/man/man3/el_resize.3 destdir/share/man/man3/el_history_init.3 destdir/share/man/man3/el_init.3 destdir/share/man/man3/el_history.3 destdir/share/man/man3/el_source.3 destdir/share/man/man3/el_getc.3 destdir/share/man/man3/el_tok_line.3 destdir/share/man/man3/el_history_end.3 destdir/share/man/man3/el_push.3 destdir/share/man/man3/el_tok_init.3 destdir/share/man/man3/el_reset.3 destdir/share/man/man3/el_insertstr.3 destdir/share/man/man3/el_tok_end.3 destdir/share/man/man3/el_deletestr.3 destdir/share/man/man3/editline.3 destdir/share/man/man3/el_end.3 destdir/share/man/man3/el_parse.3 destdir/share/man/man3/el_gets.3 destdir/share/man/man3/el_tok_reset.3 destdir/share/man/man3/el_tok_str.3 destdir/share/man/man3/el_set.3 destdir/share/man/man3/el_get.3 destdir/share/man/man3/el_line.3 destdir/include destdir/include/histedit.h destdir/include/editline destdir/include/editline/readline.h destdir/lib destdir/lib/libedit.a destdir/lib/pkgconfig destdir/lib/pkgconfig/libedit.pc destdir/lib/libedit.so.0.0.26 destdir/lib/libedit.so.0 destdir/lib/libedit.la destdir/lib/libedit.so

I say let's do it. As Dan mentioned, having a history feature in sftp would be very useful.

Any other comments?

comment:6 by dnicholson@…, 16 years ago

About the UTF-8 issue: for dash and sftp, they already can't handle multibyte characters, so it wouldn't be an issue for them.

comment:7 by Ag. Hatzimanikas, 16 years ago

I usually build the dash/libedit combo at the very top of the BLFS toolchain and I didn't encounter any problems, (granted I don't build mysql). I also (sometimes) work in the shell and editline provides some basic line editing functionality.

We may add however a note in the Book, about moving /usr/lib/libedit.so* into /lib and make a symlink to /usr/lib/libedit.so, for those who have /usr in a different partition.

mv -v /usr/lib/libedit.so* /lib
ln -v -sf ../../lib/libedit.so /usr/lib/libedit.so

comment:8 by Randy McMurchy, 16 years ago

Owner: changed from blfs-book@… to Randy McMurchy
Status: newassigned

Since there were no other negative comments, I think libedit should be added to the OpenSSH instructions, but not the MySQL instructions.

SSH we've covered above and it looks entirely safe without conflicts with readline. MySQL is another story. It has a version of libedit in the source tree, but it is the old one that has the conflicts.

So the code in MySQL must look for readline specific stuff (which the old libedit provides). Though not tested, it doesn't appear the new libedit would work in MySQL so we should leave the libedit dependency out of it.

That means libedit will be a dependency in two packages (Dash and OpenSSH).

comment:9 by Randy McMurchy, 16 years ago

Resolution: fixed
Status: assignedclosed

Added the new libedit package as a dependency of OpenSSH.

Closing the ticket.

in reply to:  5 comment:10 by Randy McMurchy, 16 years ago

Replying to randy@linuxfromscratch.org:

I will concur that it appears safe enough to reference the library as a valid dependency for packages that support it. And it appears there is *no* conflict whatsoever with readline.

destdir/share/man/man3/editline.3

I stand corrected as I've discovered the above mentioned file is overwritten by the editline package. Not really any big deal, but for thoroughness, and the archives, I'm mentioning this.

I'll forward the message that this Trac ticket entry makes in BLFS-Book to BLFS-Dev for archive purposes.

Note: See TracTickets for help on using tickets.