#23089 [Opn]: Compiling with aspell 0.50.3 fails
| From: | dswhite42 at yahoo dot com | Date: | Wed, 09 Apr 2003 20:49: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-37466@lists.php.net to get a copy of this message | ||
ID: 23089
User updated by: dswhite42 at yahoo dot com
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 need to amend this report - I'm still having compile problems, but
the compile error messages are different for the following reason:
My co-worker had installed an older version (0.33) of aspell last week,
which installed BOTH libpspell.so and libaspell.so files in
/usr/local/lib . To clear up any possible confusion, I got rid of
everything having to do with aspell/pspell, then reinstalled aspell
0.50.3 . This installed the following files in /usr/local/lib:
libaspell.la
libaspell.so -> libaspell.so.15.0.2
libaspell.so.15 -> libaspell.so.15.0.2
libaspell.so.15.0.2
Note that there is no libpspell.* - only libaspell.* files are
installed.
I then started with a clean copy of PHP from snaps.php.net (the Apr 9,
2003 17:30GMT snapshot). I will include more details about the
procedure I'm following. Details about how Aspell was configured are
listed in a previous note. (If you need more information, I will be
happy to provide it.)
> uname -a
SunOS leaflock 5.8 Generic_108528-19 sun4u sparc SUNW,Ultra-60
> gcc -v
Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)
> which ld
/usr/ccs/bin/ld
> ld -V
ld: Software Generation Utilities - Solaris Link Editors: 5.8-1.279
> which aspell
/usr/local/bin/aspell
> aspell -v
@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)
> crle
Configuration file [3]: /var/ld/ld.config
Default Library Path (ELF):
/usr/lib:/usr/lib/64:/usr/local/lib:/opt/ssl/lib:/opt/mysql/lib/mysql:/opt/imap-2002b/lib
Trusted Directories (ELF): /usr/lib/secure (system default)
Default Library Path (AOUT):
/usr/4lib:/usr/lib:/usr/ucblib:/usr/local/lib:/opt/ssl/lib:/opt/mysql/lib/mysql:/opt/imap-2002b/lib
Command line:
crle -c /var/ld/ld.config -l
/usr/lib:/usr/lib/64:/usr/local/lib:/opt/ssl/lib:/opt/mysql/lib/mysql:/opt/imap-2002b/lib
-t AOUT -l
/usr/4lib:/usr/lib:/usr/ucblib:/usr/local/lib:/opt/ssl/lib:/opt/mysql/lib/mysql:/opt/imap-2002b/lib
> bunzip2 -c php4-STABLE-200304091730.tar.bz2 | tar xvf -
> cd php4-STABLE-200304091730
> ./buildconf
> ./configure \
--with-apxs=/opt/apache/bin/apxs \
--with-mysql=/opt/mysql \
--enable-track-vars \
--prefix=/opt/php \
--with-config-file-path=/opt/php/lib \
--with-mhash=/usr/local \
--with-mcrypt=/usr/local \
--enable-ftp \
--with-zlib=/usr/local \
--with-pdflib=/usr/local \
--with-jpeg-dir=/usr/local \
--with-tiff-dir=/usr/local \
--with-png-dir=/usr/local \
--with-gd \
--with-openssl=/opt/ssl \
--with-zlib \
--enable-force-cgi-redirect \
--with-ldap=/usr \
--with-mm=/usr/local \
--with-mysql-sock=/tmp \
--with-imap=/opt/imap-2002b \
--with-pspell=/usr/local \
--with-gettext=/usr/local \
--with-dom=/usr/local
(output of configure script deleted, except for this:)
checking for PSPELL support... yes
> make
(output of make deleted, except for the output of the final command to
create sapi/cli/php:)
ld: fatal: library -lpspell: not found
ld: fatal: File processing errors. No output written to
.libs/libphp4.so
make: *** [libphp4.la] Error 1
I think the error is still the same - PHP is using -pspell (possibly
for legacy reasons - the merging of pspell and aspell is fairly
recent), when there are no libpspell libraries installed by the Aspell
install process.
I'll be happy to provide you with more information or try other things
if you like, but could it be that the machine you're testing PHP with
has the same problem mine did - leftover, obsolete libpspell libriaries
that aren't used anymore, but are being expected by the PHP configure
process? And could it be that the reason you don't have any compile
errors are because these old pspell libraries are still what PHP
wants?
If you delete all pspell/aspell libraries from your system, reinstall a
fresh Aspell 0.50.3 and reconfigure/compile PHP, can you still do it
error-free?
Here is a portion of section 2.5.4 from the Aspell README, in case it's
helpful:
----------------------------------------------------
2.5.4 Upgrading from Aspell .33/Pspell .12
Aspell has undergone an extremely large number of changes since the
previous Aspell/Pspell release. For one thing Pspell has been merged
with Aspell so there in no longer two separate libraries you have to
worry about.
Because of the massive changes between Aspell/Pspell and Aspell 0.50
you may want to clean out the old files before installing the the new
Aspell. To do so do a "make uninstall" in the original Aspell and
Pspell source
directories.
The Pspell ABI is now part of Aspell except that the name of everything
has changed due to the renaming of Pspell to Aspell. In particular
please note the following name changes:
pspell -> aspell
manager -> speller
emulation -> enumeration
master_word_list -> main_word_list
However, you should also be able to build applications that require
Pspell with the new Aspell as a backward compatibility header file is
provided.
Previous Comments:
------------------------------------------------------------------------
[2003-04-09 09:16:10] jay@php.net
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
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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
http://bugs.php.net/23089
--
Edit this bug report at http://bugs.php.net/?id=23089&edit=1