Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of add-module will affect the dependency check #160

Closed
othree opened this issue Mar 1, 2016 · 4 comments
Closed

Order of add-module will affect the dependency check #160

othree opened this issue Mar 1, 2016 · 4 comments

Comments

@othree
Copy link
Contributor

othree commented Mar 1, 2016

Sorry for asking here
Not sure is this a nginx issue or third party issue or homebrew issue.

I am trying to add [ngx-brotil][] to this repo.
Every thing works well until I add geoip2 support:

brew install --verbose nginx-full --devel --with-http2 --with-lua-module --with-brotli-module --with-geoip2-module

The error is:

./configure: error: the geoip2 module requires the maxminddb library.

And the configure command is(break into multiple line for easy reading):

./configure --prefix=/usr/local/Cellar/nginx-full/1.9.12
--with-http_ssl_module
--with-pcre
--with-ipv6
--sbin-path=/usr/local/Cellar/nginx-full/1.9.12/bin/nginx
--with-cc-opt=-I/usr/local/include
-I/usr/local/Cellar/pcre/8.38/include
-I/usr/local/Cellar/openssl/1.0.2f/include
--with-ld-opt=-L/usr/local/lib
-L/usr/local/Cellar/pcre/8.38/lib
-L/usr/local/Cellar/openssl/1.0.2f/lib
--conf-path=/usr/local/etc/nginx/nginx.conf
--pid-path=/usr/local/var/run/nginx.pid
--lock-path=/usr/local/var/run/nginx.lock
--http-client-body-temp-path=/usr/local/var/run/nginx/client_body_temp
--http-proxy-temp-path=/usr/local/var/run/nginx/proxy_temp
--http-fastcgi-temp-path=/usr/local/var/run/nginx/fastcgi_temp
--http-uwsgi-temp-path=/usr/local/var/run/nginx/uwsgi_temp
--http-scgi-temp-path=/usr/local/var/run/nginx/scgi_temp
--http-log-path=/usr/local/var/log/nginx/access.log
--error-log-path=/usr/local/var/log/nginx/error.log
--with-http_v2_module
--add-module=/usr/local/share/brotli-nginx-module
--add-module=/usr/local/share/geoip2-nginx-module
--add-module=/usr/local/share/lua-nginx-module

But geoip2 can install well without brotli module:

brew install --verbose nginx-full --devel --with-http2 --with-lua-module --with-geoip2-module

So I try change the order of add-module by editing nginx-full.rb

And install again, it work fine without any error, the configure command is:

./configure --prefix=/usr/local/Cellar/nginx-full/1.9.12
--with-http_ssl_module
--with-pcre
--with-ipv6
--sbin-path=/usr/local/Cellar/nginx-full/1.9.12/bin/nginx
--with-cc-opt=-I/usr/local/include
-I/usr/local/Cellar/pcre/8.38/include
-I/usr/local/Cellar/openssl/1.0.2f/include
--with-ld-opt=-L/usr/local/lib
-L/usr/local/Cellar/pcre/8.38/lib
-L/usr/local/Cellar/openssl/1.0.2f/lib
--conf-path=/usr/local/etc/nginx/nginx.conf
--pid-path=/usr/local/var/run/nginx.pid
--lock-path=/usr/local/var/run/nginx.lock
--http-client-body-temp-path=/usr/local/var/run/nginx/client_body_temp
--http-proxy-temp-path=/usr/local/var/run/nginx/proxy_temp
--http-fastcgi-temp-path=/usr/local/var/run/nginx/fastcgi_temp
--http-uwsgi-temp-path=/usr/local/var/run/nginx/uwsgi_temp
--http-scgi-temp-path=/usr/local/var/run/nginx/scgi_temp
--http-log-path=/usr/local/var/log/nginx/access.log
--error-log-path=/usr/local/var/log/nginx/error.log
--with-http_v2_module
--add-module=/usr/local/share/geoip2-nginx-module
--add-module=/usr/local/share/brotli-nginx-module
--add-module=/usr/local/share/lua-nginx-module

Don't know what happened on the first configure command. The only difference is the order of last 3 lines. Is there any way to dig into the issue to see what was wrong?

@denji
Copy link
Owner

denji commented Mar 1, 2016

External dependencies must be returned to the main file Formula/nginx-full.rb

  depends_on "libxslt" if build.with? "xsltproc-module"
+ depends_on "libmaxminddb" if build.with? "geoip2-module"
+ depends_on "brotli" if build.with? "brotli-module"
  depends_on "gperftools" => :optional

@othree
Copy link
Contributor Author

othree commented Mar 1, 2016

Thanks, will take a try later.

@othree
Copy link
Contributor Author

othree commented Mar 2, 2016

Sadly, this patch not solve the issue. Still getting this:

configuring additional modules
adding module in /usr/local/share/brotli-nginx-module
checking for Brotli library ... found
 + ngx_brotli was configured
adding module in /usr/local/share/geoip2-nginx-module
checking for MaxmindDB library ... not found
./configure: error: the geoip2 module requires the maxminddb library.

Without brotli

configuring additional modules
adding module in /usr/local/share/geoip2-nginx-module
checking for MaxmindDB library ... found
 + ngx_http_geoip2_module was configured
adding module in /usr/local/share/lua-nginx-module
checking for LuaJIT library in....

@lock
Copy link

lock bot commented Apr 9, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants