[PHP-users 11191] php4.2.2+gd2.0.4のインストール

shinocha php-users@php.gr.jp
Wed, 30 Oct 2002 15:22:20 +0900


はじめまして、崎山と申します。

この度、GD2.0.4が出ていたので、小さなフォントがこれで表示されるかなと
わくわくしながらインストールを行ったのですが、うまくいきません。
以前は、PHP4.2.2+gd2.0.1+freetype2でちゃんとできたのですが、
今回は ext/gdの部分でエラーが起きてmakeできません。

GD 2.0.4
$tar xzvf gd-2.0.4.tar.gz
$cd gd-2.0.4
$./configure
$vi Makefile

CFLAGS=-g  -DHAVE_LIBPNG -DHAVE_LIBZ -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -DHAVE_LIBXPM -DHAVE_LIBX11 -DJISX0208
LIBS=-lgd  -lpng -lz -ljpeg -lfreetype -lXpm -lX11 -lm
INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/local/include/freetype2 -I/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
LIBDIRS=-L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
INSTALL_LIB=/usr/local/lib
INSTALL_INCLUDE=/usr/local/include
INSTALL_BIN=/usr/local/bin

に少し書き換えた後したあと、
$make libgd.a
$su
#make install

でGDのインストールは終了しています。

PHP4.2.2
$./buildconf
$./configure \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local \
--with-namazu \
--with-apache=../apache_1.3.27 \
--with-freetype-dir=/usr/local/include/freetype2 \
--enable-track-vars \
--with-ttf-dir=/usr/local \
--with-jpeg-dir=/usr/local \
--with-zlib=/usr/local \
--with-png-dir=/usr/local \
--with-xpm-dir=/usr/X11R6/lib \
--enable-mbstring \
--enable-mbregex

を行って、logには
checking for GD support... yes
checking whether to enable truetype string function in GD... no
checking for the location of libjpeg... yes
checking for jpeg_read_header in -ljpeg... yes
checking for the location of libpng... yes
checking for png_write_image in -lpng... yes
checking for the location of libXpm... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for freetype(2)... yes
checking for FreeType 1.x support... no
checking for T1lib support... no
checking for gdImageString16 in -lgd... yes
checking for gdImagePaletteCopy in -lgd... yes
checking for gdImageCreateFromPng in -lgd... yes
checking for gdImageCreateFromGif in -lgd... no
checking for gdImageGif in -lgd... no
checking for gdImageWBMP in -lgd... yes
checking for gdImageCreateFromJpeg in -lgd... yes
checking for gdImageCreateFromXpm in -lgd... yes
checking for gdImageCreateFromGd2 in -lgd... yes
checking for gdImageCreateTrueColor in -lgd... yes
checking for gdImageSetTile in -lgd... yes
checking for gdImageSetBrush in -lgd... yes
checking for gdImageStringTTF in -lgd... yes
checking for gdImageStringFT in -lgd... yes
checking for gdImageStringFTEx in -lgd... no
checking for gdImageColorClosestHWB in -lgd... yes
checking for gdImageColorResolve in -lgd... yes
checking for gdImageGifCtx in -lgd... no
....

$make
make[2]: Entering directory `/home/shinobu/php-4.2.2/ext/gd'
make[3]: Entering directory `/home/shinobu/php-4.2.2/ext/gd'
gcc -I. -I/home/shinobu/php-4.2.2/ext/gd -I/home/shinobu/php-4.2.2/main -I/home/shinobu/php-4.2.2 -I/home/shinobu/apache_1.3.27/src/include -I/home/shinobu/apache_1.
3.27/src/os/unix -I/home/shinobu/php-4.2.2/Zend -I/usr/local/include -I/usr/local/include/freetype2/freetype -I/usr/local/mysql/include/mysql -I/home/shinobu/php-4.2
.2/ext/xml/expat  -I/home/shinobu/php-4.2.2/TSRM -g -O2  -c gd.c && touch gd.lo
gd_ctx.c: In function `_php_image_output_ctx':
In file included from gd.c:83:
gd_ctx.c:70: structure has no member named `free'
gd_ctx.c:98: structure has no member named `free'
gd.c: In function `_php_image_type':
gd.c:1014: structure has no member named `free'
gd.c:1017: structure has no member named `free'
gd.c: In function `_php_image_create_from':
gd.c:1208: structure has no member named `free'
make[3]: *** [gd.lo] Error 1

になります。
以前はちゃんとmake出来たのに、今回出来ないということは、gdあたりが
怪しいと思うのですが...。
ここ最近、このことばかり調べているのですが、なかなか先に進みません。
どうか、ご教授の程よろしくお願いいたします。
また、長文で申し訳ありませんm(_ _)m

---
さきやま<sakichan@orange.ocn.ne.jp>