今回は、ビルドオプションを変更してインストールを試してみた。
●STEP2.ビルドオプションをちょっとだけ調べる
yum版では設定がなかったりdisableになってたりするものがいっぱいあり、
その中で使うかもしれないものを調べた。
参考にしたのはこちら
ここから気になるオプションを追加していく。
前回のオプションから、標準でdisableになってるものがあり、
その中から気になるもののオプションを外した。
追加したのはこちら。
・マルチバイト文字サポート(日本語用)
--enable-mbstring
・SOAPを使う
--enable-soap
・数値計算用のライブラリ(小数の精度)
--enable-bcmath
・PDO_MySQL
--with-pdo-mysql
・GD(画像処理ライブラリ)
--with-gd
以下のdisableを外して有効にした
--disable-json\
--disable-pdo\
--without-gd\
--disable-xmlreader\
--disable-xmlwriter\
--without-sqlite3\
--with-gd
※pdoのdisapbleを外す際はsqlite3も使うようにしないと、
You've configured extension pdo_sqlite, which depends on extension sqlite3
but you've either not enabled sqlite3, or have disabled it.
というエラーが出るみたい
修正を加えたビルドオプションはこちら
# ./configure\
--build=x86_64-redhat-linux-gnu\
--host=x86_64-redhat-linux-gnu\
--target=x86_64-redhat-linux-gnu\
--program-prefix=\
--prefix=/usr\
--exec-prefix=/usr\
--bindir=/usr/bin\
--sbindir=/usr/sbin\
--sysconfdir=/etc\
--datadir=/usr/share\
--includedir=/usr/include\
--libdir=/usr/lib64\
--libexecdir=/usr/libexec\
--localstatedir=/var\
--sharedstatedir=/var/lib\
--mandir=/usr/share/man\
--infodir=/usr/share/info\
--cache-file=../config.cache\
--with-libdir=lib64\
--with-config-file-path=/etc\
--with-config-file-scan-dir=/etc/php.d\
--disable-debug\
--with-pic\
--disable-rpath\
--without-pear\
--with-bz2\
--with-exec-dir=/usr/bin\
--with-freetype-dir=/usr\
--with-png-dir=/usr\
--with-xpm-dir=/usr\
--enable-gd-native-ttf\
--without-gdbm\
--with-gettext\
--with-gmp\
--with-iconv\
--with-jpeg-dir=/usr\
--with-openssl\
--with-pcre-regex=/usr\
--with-zlib\
--with-layout=GNU\
--enable-exif\
--enable-ftp\
--enable-magic-quotes\
--enable-sockets\
--enable-sysvsem\
--enable-sysvshm\
--enable-sysvmsg\
--with-kerberos\
--enable-ucd-snmp-hack\
--enable-shmop\
--enable-calendar\
--without-sqlite\
--with-libxml-dir=/usr\
--enable-xml\
--with-system-tzdata\
--with-apxs2=/usr/sbin/apxs\
--without-mysql\
--disable-dom\
--disable-dba\
--without-unixODBC\
--disable-phar\
--disable-fileinfo\
--without-pspell\
--disable-wddx\
--without-curl\
--disable-posix\
--disable-sysvmsg\
--disable-sysvshm\
--disable-sysvsem\
--enable-mbstring\
--with-pdo-mysql\
--enable-soap\
--enable-bcmath\
--with-gd
これを動かすと、jpeglib.h not found.というエラーが出た。
yum search jpeglibで探すも出てこず、yum search jpegで検索するとlibjpegというのが出てくる。
develがあるのでこっちをインストール。
すると順にlibpng、libXpm、freetypeがないと出てくる。
という手順をまとめると、
# yum -y install libjpeg-devel libpng-devel libXpm-devel freetype-devel
これだけ必要っぽい。
これでconfigureは通ったのでひとまずOK。
makeとmake testを実行。
相変わらずfaileが出る。
内容はこちら。
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #43073 (TrueType bounding box is wrong for angle<>0) freetype < 2.4.10 [ext/gd/tests/bug43073.phpt]
gmp_gcdext() basic tests [ext/gmp/tests/022.phpt]
Multicast support: IPv6 receive options [ext/sockets/tests/mcast_ipv6_recv.phpt]
SPL: DirectoryIterator test getGroup [ext/spl/tests/DirectoryIterator_getGroup_basic.phpt]
SPL: DirectoryIterator test getOwner [ext/spl/tests/DirectoryIterator_getOwner_basic.phpt]
SQLite3::open error test [ext/sqlite3/tests/sqlite3_15_open_error.phpt]
Test function proc_nice() by substituting argument 1 with int values. [ext/standard/tests/general_functions/proc_nice_variation5.phpt]
Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), using UTF-* [ext/xml/tests/bug32001.phpt]
XMLReader: libxml2 XML Reader, DTD [ext/xmlreader/tests/008.phpt]
XMLReader: accessing empty and non existing attributes [ext/xmlreader/tests/012.phpt]
=====================================================================
SQLite3やXMLReaderのエラーが出ている。
気になるけど、とりあえずmake installが出来てしまった。
phpinfo()のページを表示しても、一応オプションは効いているみたい。
どこかでエラーが出るかもしれないけど、その時に確認しよう。