nginx 编译错误make[1]: *** [objs/addon/src/ngx_http_h264_streaming_module.o] Error 1make[2]: *** [objs/a

错误1:

make[1]: *** [objs/addon/src/ngx_http_h264_streaming_module.o] Error 1

make[1]: Leaving directory `/home/mock/BUILD_ROOT/BUILD/nginx-0.8.38′

make: *** [build] Error 2


解决办法:Vim nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c  将如下几行注释


/* TODO: Win32 */

if (r->zero_in_uri)
{
return NGX_DECLINED;

}


错误2:

/home/zhangbin/mserver/nginx/nginx_mod_h264_streaming-2.2.7/src/mp4_reader.c:529:22: error: variable ‘level_indication’ set but not used [-Werror=unused-but-set-variable]
/home/zhangbin/mserver/nginx/nginx_mod_h264_streaming-2.2.7/src/mp4_reader.c:528:22: error: variable ‘ profile_compatibility’ set but not used [-Werror=unused-but-set-variable]
/home/zhangbin/mserver/nginx/nginx_mod_h264_streaming-2.2.7/src/mp4_reader.c:527:22: error: variable ‘profile_indication’ set but not used [- Werror=unused-but-set-variable ]
/home/zhangbin/mserver/nginx/nginx_mod_h264_streaming-2.2.7/src/mp4_reader.c:526:22: error: variable ‘ configuration_version’ set but not used  [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[2]: *** [objs/addon/src/mp4_reader.o] Error 1
make[2]: Leaving directory `/home/zhangbin/mserver/nginx/nginx-1.3.6'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/zhangbin/mserver/nginx/nginx-1.3.6'
make: *** [all] Error 2
root@ubuntu:/home/zhangbin/mserver/nginx/nginx_mod_h264_streaming-2.2.7# 

解决方法:

直接修改nginx安装包下/objs/Makefile文件中的-Werror。

去掉红色部分

CC =gcc
CFLAGS =  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -D_LARGEFILE_SOURCE -DBUILDING_NGINX
CPP = gcc -E
LINK = $(CC)



你可能感兴趣的:(nginx)