Click to See Complete Forum and Search --> : Install PHP4 on Solaris


Anon
09-30-2000, 10:04 AM
When I use the following configure options:

--enable-libgcc
--with-apache=/devel/apache/apache_1.3.9
--enable-ftp
--without-gd
--with-imap
--with-mysql=/usr/local/mysql
--with-java=/usr/java
--enable-xml
--with-system-regex

I can get the config to run (did a "make clean" first and removed all cache files).

When I do a "make install", it *looks* like it did it OK, but no php binary shows up in /usr/local/bin. When I do an explicit
"make php", I get the following:

/bin/sh /mirror/install/php/php-4.0.2/libtool --silent --mode=link gcc -I. -I/mirror/install/php/php-4.0.2/ -I/mirror/install/php/php-4.0.2 -I/mirror/install/php/php-4.0.2/main -I/devel/apache/apache_1.3.9/src/include -I/devel/apache/apache_1.3.9/src/os/unix -I/mirror/install/php/php-4.0.2/Zend -I/mirror/install/php/php-4.0.2 -I/usr/local/include -I/usr/local/mysql/include -I/mirror/install/php/php-4.0.2/ext/xml/expat/xmltok -I/mirror/install/php/php-4.0.2/ext/xml/expat/xmlparse -D_POSIX_PTHREAD_SEMANTICS -DXML_BYTE_ORDER=21 -g -O2 -o php -export-dynamic stub.lo libphp4.la
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crt1.o: In function `_start':
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crt1.o(.text+0x5c): undefined reference to `main'
collect2: ld returned 1 exit status make: *** [php] Error 1


I'm (obviously) using gcc 2.95.2 on a Solaris 2.6 box (SPARC).

I tried it using the built-in Solaris ld and then grabbed the GNU bintools and installed them. It now uses the GNU ld. Both ways, I get the same result.

Any pointers would be greatly appreciated. I'm hoping I'm just an idiot and forgot something really simple.

thx,

boB

Anon
09-30-2000, 09:58 PM
Maybe I did pull something stupid...

Does the "--with-apache" option ONLY make an Apache module and not then allow for the build of the full php binary?

thx,

boB

Anon
10-01-2000, 04:09 PM
boB,

I've successfully installed PHP 4 something (the latest version) on friday. I didn't have any problems. I have an Ultra-60 running sol2.8.

when you said you ran "make install" you mentioned that id seemed to complete successfully. The make does not create a "php" binary. The only binaries it creates are:

php-config
phpextdist
phpize

So, if make installed worked, then you need not worry. Just go ahead and compile apache (as they tell you in the INSTALL file) and see if it works.

If the three binaries mentioned above are not there, check the prefix where the make installed them? (I've mine installed under /usr not /usr/local).

hope this helps,
Sridhar