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

  • Post author:
  • Post category:其他





错误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)









版权声明:本文为zhxtpray原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。