Bug #51558 [Com]: configuration script fails at building readline shared library module

From: Date: Wed, 31 Aug 2016 14:16:42 +0000
Subject: Bug #51558 [Com]: configuration script fails at building readline shared library module
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203706@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51558&edit=1

 ID:                 51558
 Comment by:         lzsiga at freemail dot c3 dot hu
 Reported by:        cremator at mail dot bg
 Summary:            configuration script fails at building readline
                     shared library module
 Status:             Open
 Type:               Bug
 Package:            Compile Failure
 Operating System:   AIX 5.3 oslevel -r 5300-11
 PHP Version:        5.3, 5.4, trunk
 Block user comment: N
 Private report:     N

 New Comment:

Still present in 7.0.10: rl_pending input is still a *variable* not a *function*
readline/readline.h:
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


Previous Comments:
------------------------------------------------------------------------
[2012-09-05 13:02:45] 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

------------------------------------------------------------------------
[2012-04-19 06:21:31] 24226495 at qq dot com

hi,guys

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 libphp5.la
/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: *** [libphp5.la] Error 1

what should I to do for this?

more: if I don't use something about --with-apxs..it will good work for make..like that:
./configure --prefix=/usr/local/php --with-pear=/usr/share/php .....

------------------------------------------------------------------------
[2012-01-30 05:42:26] 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/libreadline.so | grep rl_pending_input # variable
0x20003338 D rl_pending_input

 nm -Bgx /usr/local/lib/libreadline.so | 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-01-27 21:09:31] felipe@php.net

We got a new feedback from another reported bug related to this issue:

"Bug #60881	readline detection fails because of rl_pending_input variable"

------------------------------------------------------------------------
[2010-06-08 14:13:28] tony2001@php.net

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.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=51558


--
Edit this bug report at https://bugs.php.net/bug.php?id=51558&edit=1


Thread (9 messages)

« previous php.bugs (#203706) next »