PHP5.2なRPMをCentOS4で作る(ただし、CentOS5のSRPMとか使って)
↑なことしようとすると見事にビルド失敗します。
configure: creating cache ../config.cache checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i386-redhat-linux-gnu checking for i686-redhat-linux-gnu-cc... no checking for i686-redhat-linux-gnu-gcc... no checking for cc... cc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. エラー: Bad exit status from /var/tmp/rpm-tmp.75438 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.75438 (%build)
という感じ。
3時間くらいぐぐって↓のURLを発見。
http://www.chr00t.com/2009/05/php-52-on-centos-4/
より
Change this line in php.spec:
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign"to:
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
ということなのでそのままrpmbuildしたら通りましたー