[PHP-users 7587] Re: ext の gd をコンパイルされる時にエラーがでる。

NetCool! php-users@php.gr.jp
Mon, 20 May 2002 11:38:48 +0900


服部です。
自己レスです。

エラーの原因がわかりました。

原因は gd の古いライブラリ( libgd.a : gd 1.6(GIF版)より前)が別の
フォルダに存在していてコンパイル時にそちらを参照していました。
ファイル(libgd.a)を削除して、gd ( gd-1.8.4 ) を再インストールして
php をコンパイルしたら問題なくコンパイルできました。
すいませんでした。

> make 時の ext の gd をコンパイルしているところのログ
> -------------------------------------------------------------------------
> gcc -I. -I/home/test/php-4.2.1/ext/gd -I/test/hattori/php-4.2.1/main
> -I/home/test/php-4.2.1 -I/home/test/php-4.2.1/Zend -I/home/test/php-4.2.1/ext/mysql/libmysql
> -I/usr/local/pgsql/include -I/home/test/php-4.2.1/ext/xml/expat
>   -I/home/test/php-4.2.1/TSRM -g -O2  -c gd.c && touch gd.lo
> In file included from gd.c:36:
> php_gd.h:69: warning: static declaration for `gdImageColorResolve' follows non-static
> gd.c:92: conflicting types for `gdIOCtx'
> /usr/local/include/gd_io.h:18: previous declaration of `gdIOCtx'
> gd.c: In function `zif_imagecreatefromgif':
> gd.c:1235: `gdImageCreateFromGif' undeclared (first use in this function)
> gd.c:1235: (Each undeclared identifier is reported only once
> gd.c:1235: for each function it appears in.)
> gd.c: In function `zif_imagegif':
> gd.c:1464: `gdImageGif' undeclared (first use in this function)
> make[3]: *** [gd.lo] エラー 1
> make[3]: 出ます ディレクトリ `/home/test/php-4.2.1/ext/gd'
> make[2]: *** [all-recursive] エラー 1
> make[2]: 出ます ディレクトリ `/home/test/php-4.2.1/ext/gd'
> make[1]: *** [all-recursive] エラー 1
> make[1]: 出ます ディレクトリ `/home/test/php-4.2.1/ext'
> make: *** [all-recursive] エラー 1
> -------------------------------------------------------------------------