Installation problems with PHP 4 on Solaris/SPARC/gcc 2.95.2
| From: | R. P. Channing Rodgers, M.D. | Date: | Tue, 08 Feb 2000 22:32:24 +0000 |
| Subject: | Installation problems with PHP 4 on Solaris/SPARC/gcc 2.95.2 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9960@lists.php.net to get a copy of this message | ||
Dear Fellow PHPers,
Here is the latest chapter in my attempts to create as fully-featured an
installation of PHP 4 as possible, on a SPARC platform under Solaris 2.6,
using gcc 2.95.2.
FIRST: I attempted a "bare bones" installation of PHP, with a configuration
command as follows:
CPPFLAGS=-I/depot/include \
LDFLAGS=-L/depot/lib \
./configure \
--prefix=/site/subsys/www/php_4.0b3 \
--with-config-file-path=/site/subsys/www/php_4.0b3 \
--with-apxs=/site/subsys/www/apache_1.3.9/bin/apxs \
--with-mysql=/site/subsys/www/mysql_3.22.27 \
--with-exec-dir=/site/subsys/www/apache_1.3.9/php-bin \
--enable-track-vars \
--disable-short-tags \
--enable-bcmath=yes \
--with-ftp \
-> > > > > > > > > > > > -enable-sysvshm=yes \
--enable-sysvsem=yes \
--enable-safe-mode=yes \
--with-mcrypt=/depot/package/mcrypt_2.2.5
(so the only external system that I'm aware of sneaking in here is "mcrypt").
RESULT: The subsequent "make" command appears to be successful, but I do get
a number of messages:
ext/sysvshm/libphpext_sysvshm.la -ldl -lgd -lm -lresolv -lnsl -lsocket -lcrypt -lgdbm
-L/depot/package/mcrypt_2.2.5/lib -lmcrypt -L/site/subsys/www/mysql_3.22.27/lib/mysql -lmysqlclient
-lpam
*** Warning: This library needs some functionality provided by -lgd.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** Warning: This library needs some functionality provided by -lcrypt.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
make[2]: Leaving directory `/site3/web_kit_1.0/php_4.0b3'
make[1]: Leaving directory `/site3/web_kit_1.0/php_4.0b3'
COMMENT: It would be very helpful if these warnings stated *which* libraries
"need some functionality," so one could remove an offending packages if
required. It would also be helpful to know which target library file is in
question: I am assuming that the above messages refer to /depot/lib/libgd.a
and /usr/lib/libcrypt.a, respectively, but I have no clear evidence to that
effect. And the conseqences of not having the shared libraries is not clear --
will the system attempt to make a statically linked binary, or is the net
result that either the "needful" or "target" (static) library is ignored,
resulting in lost functionality? The current messages are alarming without
being very informative.
SECOND: Typing "make install" after the above results in numerous files being
installed in ./modules and ./libs, rather than inside
/site/subsys/www/php_4.0b3, as specified by the --prefix argument to configure.
QUESTION: Is --prefix ignored? Why did the above happen? Is there a fix?
THIRD: I attempt to make a "kitchen sink" installation, with a configuration
command as follows:
CPPFLAGS=-I/depot/include \
LDFLAGS=-L/depot/lib \
./configure \
--prefix=/site/subsys/www/php_4.0b3 \
--with-config-file-path=/site/subsys/www/php_4.0b3 \
--with-apxs=/site/subsys/www/apache_1.3.9/bin/apxs \
--with-mysql=/site/subsys/www/mysql_3.22.27 \
--with-exec-dir=/site/subsys/www/apache_1.3.9/php-bin \
--enable-track-vars \
--disable-short-tags \
--enable-bcmath=yes \
--with-mcrypt=/depot/package/mcrypt_2.2.5 \
--with-mhash=/depot/package/mhash_0.6.1 \
--with-ftp \
--with-gd=/depot/package/gd_1.7.3 \
--with-gdbm=/depot/package/gdbm_1.8 \
--with-ldap=/depot/package/openLDAP_1.4 \
--with-pdflib=/depot/package/pdflib_2.01 \
--with-jpeg-dir=/depot/package/jpeg_6b \
--with-tiff-dir=/depot/package/tiff_3.4b037 \
--with-readline=/depot/package/readline_4.0 \
--with-gettext=/depot/package/gettext_0.10.35 \
--with-db2=/depot/package/berkeley_db_2.6.4 \
--enable-sysvshm=yes \
--enable-sysvsem=yes \
--enable-safe-mode=yes \
--with-mm=/site/subsys/www/mm_1.0.12 \
--with-zlib=/depot/package/zlib_1.1.3 \
--with-xml=/site/subsys/www/expat_1.1
RESULT: Not only do I get a zillion messages of the form described earlier,
about shared libraries being absent, but also a zillion messages of the
form:
ld: fatal: symbol `history_base' is multiply defined:
(file /depot/lib/libreadline.a(history.o) and file
/depot/lib/libhistory.a(history.o));
resulting in:
ld: fatal: File processing errors. No output written to .libs/libphp4.so
make[2]: *** [libphp4.la] Error 1
make[2]: Leaving directory `/site3/web_kit_1.0/php_4.0b3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/site3/web_kit_1.0/php_4.0b3'
make: *** [all-recursive-am] Error 2
My LD_LIBRARY_PATH contains:
/depot/package/jmf_2.0/lib:/usr/openwin/lib:/usr/dt/lib:/depot/lib
and the two libraries with the name collision come from the readline 4.0 and
gdb 4.16 packages (the latter appears to carry around its own readline library):
ls -al /depot/lib/libreadline.a /depot/lib/libhistory.a
[...] /depot/lib/libhistory.a -> /depot/package/readline_4.0/lib/libhistory.a
[...] /depot/lib/libreadline.a -> ../package/gdb_4.16/lib/libreadline.a
QUESTION: Why am I getting this name collision to begin with, and what can be
done about it? What role does the specification of an installation directory
have in the configuration step?
Thanks in advance for any help...
Cheerio, Rick Rodgers