#23089 [Opn]: Compiling with aspell 0.50.3 fails

From: Date: Wed, 09 Apr 2003 14:16:11 +0000
Subject: #23089 [Opn]: Compiling with aspell 0.50.3 fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37437@lists.php.net to get a copy of this message
ID: 23089 Updated by: jay@php.net Reported By: dswhite42 at yahoo dot com Status: Open Bug Type: Pspell related Operating System: SunOS 5.8 PHP Version: 4.3.1 New Comment: I successfully compiled Aspell 0.50.3 and an up-to-date CVS checkout of php4 with the pspell extension on Solaris 8 SPARC last night and there were no problems. I didn't need to add Aspell to LIBS, and there's no mention of it in any of the Makefiles. Could you try a snapshot from snaps.php.net and see how that goes? I'm also curious as to what you're using for your compiler, linker, etc., so if you could post those, too... J Previous Comments: ------------------------------------------------------------------------ [2003-04-08 17:55:21] dswhite42 at yahoo dot com > tar xvfz aspell-0.50.3.tar.gz > cd aspell-0.50.3 > ./configure > make > make install > cd .. > bunzip2 -c aspell-en-0.51.0.tar.bz2 | tar xvf - > cd aspell-en-0.50-2 > ./configure > make > make install This installs everything to /usr/local/(bin|lib|include|share). No errors come out of the compile process. The standalone aspell tools work fine. PHP compiles --with-pspell=/usr/local once I make the modifications to the configure script described earlier. I don't understand why this report keeps getting marked as bogus. I really don't see that I've installed anything in the wrong locations or configured anything incorrectly, and yet I get the undefined symbols I mentioned. Look: (from running "make" under PHP): Undefined first referenced symbol in file aspell_speller_store_replacement ext/pspell/pspell.lo aspell_speller_add_to_session ext/pspell/pspell.lo delete_aspell_speller ext/pspell/pspell.lo ... > nm -p /usr/local/lib/libpspell.so | grep aspell_speller_store_replacement (nothing found) > nm -p /usr/local/lib/libaspell.so | grep aspell_speller_store_replacement 0000338552 T aspell_speller_store_replacement So there it is: the symbols are in the libaspell library, NOT the libpspell library. And yet the PHP configure script only include -lpspell, not -laspell. So unless there's some other way to configure Aspell (and the documentation doesn't mention anything), I don't see that it's an Aspell problem. You are using Aspell 0.50, not Aspell 0.33 or earlier, right? ------------------------------------------------------------------------ [2003-04-08 15:18:12] sniper@php.net Works fine here. You must have broken aspell installation then. ------------------------------------------------------------------------ [2003-04-07 23:22:07] dswhite42 at yahoo dot com No it isn't. The aspell libs/includes are installed under /usr/local, my PHP configure command included "--with-pspell=/usr/local", and crle (I'm on Solaris) is set to look in /usr/local for both ELF and AOUT objects. Setting $LD_LIBRARY_PATH to "/usr/local/lib" (just to be sure) has no positive effect. So the problem does not appear to be my environment. And as I mentioned, adding "-laspell" to the $LIBS seems to fix the problem. Make of that what you will, but please take another look. Thanks. ------------------------------------------------------------------------ [2003-04-07 18:35:59] sniper@php.net Your LD_LIBRARY_PATH is set wrong. ------------------------------------------------------------------------ [2003-04-07 09:19:14] dswhite42 at yahoo dot com When compiling with aspell-0.50.3 (using --with-pspell), everything works fine until the final stages (when sapi/cli/php is created). At that point I get multiple errors such as: Undefined first referenced symbol in file aspell_speller_store_replacement ext/pspell/pspell.lo aspell_speller_add_to_session ext/pspell/pspell.lo delete_aspell_speller ext/pspell/pspell.lo ... etc. It appears that the problem is that PHP is including the pspell library but not the newer aspell library, where all those symbols can be found. The solution that worked for me was to edit the "configure" script, find the section where "-lpspell" is prepended to the $LIBS variables, and add "-laspell" as well. e.g. on line 62147 for PHP 4.3.1's "configure file", change: LIBS="-lpspell $LIBS" to LIBS="-laspell -lpspell $LIBS" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23089&edit=1

« previous php.bugs (#37437) next »