[PHP-users 23510]PHP4にGDの組み込み

ml ml @ naviokinawa.com
2004年 10月 27日 (水) 22:36:54 JST


こんにちは。maeda @ mlと申します。

PHPにGDを組み込もうと再インストールしたのですが、
makeでエラーが出てしまいます。

「QRcode Perl CGI & PHP scripts ver. 0.50」
というPHPを動かしたいのですが、
「GD 2.0.10未満およびPHP4.3.0バンドルのGDではGDのバグのため正常に動作しません。
GD 1.8.4 またはGD 2.0.10 以上の使用を推奨します。」
という注意書きがあるので、GD2.0.28をインストールしましたが、

PHP-4.3.0のmake時に下記エラーが表示されます。

ext/gd/gd.lo: In function `zif_imagerotate':
/usr/local/src/php-4.3.0/ext/gd/gd.c:1022: undefined reference to `gdImageRotate
'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] エラー 1

・Configureオプション
./configure --with-apxs=/usr/sbin/apxs --enable-mbstring --enable-mbregex \
--enable-versioning --with-pgsql=/home/pgsql2 --with-config-file-path=/etc/httpd/conf \
--enable-safe-mode --with-mysql=/home/mysql --with-gd=/usr/local/ \
--with-jpeg-dir=/usr/lib/ --with-png-dir=/usr/lib/ --with-zlib-dir=shared \
--with-zlib --with-freetype-dir=/usr/lib/ --enable-gd-native-ttf \
--enable-zend-multibyte

--with-gdとするとインストールは正常に出来ますが、
上記PHPが正常に動きません。

---- 各インストール状況 ----
・jpeg-6b
$ gzip -cd jpegsrc.v6b.tar.gz | tar xvf -
$ cd jpeg-6b
$ su
$ ./configure --prefix=/usr/ --enable-static --enable-shared
$ make
$ su
# make test
# make install

・libpngのインストール
$ gzip -cd libpng1.2.7.tar.gz | tar xvf -
$ cd libpng-1.2.7
$ cp scripts/makefile.linux makefile
$ vi makefile
------------------------------------
#ZLIBLIB=/usr/local/lib
#ZLIBINC=/usr/local/include
ZLIBLIB=../zlib
ZLIBINC=../zlib

↓書き換えます↓

ZLIBLIB=/usr/lib
ZLIBINC=/usr/include
#ZLIBLIB=../zlib
#ZLIBINC=../zlib
------------------------------------
$ make
$ su
# make install

・freetypeのインストール
$ tar xvfz freetype-2.1.9.tar.gz
$ cd freetype-2.1.9
$ make setup
$ make
$ su
# make install

・GDのインストール
$ tar -zxvf gd-2.0.28.tar.gz
$ cd gd-2.0.28
$ ./configure
$ make
$ su
# make check
# make install



PHP-users メーリングリストの案内