NginxとPHPのコンパイルオプション

Nginxのコンパイルオプション

./configure  \
--conf-path=/etc/nginx/nginx.conf   \
--error-log-path=/var/log/nginx/error.log  \
--pid-path=/var/run/nginx/nginx.pid   \
--lock-path=/var/lock/nginx.lock   \
--user=nginx   \
--group=nginx   \
--with-http_stub_status_module   \
--with-http_ssl_module   \
--with-http_gzip_static_module   \
--with-http_realip_module   \
--http-log-path=/var/log/nginx/access.log   \
--http-client-body-temp-path=/var/tmp/nginx/client/   \
--http-proxy-temp-path=/var/tmp/nginx/proxy/   \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/

PHPのコンパイルオプション(PHP-FPM使用時)

./configure' \
'--prefix=/usr/local/php' \
'--enable-mbstring' \
'--with-mysql' \
'--with-pdo-mysql' \
'--with-mysqli' \
'--enable-pcntl' \
'--enable-fpm' \
'--with-fpm-user=nginx' \
'--with-fpm-group=nginx' \
'--with-pcre-regex' \
'--with-zlib' \
'--with-curl' \
'--with-xsl' \
'--with-pear' \
'--enable-gd-jis-conv' \
'--without-unixODBC' \
'--disable-posix' \
'--enable-sysvmsg' \
'--enable-sysvshm' \
'--disable-sysvsem' \
'--with-config-file-path=/etc/php' \
'--with-gettext' \
'--enable-exif' \
'--with-mcrypt' \
'--with-mhash' \
'--enable-ftp' \
'--enable-zip' \
'--with-iconv' \
'--enable-intl' \
'--enable-sockets' \
'--with-openssl' \
'--with-curlwrappers' \
'--with-gd' \
'--enable-gd-native-ttf' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-zlib-dir=/usr' \
'--with-xpm-dir=/usr' \
'--with-freetype-dir=/usr' \
'--with-libxml-dir=/usr' \
'--enable-soap' \
'--with-xmlrpc' \
'--with-xs' \
'--with-libdir=lib64' \
'--enable-bcmath' \
'--enable-cli'

makeおよびmake test

上記コンパイルオプションでconfigureが通ったならば、makeを実行します。NginxはそのままcheckinstallでRPMにしていますが、phpの方はいったんmake testを実行しています。make testを実行すると、通過できた処理のレポートが得られます。

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :   29
Exts tested     :   49
---------------------------------------------------------------------

Number of tests : 12405             10169
Tests skipped   : 2236 ( 18.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :   17 (  0.1%) (  0.2%)
Expected fail   :   36 (  0.3%) (  0.4%)
Tests passed    : 10116 ( 81.5%) ( 99.5%)
---------------------------------------------------------------------
Time taken      :  332 seconds
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
Test script to verify that magic methods should be called only once when accessing an unset property. [tests/classes/bug63462.phpt]  XFAIL REASON: Bug 63462 is not yet fixed
Test open_basedir configuration [tests/security/open_basedir_linkinfo.phpt]  XFAIL REASON: BUG: open_basedir cannot delete symlink to prohibited file. See also
bugs 48111 and 52176.
Inconsistencies when accessing protected members [Zend/tests/access_modifiers_008.phpt]  XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Inconsistencies when accessing protected members - 2 [Zend/tests/access_modifiers_009.phpt]  XFAIL REASON: Discussion: http://marc.info/?l=php-internals&m=120221184420957&w=2
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770.phpt]  XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_2.phpt]  XFAIL REASON: See Bug #48770
Bug #48770 (call_user_func_array() fails to call parent from inheriting class) [Zend/tests/bug48770_3.phpt]  XFAIL REASON: See Bug #48770
Bug #63336 (invalid E_NOTICE error occur) [Zend/tests/bug63336.phpt]  XFAIL REASON: Bug is not fixed yet
Initial value of static var in method depends on the include time of the class definition [Zend/tests/method_static_var.phpt]  XFAIL REASON: Maybe not a bug
DateTime::add() -- fall type2 type3 [ext/date/tests/DateTime_add-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type2 [ext/date/tests/DateTime_add-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- fall type3 type3 [ext/date/tests/DateTime_add-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type2 type3 [ext/date/tests/DateTime_add-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type2 [ext/date/tests/DateTime_add-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::add() -- spring type3 type3 [ext/date/tests/DateTime_add-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type2 type3 [ext/date/tests/DateTime_diff-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type2 [ext/date/tests/DateTime_diff-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- fall type3 type3 [ext/date/tests/DateTime_diff-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type2 type3 [ext/date/tests/DateTime_diff-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type2 [ext/date/tests/DateTime_diff-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::diff() -- spring type3 type3 [ext/date/tests/DateTime_diff-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type2 type3 [ext/date/tests/DateTime_sub-fall-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type2 [ext/date/tests/DateTime_sub-fall-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- fall type3 type3 [ext/date/tests/DateTime_sub-fall-type3-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type2 type3 [ext/date/tests/DateTime_sub-spring-type2-type3.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type2 [ext/date/tests/DateTime_sub-spring-type3-type2.phpt]  XFAIL REASON: Various bugs exist
DateTime::sub() -- spring type3 type3 [ext/date/tests/DateTime_sub-spring-type3-type3.phpt]  XFAIL REASON: Various bugs exist
Bug #53437 (Crash when using unserialized DatePeriod instance) [ext/date/tests/bug53437.phpt]  XFAIL REASON: Bug #53437 Not fixed yet
RFC: DateTime and Daylight Saving Time Transitions (zone type 3) [ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt]  XFAIL REASON: RFC not implemented yet
Bug #42718 (unsafe_raw filter not applied when configured as default filter) [ext/filter/tests/bug42718.phpt]  XFAIL REASON: FILTER_UNSAFE_RAW not applied when configured as default filter, even with flags
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) [ext/session/tests/bug60634.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec [ext/session/tests/bug60634_error_1.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write during exec [ext/session/tests/bug60634_error_2.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write after exec [ext/session/tests/bug60634_error_3.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec [ext/session/tests/bug60634_error_4.phpt]  XFAIL REASON: Long term low priority bug, working on it
Bug #45712 (NaN/INF comparison) [ext/standard/tests/math/bug45712.phpt]  XFAIL REASON: Bug 45712 not fixed yet.
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Test HTTP_RAW_POST_DATA with excessive post length [tests/basic/025.phpt]
FTP login (SSL) [ext/ftp/tests/002.phpt]
Bug #51242 (Empty mysql.default_port does not default to 3306 anymore, but 0) [ext/mysql/tests/bug51242.phpt]
#46127, openssl_sign/verify: accept different algos [ext/openssl/tests/bug46127.phpt]
#48182,ssl handshake fails during asynchronous socket connection [ext/openssl/tests/bug48182.phpt]
Bug #54992: Stream not closed and error not returned when SSL CN_match fails [ext/openssl/tests/bug54992.phpt]
Test disk_free_space and its alias diskfreespace() functions : basic functionality [ext/standard/tests/file/disk_free_space_basic.phpt]
Test lstat() and stat() functions: usage variations - creating file/subdir [ext/standard/tests/file/lstat_stat_variation8.phpt]
Test lstat() and stat() functions: usage variations - deleting file/subdir [ext/standard/tests/file/lstat_stat_variation9.phpt]
http-stream test [ext/standard/tests/network/http-stream.phpt]
Test setlocale() function : usage variations - Setting all available locales in the platform [ext/standard/tests/strings/setlocale_variation2.phpt]
XMLReader: libxml2 XML Reader, DTD [ext/xmlreader/tests/008.phpt]
XMLReader: accessing empty and non existing attributes [ext/xmlreader/tests/012.phpt]
Bug #61605 (header_remove() does not remove all headers) [sapi/cgi/tests/bug61605.phpt]
basic function [sapi/cli/tests/php_cli_server_001.phpt]
$_SERVER variable [sapi/cli/tests/php_cli_server_002.phpt]
Bug #55726 (Changing the working directory makes router script inaccessible) [sapi/cli/tests/php_cli_server_003.phpt]
=====================================================================

You may have found a problem in PHP.
This report can be automatically sent to the PHP QA team at
http://qa.php.net/reports and http://news.php.net/php.qa.reports
This gives us a better understanding of PHP's behavior.
If you don't want to send the report immediately you can choose
option "s" to save it.  You can then email it to qa-reports@lists.php.net 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): 

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

Thank you for helping to make PHP better.

上記で確認できたら、checkinstallでspecファイルを自動生成してRPM化しています。