|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51558 configuration script fails at building readline shared library module
Submitted: 2010-04-15 10:50 UTC Modified: 2021-03-04 12:01 UTC
Avg. Score:3.7 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cremator at mail dot bg Assigned:
Status: Verified Package: Compile Failure
PHP Version: 5.3, 5.4, trunk OS: AIX 5.3 oslevel -r 5300-11
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-04-15 10:50 UTC] cremator at mail dot bg
readline shared library 6.0 has been build on aix with gcc 4.2.0, gnu make 3.80, shared library ncurses 5.7, following a bit the guide at
Everything seems to be working except that readline.h include file doesn't cope well with php 5.3.2 configure script. After downgrade php to 5.2.6 and patching it for openssl 1.0 everything works like it should.
excuse my bad english and my less than little knowledge in coding

Expected result:
Thank you for using PHP.

Actual result:
checking for libedit readline replacement... no
checking for readline support... yes, shared
checking for tgetent in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_pending_input in -lreadline... no
configure: error: invalid readline installation detected. Try --with-libedit instead.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-08 14:13 UTC]
-Status: Open +Status: Feedback
 [2010-06-08 14:13 UTC]
What's in your config.log? I do not mean to paste it all, but I need to see the parts related to readline and rl_pending_input() in particular. Put config.log online, if possible.
I guess your lib is broken or was built in a wrong way.
 [2012-01-27 21:09 UTC]
-Status: Feedback +Status: Open -PHP Version: 5.3.2 +PHP Version: 5.3, 5.4, trunk
 [2012-01-27 21:09 UTC]
We got a new feedback from another reported bug related to this issue:

"Bug #60881	readline detection fails because of rl_pending_input variable"
 [2012-01-30 05:42 UTC] lzsiga at freemail dot c3 dot hu
Basically the problem is that ./configure checks for function 'rl_pending_input', which happens to be a variable. In AIX variables and functions are exported differently, so the detection fails.

In Aix, functions and variables are exported differently, which prevents ld from resolving a variable as a function.

nm -Bgx /usr/local/lib/ | grep rl_pending_input # variable
0x20003338 D rl_pending_input

 nm -Bgx /usr/local/lib/ | grep rl_yank_pop # function
0x10031acc T .rl_yank_pop
0x20003f58 D rl_yank_pop

(So it is only 'D' for variables, both 'T' and 'D' for functions.)
 [2012-04-19 06:21 UTC] 24226495 at qq dot com

I need some help for php..
the problem issue:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-pear=/usr/share/php --with-zlib-dir --with-bz2 --with-libxml-dir=/usr --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/jpeg7 --with-png-dir --enable-mbstring --with-config-file-path=/etc --with-iconv --disable-ipv6 --enable-maintainer-zts -enable-zend-multibyte --enable-inline-optimization --enable-zend-multibyte --enable-sockets --enable-soap

it will show : Thank you for using PHP..

but I can't make it
the error message:
-lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt  -o
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: /usr/local/lib/libpng.a(png.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpng.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [] Error 1

what should I to do for this?

more: if I don't use something about will good work for that:
./configure --prefix=/usr/local/php --with-pear=/usr/share/php .....
 [2012-09-05 13:02 UTC] lzsiga at freemail dot c3 dot hu
I've tested php-5.4.6, and wow, someone has done something: a space has been inserted between 'rl_pending_input' and '()'.

True, the problem still exists, but the patch had to be changed:

old: sed_repl 's;rl_pending_input();rl_pending_input;g' configure
old: sed_repl 's;rl_pending_input ();rl_pending_input;g' configure
 [2016-08-31 14:16 UTC] lzsiga at freemail dot c3 dot hu
Still present in 7.0.10: rl_pending input is still a *variable* not a *function*
extern int rl_pending_input;

The solution it the same az in 5.6.*:

sed 's;rl_pending_input ();rl_pending_input;g' configure.orig >configure
 [2021-03-04 12:01 UTC]
-Status: Open +Status: Verified
 [2021-03-04 12:01 UTC]
Indeed, rl_pending_input is a variable and checking for its
existance with PHP_CHECK_LIBRARY()[1] is not really correct.

[1] <>
 [2023-04-06 10:16 UTC] mikejohnamerica at gmail dot com
Healthy Wellness news are sharing latest news about health, fitness, diet, food, weight loss, treatment, surgery etc. More info to visit: (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 03:01:27 2024 UTC