打算把生产环境的PHP升级到5.2.11, 于是重新使用ICC编译了PHP-5.2.11+PHP-FPM-0.6.
结果编译时失败,出现以下错误:
fpm_atomic.h(116): catastrophic error: #error directive: unsupported architecture. please write a patch and send it in
#error unsupported architecture. please write a patch and send it in
开始以为是我使用独立安装造成的,不过尝试了integrated安装,问题也一样.
于是检查了fpm_atomic.h 116行:
#else
#error unsupported architecture. please write a patch and send it in
#endif
原来是没有检测当前arch的宏分支. 由于icc的x86_64是定义了__x86_64 而不是__amd64__.
修改了一下:
#elif ( __amd64__ || __amd64 || __x86_64__ )
Patch (php-fpm-icc.patch) :
=====================================
@@ -37,7 +37,7 @@
[...]
Compile php+php-fpm with ICC v11.1
