さむーい。


なんだか先週くらいから急に寒くなったような。今日も家に帰ろうと会社を出たら風が冷たい。もうコート使おうかな。。。

そんな寒い日々が続いてる中、最近の新しいPHPをコンパイルするとこんなエラーにぶち当たることがある。

# make …実行中… ext/gd/libgd/.libs/gdkanji.o(.text+0x61): In function `do_convert': /home/hoge/src/php/php-5.2.5/ext/gd/libgd/gdkanji.c:350: undefined reference to `libiconv_open' ext/gd/libgd/.libs/gdkanji.o(.text+0xa7):/home/hoge/src/php/php-5.2.5/ext/gd/libgd/gdkanji.c:365: undefined reference to `libiconv' ext/gd/libgd/.libs/gdkanji.o(.text+0xb6):/home/hoge/src/php/php-5.2.5/ext/gd/libgd/gdkanji.c:381: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0xa5): In function `_php_iconv_appendl': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:348: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x195):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:385: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x274): In function `php_iconv_string': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:441: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x2a7):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:453: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x2f3):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:467: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x316):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:478: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x357): In function `_php_iconv_strlen': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:603: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x398):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:660: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x3e6):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:626: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x472): In function `_php_iconv_strpos': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:851: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x4d1):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:993: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x514):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:879: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x69e): In function `_php_iconv_mime_decode': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1354: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x6fe):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1823: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x70f):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1826: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0xd51):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1465: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0xd63):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1468: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x1156): In function `zif_iconv_substr': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:723: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x11a7):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:802: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x11c0):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:806: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x126b):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:747: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x12d7):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:755: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x1b3c): In function `php_iconv_stream_filter_dtor': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:2465: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x1c3e): In function `php_iconv_stream_filter_append_bucket': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:2615: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x1cef):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:2537: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x236f): In function `zif_iconv_mime_encode': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1043: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x2393):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1057: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x2548):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1316: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x2559):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1319: undefined reference to `libiconv_close' ext/iconv/.libs/iconv.o(.text+0x27d5):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1128: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x2801):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1160: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x282c):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1176: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x2b19):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1303: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x2f08):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1228: undefined reference to `libiconv' ext/iconv/.libs/iconv.o(.text+0x2f3a):/home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:1259: more undefined references to `libiconv' follow ext/iconv/.libs/iconv.o(.text+0x35e4): In function `php_iconv_stream_filter_factory_create': /home/hoge/src/php/php-5.2.5/ext/iconv/iconv.c:2491: undefined reference to `libiconv_open' collect2: ld returned 1 exit status make: *** [sapi/cli/php] エラー 1

なんかiconv周りでエラー。configureの時にでも問題あるのかな?と思いつつ、configureのいじり方はよくわからないので以下のmake方法で解決。

# make clean # make ZEND_EXTRA_LIBS='-liconv'

一度makeしてエラーになってる場合、make cleanして改めてmake ZEND~しないと駄目。

にしても昔はこんなエラー出なかったのになぁ。いつから出るようになったんだろう?

作成日:2007/11/23 03:02:55
トラックバック  ※トラックバックは承認後に表示されます。
TrackbackURL:このページのトラックバックの受付は終了しています。

1
PHPのmakeエラー
PHP5.2.5をソースからインストールする際にはまったこと。 1.iconv周...
030 WEB DESIGN on 2008/03/02 14:17:09
2
Fedora 8へアップグレード
12月10日から13日にかけて、Fedora 7をインストールしてあったマシン3台をFedora 8にアップグレードしました。
細かいこともいろいろありましたが、大きなところでApache関連で少し手間取りま
JG3LEB音楽ブログ on 2007/12/14 01:32:25
3
PHP5.2.5のインストール時に発生するエラーiconvの件を解決
PHP5.2.5のインストール時にエラーが発生。
最初に行なったコマンドはこれ。
# ./configure --enable-mbregex --with-sqlite --with-zlib=/usr \
--with-gd --with-jpeg-dir=/usr --with-freetype-dir=/usr --with-ttf \
--with-png-dir=
RwJ(Ruby with Java on PHP for Linux) on 2007/12/05 15:27:19
コメント
1
thank youerith 30Dec2008 11:53PM
as this article,
my problem has solved!
thank you.
2
そうし 18Jan2009 11:55PM
> erith
That's good!
名前:

タイトル:

コメント: