alibaba / tengine

A distribution of Nginx with some advanced features
https://tengine.taobao.org
BSD 2-Clause "Simplified" License
12.75k stars 2.52k forks source link

无法安装ngx_http_dyups_module #1355

Open zhangmingshuang opened 5 years ago

zhangmingshuang commented 5 years ago

对tengin 2.3.1 进行编译安装时,

export LUAJIT_LIB=/user/local/lib
    export LUAJIT_INC=/usr/local/include/luajit-2.1

    ./configure --add-module=./ngx_cache_purge-2.3 \
    --with-http_stub_status_module \
    --with-http_ssl_module --with-http_realip_module  \
    --with-http_gzip_static_module \
    --with-ld-opt="-Wl,-rpath,/user/local/lib" \
    --add-module=./lua-nginx-module-0.10.15 \
    --add-dynamic-module=./ngx_http_dyups_module-0.2.9 \
    --with-jemalloc=./jemalloc-5.2.1

在编译阶段报错:

make -f objs/Makefile
make[1]: Entering directory `/data/env-soft/tengine-2.3.1'
cc -c -I/usr/local/include/luajit-2.1  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -DNDK_SET_VAR -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I ./lua-nginx-module-0.10.15/src/api -I objs -I src/http -I src/http/modules -I /usr/local/include/luajit-2.1 -I ./ngx_http_dyups_module-0.2.9/ \
        -o objs/addon/ngx_http_dyups_module-0.2.9/ngx_http_dyups_module.o \
        ./ngx_http_dyups_module-0.2.9/ngx_http_dyups_module.c
./ngx_http_dyups_module-0.2.9/ngx_http_dyups_module.c: In function ‘ngx_dyups_init_upstream’:
./ngx_http_dyups_module-0.2.9/ngx_http_dyups_module.c:1541: error: ‘ngx_http_upstream_srv_conf_t’ has no member named ‘default_port’
make[1]: *** [objs/addon/ngx_http_dyups_module-0.2.9/ngx_http_dyups_module.o] Error 1
make[1]: Leaving directory `/data/env-soft/tengine-2.3.1'
make: *** [build] Error 2

这个如何解决呢?

IYism commented 5 years ago

用tengine自带的dyups模块 模块路径:tengine-2.3.1/modules/ngx_http_upstream_dyups_module 编译参数改为:--add-module=modules/ngx_http_upstream_dyups_module

yunoasgit commented 5 years ago

The way the new version is compiled has changed, referring to new features, documents. Try new ways and discard old ones

ysjgxm commented 4 years ago

3Q,因为要动态修改upstream并且支持四层转发,升级新版本后遇到了同样问题,希望能解决燃眉之急