php5をネイティブコンパイルしてみました。
/usr/local/srcディレクトリで行います
phpのサイトよりphp-5.2.4.tar.bz2をダウンし作業ディレクトリで展開してビルドします、実際はスクリプトから実行しています(どうやらネイティブコンパイラが/usr/local/develop/libを見に行ってないようなので環境変数で逃げてます…うーむ;;):
export PATH=/usr/local/develop/bin:$PATH
export LDFLAGS="-L/usr/local/develop/lib -L/usr/local/BerkeleyDB-4.2/lib -L/usr/local/ssl/lib"
export CFLAGS="-I/usr/local/ssl/include/openssl"
cd /usr/local/src
tar xvjf php-5.2.4.tar.bz2
mkdir build_php
cd build_php
../php-5.2.4/configure \
--prefix=/usr/local/develop \
--with-db4=/usr/local/BerkeleyDB-4.2 \
--with-libxml-dir=/usr/local/develop \
--with-openssl=/usr/local/ssl
make
一応、configureは通り、makeも成功した模様です。
make完了後にmake testしろと表示されていたので実行しました:
make test
(中略)
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 55
Exts tested : 24
---------------------------------------------------------------------
Number of tests : 3973 2522
Tests skipped : 1451 ( 36.5%) --------
Tests warned : 1 ( 0.0%) ( 0.0%)
Tests failed : 9 ( 0.2%) ( 0.4%)
Tests passed : 2512 ( 63.2%) ( 99.6%)
---------------------------------------------------------------------
Time taken : 1462 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
tiger [ext/hash/tests/tiger.phpt]
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv_mime_encode() [ext/iconv/tests/iconv_mime_encode.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
Test array_keys() function (variation - 2) [ext/standard/tests/array/array_keys_variation_002.phpt]
Test lstat() and stat() functions: usage variations - writing data into file [ext/standard/tests/file/lstat_stat_variation7.phpt]
Test gettype() & settype() functions : usage variations [ext/standard/tests/general_functions/gettype_settype_variation2.phpt]
money_format test [ext/standard/tests/strings/moneyformat.phpt]
Generic pack()/unpack() tests [ext/standard/tests/strings/pack.phpt]
microtime() function [ext/standard/tests/time/001.phpt] (warn: system dependent)
=====================================================================
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]:
なんか9項目程テストに失敗しているようですが…、何がいけないんでしょうか;;
使い物になるのか否かまだ不明ですが、取り合えずこれまで。間違いやこうすればうまく行くなどのノウハウ等送って頂けると助かります。