Bug #50209 [Com]: Compiling with libedit cannot find readline.h
| From: | post at tentimes dot org | Date: | Fri, 02 Sep 2011 14:51:44 +0000 |
| Subject: | Bug #50209 [Com]: Compiling with libedit cannot find readline.h | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163257@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50209&edit=1
ID: 50209
Comment by: post at tentimes dot org
Reported by: tcallawa at redhat dot com
Summary: Compiling with libedit cannot find readline.h
Status: Closed
Type: Bug
Package: Compile Failure
Operating System: Linux (Fedora)
PHP Version: 5.2, 5.3, 6
Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
It's libreadline-dev you need to add, not readline-dev. But, thanks a lot for the
tip! That is just what I was missing (for 5.38).
Previous Comments:
------------------------------------------------------------------------
[2011-07-04 12:12:07] breck7 at gmail dot com
While compiling the new PHP 5.4 release I tried using: --with-readline, --with-
libedit, and --with-libedit --without-readline and always got " I cannot find
readline.h"
In case anyone has trouble reinstalling readline, run this: sudo apt-get install
libreadline-devel
I found that tricky (was trying install readline, install readline--devel,
install libedit, install libedit--devel, etc.).
I figured I'd post this since this is the first Google result for "I cannot find
readline.h"
------------------------------------------------------------------------
[2009-12-13 17:07:20] felipe@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Thanks for the patch!
------------------------------------------------------------------------
[2009-12-13 17:06:49] svn@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=292081
Log: - Fixed bug #50209 (Compiling with libedit cannot find readline.h)
(patch by tcallawa at redhat dot com)
------------------------------------------------------------------------
[2009-11-17 21:49:34] tcallawa at redhat dot com
Description:
------------
The PHP code assumes that even with libedit in use (instead of readline), that the header can be
found in readline/readline.h.
libedit installs its "readline.h" into editline/ (to avoid the obvious conflict with
readline).
Accordingly, configure claims that libedit is not properly installed, when it is. I've written
a straightforward patch to fix this:
http://spot.fedorapeople.org/php-5.3.0-libedit.patch
It is also possible to use pkgconfig to ask libedit for its include flags (and cflags), which would
return "-I/usr/include/editline", but as that was slightly more intrusive, I did not go
down that road.
In addition, on a system where readline-devel and libedit-devel are both installed, the existing
code checking for /usr/include/readline-devel will cause a false positive when checking for libedit,
and will end up doing a compile with readline's headers and libedit's library.
Reproduce code:
---------------
./configure --without-readline --with-libedit
Expected result:
----------------
checking for libedit readline replacement... yes
checking for readline in -ledit... yes
Actual result:
--------------
checking for libedit readline replacement... yes
configure: error: Please reinstall libedit - I cannot find readline.h
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50209&edit=1