【发布时间】:2011-03-27 18:14:27
【问题描述】:
今天我一直在设置额外的 VPS 克隆,但在使用最新的 nginx 开发版本 (0.9.6) 时遇到了一个奇怪且令人沮丧的编译时错误。
我正在运行 Ubuntu 10.04.2 LTS x86_64,但是,我已将 GCC 升级到 4.6.1。 ./configure 运行时没有错误,但在运行 make -j4 时出现以下错误:
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/事件/模块 -I src/os/unix -I objs \ -o objs/src/core/ngx_open_file_cache.o \ src/core/ngx_open_file_cache.c src/core/ngx_resolver.c:在函数中 'ngx_resolver_process_ptr': src/core/ngx_resolver.c:1425:43: 错误:变量 'qclass' 已设置但未设置 使用 [-Werror=unused-but-set-variable] src/core/ngx_resolver.c:1425:36: 错误:变量 'qtype' 已设置但未设置 使用 [-Werror=unused-but-set-variable] cc1:所有警告都被视为 错误
制作[1]: * [objs/src/core/ngx_resolver.o] 错误 1 make[1]: * 等待未完成 工作.... make[1]: 离开目录 `/root/nginx-0.9.6' make: *** [build] 错误 2
(最好在 pastebin 看到:http://pastebin.com/g0bNS2nY)
我尝试将 --with--cc-opt="-W" 添加到 ./configure 选项,但没有结果。谁能解释一下这个节目的终结者?
提前非常感谢!
【问题讨论】:
-
嗯,是的,这是 gcc-4.6.0 的候选版本。顺便说一句,4.6.0 已在四天后发布。
标签: gcc nginx compilation