首先在nginx 1.11.8上同样的方式编译是成功的.
LuaJIT_version=2.0.4 lua_nginx_module_version=0.10.7 ngx_devel_kit_version=0.3.0 echo_nginx_module_version=0.60
tengine的编译加入lua我是根据 官方tengine的说明
tengine 配置参数如下:
./configure --prefix=$tengine_install_dir \ --user=$run_user --group=$run_user \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-ipv6 \ --with-http_gzip_static_module \ --with-http_realip_module \ --with-http_flv_module \ --with-http_mp4_module \ --enable-mods-shared=all \ --with-file-aio \ --with-http_concat_module=shared \ --with-http_sysguard_module=shared \ --with-openssl=../openssl-$openssl_version \ --with-pcre=../pcre-$pcre_version \ --with-pcre-jit \ --with-jemalloc \ --http-client-body-temp-path=$tengine_install_dir/temp/client_body_temp \ --http-proxy-temp-path=$tengine_install_dir/temp/proxy_temp \ --http-fastcgi-temp-path=$tengine_install_dir/temp/fastcgi_temp \ --http-uwsgi-temp-path=$tengine_install_dir/temp/uwsgi_temp \ --http-scgi-temp-path=$tengine_install_dir/temp/scgi_temp \ --with-ld-opt='-ljemalloc -Wl,-rpath,/usr/local/lib' \ --add-module=../ngx_devel_kit-$ngx_devel_kit_version \ --add-module=../lua-nginx-module-${lua_nginx_module_version} \ --add-module=../echo-nginx-module-${echo_nginx_module_version}
编译的错误结果如下: -o objs/addon/src/ngx_http_lua_socket_tcp.o \ ../lua-nginx-module-0.10.7/src/ngx_http_lua_socket_tcp.c cc -c -I/usr/local/include/luajit-2.0 -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -DNDK_SET_VAR -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I modules/ngx_http_lua_module/src/api -I ../ngx_devel_kit-0.3.0/objs -I objs/addon/ndk -I ../lua-nginx-module-0.10.7/src/api -I /usr/local/include/luajit-2.0 -I ../pcre-8.39 -I ../openssl-1.0.2j/.openssl/include -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I ../ngx_devel_kit-0.3.0/src -I src/mail \ -o objs/addon/src/ngx_http_lua_api.o \ ../lua-nginx-module-0.10.7/src/ngx_http_lua_api.c ../lua-nginx-module-0.10.7/src/ngx_http_lua_api.c: 在函数‘ngx_http_lua_shared_memory_init’中: ../lua-nginx-module-0.10.7/src/ngx_http_lua_api.c:179: 错误:‘ngx_shm_zone_t’没有名为‘noreuse’的成员 ../lua-nginx-module-0.10.7/src/ngx_http_lua_api.c:179: 错误:‘ngx_shm_zone_t’没有名为‘noreuse’的成员 make[1]: [objs/addon/src/ngx_http_lua_api.o] 错误 1 make[1]: Leaving directory `/root/oneinstack/src/tengine-2.2.0' make: [build] 错误 2