Thread: --with-libedit-preferred is bad design
Hackers, So I've been trying to compile PostgreSQL with libedit instead of readline on a linux system, because of a bug in readline (will blog about it later). This took 5 attempts, because of the peculiar nature of our readline options in configure: --without-readline "compile without readline *or* libedit" --with-libedit-preferred "compile with libedit, but if there's an issue with libedit, then silently substitute readline without telling me" There's no option where I can say "please compile with libedit, and if you can't, throw an error". In fact, if libedit isn't found, that's not even reported in config.log -- your only way to find out you still have readline is to ldd your psql after it's built. For that matter, I find it hard to imagine where I would possibly want the current functionality of --with-libedit-preferred. If I've asked for libedit, then it's pretty darned sure it's because I don't want readline. I think the current --with-libedit-preferred should go away, and be replaced by a --with-libedit option which throws an error if libedit isn't found. Feedback? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
Josh Berkus <josh@agliodbs.com> writes: > I think the current --with-libedit-preferred should go away, and be > replaced by a --with-libedit option which throws an error if libedit > isn't found. I'm not sure that will work well on systems where libedit masquerades as readline... TBH, given the number of bugs we've hit in libedit, encouraging its use isn't something we should put effort into anyway. Or is it just that Apple seems incapable of finding non-broken versions to ship? regards, tom lane
On 07/12/2013 06:31 PM, Tom Lane wrote: > Josh Berkus <josh@agliodbs.com> writes: >> I think the current --with-libedit-preferred should go away, and be >> replaced by a --with-libedit option which throws an error if libedit >> isn't found. > > I'm not sure that will work well on systems where libedit masquerades > as readline... Ah, was that the thinking behind that? In that case, maybe we could put a warning in the config.log that libedit wasn't found? Right now, there's nothing. > > TBH, given the number of bugs we've hit in libedit, encouraging its use > isn't something we should put effort into anyway. Or is it just that > Apple seems incapable of finding non-broken versions to ship? That would hardly be only true of libedit, on Apple. It's also broken on some Red Hat versions, last I checked. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
On 7/12/2013 7:10 PM, Josh Berkus wrote: > > That would hardly be only true of libedit, on Apple. > > It's also broken on some Red Hat versions, last I checked. Last I heard, libedit was completely borked. Here is a report (two years old) of still broken libedit in Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608442 IMO, we either need to take up the mantle of libedit maintenance or we need to remove it from a configure option, it doesn't work anyway. JD > >