Bug #60034 [Com]: Build fails with apxs and readline
Edit report at https://bugs.php.net/bug.php?id=60034&edit=1
ID: 60034
Comment by: phpnet at jigsoft dot co dot za
Reported by: notfornoone at gmail dot com
Summary: Build fails with apxs and readline
Status: Open
Type: Bug
Package: Compile Failure
Operating System: OS X (i386-apple-darwin10.8.0)
PHP Version: 5.4SVN-2011-10-10 (snap)
Block user comment: N
Private report: N
New Comment:
from nickl:
I can't take all the credit, thanks goes to Areverie who discovered the solution
and documented it on his blog
http://weblog.areverie.org/blog/2012/03/18/fun-stuff-about-php/
in March of 2012
What he found was that if we move the variable $(MH_BUNDLE_FLAGS) to the end of
the list of compiler flags the build
will succeed.
The submitted patch modifies Makefile.global, the origin of the bug produced
after running the ./configure script.
This now successfully completes make and the resulting php binary reports the
desired extension correctly, as
expected.
readline
Readline Support => enabled
Readline library => 6.2
patch and testing done against PHP 5.4.8 on Mac OS X 10.8.2
nJoy!
Previous Comments:
------------------------------------------------------------------------
[2011-10-10 22:41:18] notfornoone at gmail dot com
Description:
------------
When compiling on 10.6 with the following configure args the build fails:
./configure '--prefix=/Users/me/Desktop/php54test' '--disable-all'
'--with-
apxs2=/usr/sbin/apxs' '--with-readline=/usr/local/Cellar/readline/6.2.1'
make
Fails with this error:
Undefined symbols for architecture x86_64:
"_rl_on_new_line", referenced from:
_zif_readline_on_new_line in readline.o
"_history_list", referenced from:
_zif_readline_list_history in readline.o
"_rl_mark", referenced from:
_zif_readline_info in readline.o
"_rl_pending_input", referenced from:
_zif_readline_info in readline.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
I've also tried:
* Using an earler version of readline (6.1) fails with the same error
* Compiling on 10.7 Lion results in the same error
* Using the same configure options using the 5.3 branch builds fine
* Compiling with configure options "--with-libedit" enabled instead of the "--
with-readline" option builds fine
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60034&edit=1
Thread (5 messages)