Discussion:
[PHP-INSTALL] Solaris 10/Apache/PHP compile
Alex Moen
2011-03-23 20:07:51 UTC
Permalink
Compiling PHP on Apache/2.2.11.

Have EXTRACFLAGS=-fPIC in env.

Here's my configure:

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/
php/lib --with-libxml-dir=/usr/local --with-zlib=/usr/local --with-xpm-
dir=/usr/local --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/
mysql/bin/mysql_config --with-apxs2=/usr/local/apache2/bin/apxs --
without-pgsql --with-jpeg-dir=/usr/local/lib --with-zlib-dir=/usr/
local/lib --with-gd=/usr/local --enable-mbstring --enable-exif --
enable-force-cgi-redirect --enable-sockets --with-png-dir=/usr/local/
lib --with-curl=/usr/local --with-ldap=/usr/local --with-openssl=/usr/
local/ssl --with-gettext --with-pcre-dir=/usr/local --with-freetype-
dir=/usr/local --with-mssql=/usr/local/freetds --with-mcrypt=/usr/
local/bin/mcrypt

The make process worked fine, but I got this after make test:

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
output buffering - fatalism [tests/output/ob_011.phpt]
ob_start(): Ensure unerasable buffer cannot be flushed by ob_flush()
[tests/output/ob_start_basic_unerasable_005.phpt]
SPL: ArrayObject::exchangeArray() basic usage with object as
underlying data store. [ext/spl/tests/
arrayObject_exchangeArray_basic3.phpt]
=====================================================================

You may have found a problem in PHP.
We would like to send this report automatically to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose "s" to save the report to
a file that you can send us later.
Do you want to send this report now? [Yns]: Y

Please enter your email address.
(Your address will be mangled so that it will not go out on any
mailinglist in plain text): ***@ndtel.com
sh: autoconf: not found
sh: /usr/local/bin/libtool: not found
sh: bison: not found

Posting to qa.php.net /buildtest-process.php

Thank you for helping to make PHP better.



So, I tried make install:


[***@comm-db-1 php-5.2.17]# make install
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/
build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/
local/apache2/modules/
/usr/local/apache2/build/libtool: line 391: /usr/local/bin/sed: No
such file or directory
/usr/local/apache2/build/libtool: line 790: /usr/local/bin/sed: No
such file or directory
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require --mode=MODE be specified.
/usr/local/apache2/build/libtool: line 6184: /usr/local/bin/sed: No
such file or directory
/usr/local/apache2/build/libtool: line 6267: /usr/local/bin/sed: No
such file or directory
/usr/local/apache2/build/libtool: line 6275: /usr/local/bin/sed: No
such file or directory
/usr/local/apache2/build/libtool: line 6277: /usr/local/bin/sed: No
such file or directory
: install: `.' must be an absolute directory name
Try ` --help --mode=install' for more information.
apxs:Error: Command failed with rc=65536
.
*** Error code 1
The following command caused the error:
/usr/local/source/php-5.2.17/build/shtool mkdir -p '/usr/local/apache2/
modules' && /usr/local/source/php-5.2.17/build/shtool mkdir -p '/usr/
local/apache2/conf' && /usr/local/apache2/bin/apxs -S LIBEXECDIR='/usr/
local/apache2/modules' -S SYSCONFDIR='/usr/local/apache2/conf' -i -a -
n php5 libphp5.la
make: Fatal error: Command failed for target `install-sapi'


Any ideas anyone? I have looked all over the web for this solution...
I've found lots of examples of it, but no solutions anywhere.

TIA
Christopher Jones
2011-03-23 21:10:24 UTC
Permalink
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
/usr/local/apache2/build/libtool: line 391: /usr/local/bin/sed: No such file or directory
The "obvious" hack would be to edit /usr/local/apache2/build/libtool
and change the definition of SED and XSED. However really you need to
revisit your Apache build and make sure it is cleanly installed and all the
expected tools are available on your system.

Chris
--
Email: ***@oracle.com
Tel: +1 650 506 8630
Blog: http://blogs.oracle.com/opal/
Alex Moen
2011-03-24 13:35:47 UTC
Permalink
Post by Christopher Jones
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/
build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/
local/apache2/modules/
/usr/local/apache2/build/libtool: line 391: /usr/local/bin/sed: No such file or directory
The "obvious" hack would be to edit /usr/local/apache2/build/libtool
and change the definition of SED and XSED. However really you need to
revisit your Apache build and make sure it is cleanly installed and all the
expected tools are available on your system.
Chris
OK, It makes sense now... I cheated by copying sed from /usr/bin/ to /
usr/local/bin/. Install worked properly at that point.

Thanks for pointing out that obvious problem. Couldn't see the forest
for the trees!

Alex

Loading...