欢迎来到天天文库
浏览记录
ID:38202056
大小:52.87 KB
页数:3页
时间:2019-05-29
《ARM平台的Nginx移植》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、ARM平台的Nginx移植Nginx是一个不错的HttpServer,附带很多实用的功能,特别是HTML5的视频播放,所以,打算把Nginx移植到ARM平台下。一、准备工作下载pcre-8.32.tar.bz2解压缩:tarxjvfpcre-8.32.tar.bz2进入目录:cdpcre-8.32配置编译工具:./configure–host=arm-none-linuxViMakefile检查一下里面的CC、CPP、CXX、CXXCPP、RANLIB、STRIP修改对应的命令定义arm-none-linux-cc….编译:make下载nginx-1.4.0.tar.gz:解压缩
2、:tarxzvfnginx-1.4.0.tar.gz进入目录:cdnginx-1.4.0配置编译工具:./configure--with-pcre=/home/…./pcre-8.32注:nginx不支持直接configure的时候带—host参数,只能先用./configure产生Makefile。二、编译Nginx1.修改MakefileViobjs/MakefileLine2:CC=cc=>CC=arm-none-linux-gccLine4:CPP=cc–E=>arm-none-linux-gcc–EMake发现错误:src/core/ngx_open_file_cach
3、e.c:507:warning:implicitdeclarationoffunction`openat'src/core/ngx_open_file_cache.c:513:warning:implicitdeclarationoffunction`fstatat'src/core/ngx_open_file_cache.c:513:error:`AT_SYMLINK_NOFOLLOW'undeclared(firstuseinthisfunction)src/core/ngx_open_file_cache.c:513:error:(Eachundeclaredidentif
4、ierisreportedonlyoncesrc/core/ngx_open_file_cache.c:513:error:foreachfunctionitappearsin.)src/core/ngx_open_file_cache.c:Infunction`ngx_open_file_wrapper':src/core/ngx_open_file_cache.c:624:error:`AT_FDCWD'undeclared(firstuseinthisfunction)/////////////////////////////////////////////////////
5、//////////////////////////2.修改objs/ngx_auto_config.hLine241禁用NGX_HAVE_OPENAT/*#ifndefNGX_HAVE_OPENAT#defineNGX_HAVE_OPENAT1#endif*/禁用后暂时没发现问题安装nginx进入继续make出现错误:src/http/ngx_http_variables.c:Infunction`ngx_http_variable_tcpinfo':src/http/ngx_http_variables.c:1027:error:structurehasnomembernam
6、ed`tcpi_rcv_space'make[1]:***[objs/src/http/ngx_http_variables.o]Error1///////////////////////////////////////////////////////////////////////////////3.修改src/http/ngx_http_variables.cLine1026禁用case3:/*case3:value=ti.tcpi_rcv_space;break;*/禁用后暂时没发现问题继续make系统提示undefinedreferenceto‘__sync_fetch_
7、and_add’undefinedreferenceto‘__sync_bool_compare_and_swap’undefinedreferenceto‘__sync_synchronize’///////////////////////////////////////////////////////////////////////////////4.修改文件visrc/os/unix/ngx_atomic.hLine109:/*#definengx_atomic_cmp_s
此文档下载收益归作者所有