MacPorts 1.9.1でPHP 5.2.14のCLIのビルドに失敗する場合の対処法
先日MacPortsで管理しているPHPのバージョンアップを行ったのですが以下のような現象に悩まされました。 $ php -r "print_r('hoge');" Fatal error: Call to undefined function print_r() in Command line code on line 1 エラーが発生するのはコマンドラインからの利用のみで、なぜかWeb経由では問題なく動きます。 調べて見ると全ての関数が使えない。。 ビルド時のconfigureで以下のエラーが表示されCLI版のバイナリ作成に失敗していました。 Generating files updating cache ./config.cache creating ./config.status creating php5.spec creating main/build-defs.h creating scripts/phpize creating scripts/man1/phpize.1 creating scripts/php-config creating scripts/man1/php-config.1 creating sapi/cli/php.1 creating main/php_config.h creating main/internal_functions.c gawk(96091,0x7fff70a28c20) malloc: *** error for object 0x100214910: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug creating main/internal_functions_cli.c gawk(96132,0x7fff70a28c20) malloc: *** error for object 0x100215aa0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug [ad] ...