nginx编译报错error: can not detect int size
发布时间:01/15 来源: 浏览:
关键词:
nginx编译报错error: can not detect int size错误我们只需要一行命令就可以解决此问题了,具体的操作步骤与细节我们来看看。
在64位的机器上进行对nginx进行编译配置,居然报错error: can not detect int size,原来是加上了–with-cpu-opt选项.
正如某博客所说去掉cpu优化选项即可通过配置,但是对于有优化强迫症的IT工作者来说这是绝对不容许的.
经过一番研究,设置好CFLAGS参数即可在cpu优化选项开启的情况下通过配置测试.
如下:
export CFLAGS="-Werror"
./configure {some args} --with-cpu-opt=pentiumpro
这样编译的话就不会报错了.以上在centos 6.x 64位的机器上测试了没有问题.