Closed peterhanneman closed 8 years ago
@timelessvirtues the tags v0.3.0 & v0.4.0 really don't work with later versions of nginx but the master commit does. Try to do a clean setup, probably your local repository is with some wrong reference. I just did this here and worked fine.
$ mkdir /tmp/build
$ cd /tmp/build/
$ wget -c -N http://nginx.org/download/nginx-1.11.2.tar.gz; tar xzf nginx-1.11.2.tar.gz;
$ git clone git@github.com:GUI/nginx-upstream-dynamic-servers.git
$ cd nginx-1.11.2/
$ ./configure --add-module=../nginx-upstream-dynamic-servers
$ make
$ ./objs/nginx -V
nginx version: nginx/1.11.2
built by gcc 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1)
configure arguments: --add-module=../nginx-upstream-dynamic-servers
For some reason your module has an issue compiling w/ the NAXSI web application firewall module.
Moving the NAXSI's --add-module to before your module's fixed the issue. Quite bizarre behavior but thanks for your time.
Works:
./configure \
--prefix=/opt/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--user=www-data \
--group=www-data \
--without-select_module \
--without-poll_module \
--with-threads \
--with-file-aio \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_stub_status_module \
--without-http_charset_module \
--without-http_ssi_module \
--without-http_userid_module \
--without-http_autoindex_module \
--without-http_geo_module \
--without-http_split_clients_module \
--without-http_referer_module \
--without-http_fastcgi_module \
--without-http_uwsgi_module \
--without-http_scgi_module \
--without-http_memcached_module \
--without-http_limit_conn_module \
--without-http_limit_req_module \
--without-http_empty_gif_module \
--without-http_browser_module \
--without-http_upstream_hash_module \
--without-http_upstream_ip_hash_module \
--without-http_upstream_least_conn_module \
--without-http_upstream_zone_module \
--without-http-cache \
--add-module=../naxsi/naxsi_src \
--add-module=../nginx-upstream-dynamic-servers \
--with-cc-opt="-Ofast -march=native -flto -fwhole-program -I ../build/staticlibssl/include" \
--with-ld-opt="-L ../build/staticlibssl/lib -Wl,-rpath -lssl -lcrypto -ldl -lz" \
--with-pcre=../build/pcre-8.39/ \
--with-pcre-jit \
--with-libatomic
Does not work:
./configure \
--prefix=/opt/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--user=www-data \
--group=www-data \
--without-select_module \
--without-poll_module \
--with-threads \
--with-file-aio \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_stub_status_module \
--without-http_charset_module \
--without-http_ssi_module \
--without-http_userid_module \
--without-http_autoindex_module \
--without-http_geo_module \
--without-http_split_clients_module \
--without-http_referer_module \
--without-http_fastcgi_module \
--without-http_uwsgi_module \
--without-http_scgi_module \
--without-http_memcached_module \
--without-http_limit_conn_module \
--without-http_limit_req_module \
--without-http_empty_gif_module \
--without-http_browser_module \
--without-http_upstream_hash_module \
--without-http_upstream_ip_hash_module \
--without-http_upstream_least_conn_module \
--without-http_upstream_zone_module \
--without-http-cache \
--add-module=../nginx-upstream-dynamic-servers \
--add-module=../naxsi/naxsi_src \
--with-cc-opt="-Ofast -march=native -flto -fwhole-program -I ../build/staticlibssl/include" \
--with-ld-opt="-L ../build/staticlibssl/lib -Wl,-rpath -lssl -lcrypto -ldl -lz" \
--with-pcre=../build/pcre-8.39/ \
--with-pcre-jit \
--with-libatomic
Been using this module on a production reverse proxy for 6+ months now without issue. Unfortunately now I can't get this module to compile against the latest Nginx 1.11.2. I know for a fact is worked with 1.11.1 w/ an unknown older commit hash but I sadly deleted the old build directory prematurely.
Trying to compile against tag v0.3.0 & v0.4.0 both yield:
Trying to compile against the latest master yields:
Compiling against the latest master I noticed that "cc -o objs/nginx ..." command includes two references to "objs/addon/nginx-upstream-dynamic-servers/ngx_http_upstream_dynamic_servers.o" which may be the only issue?
Thanks in advance for taking the time to look at this. Let me know if you need any other information to help isolate the issue.