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

lua-nginx-module: handling of multiple headers changed in nginx 1.23+ #418

Closed
1 task
barkingfoodog opened this issue Jan 9, 2023 · 1 comment
Closed
1 task

Comments

@barkingfoodog
Copy link

Indicate troubleshooting steps taken

  • [ X ] Ran brew update and retried your prior step?
  • [ X ] Ran brew doctor, fixed as many issues as possible and retried your prior step?
  • [ X ] Checked that a similar issue hasn't already been filed?
  • [ X ] Looked up the software bug tracker if reporting a build error?
  • If you're seeing permission errors tried running sudo chown -R $(whoami) $(brew --prefix)?

Bug reports / build errors:

==> Fetching denji/nginx/nginx-full
==> Downloading https://nginx.org/download/nginx-1.23.3.tar.gz
Already downloaded: /Users/aclay/Library/Caches/Homebrew/downloads/863e4f8cefb39e2c86b9797ec606b51137fe2b556c02f09e3ce9621a4034d6e6--nginx-1.23.3.tar.gz
==> Installing nginx-full from denji/nginx
==> ./configure --prefix=/opt/homebrew/Cellar/nginx-full/1.23.3 --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path=/opt/homebrew/Cellar/nginx-full/1.23.3/bin/nginx --with-cc-opt=-I/opt/homebrew/include -I/opt/homebrew/opt/pcre/include -I/opt/homebrew/opt/[email protected]/include --with-ld-opt=-L/opt/homebrew/lib -L/opt/homebrew/opt/pcre/lib -L/opt/homebrew/op
==> make install
Last 15 lines from /Users/aclay/Library/Logs/Homebrew/nginx-full/02.make:
		-o objs/addon/src/ngx_http_lua_rewriteby.o \
		/opt/homebrew/share/lua-nginx-module/src/ngx_http_lua_rewriteby.c
clang -c -I/opt/homebrew/opt/luajit/include/luajit-2.1  -pipe  -O -Wall -Wextra -Wpointer-arith -Wconditional-uninitialized -Wno-unused-parameter -Wno-deprecated-declarations -Werror -g -I/opt/homebrew/include -I/opt/homebrew/opt/pcre/include -I/opt/homebrew/opt/[email protected]/include -DNDK_SET_VAR  -I src/core -I src/event -I src/event/modules -I src/os/unix -I /opt/homebrew/share/ngx-devel-kit/objs -I objs/addon/ndk -I /opt/homebrew/share/lua-nginx-module/src/api -I objs -I src/http -I src/http/modules -I /opt/homebrew/share/ngx-devel-kit/src -I /opt/homebrew/share/ngx-devel-kit/src -I /opt/homebrew/share/ngx-devel-kit/objs -I objs/addon/ndk -I /opt/homebrew/opt/luajit/include/luajit-2.1 \
		-o objs/addon/src/ngx_http_lua_accessby.o \
		/opt/homebrew/share/lua-nginx-module/src/ngx_http_lua_accessby.c
/opt/homebrew/share/lua-nginx-module/src/ngx_http_lua_headers_in.c:156:18: error: no member named 'cookies' in ''
                 offsetof(ngx_http_headers_in_t, cookies),
                 ^                               ~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/stddef.h:104:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^                     ~
1 error generated.
make[1]: *** [objs/addon/src/ngx_http_lua_headers_in.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install] Error 2

Brief summary of issue:

Installing denji/nginx/nginx-full --with-lua-module produces an error. This appears to be different from #407. Found similar error reports from other packages:

There is a similar error reported on openresty with headers-more-module:

openresty/headers-more-nginx-module#135

These issues suggest updating to nginx 1.23.1, but homebrew-nginx is installing 1.23.3.

The complete command that you issued:

 brew install denji/nginx/nginx-full --with-lua-module

Gist with output of brew doctor:

06:13:58 local ~ $ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  salt
  stormssh

Link output by brew gist-logs <formula>:

https://gist.github.com/ae624e83a4cec2c24ba38f4cdc38ca91

Output of brew config:

HOMEBREW_VERSION: 3.6.17
ORIGIN: https://github.com/Homebrew/brew
HEAD: e76c55e18434c870cca1de7aadf9d5218271fe2d
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 23f125f249a3a6f22f325ce12ff1c224a283f3d2
Core tap last commit: 18 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.VoX26gw0TM/org.macosforge.xquartz:0
HOMEBREW_EDITOR: /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -w
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_INSTALL_BADGE: ☕️
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.39.0 => /opt/homebrew/bin/git
Curl: 7.85.0 => /usr/bin/curl
macOS: 13.1-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: 14.2
Rosetta 2: false
@denji denji closed this as completed in 3a0323b Jan 9, 2023
@denji
Copy link
Owner

denji commented Jan 9, 2023

Looks like will need an extra patch from the openresty/lua-nginx-module#2063 to access the multiple headers.

@denji denji changed the title brew install denji/nginx/nginx-full --with-lua-module fails on no member named 'cookies' in '' lua-nginx-module: handling of multiple headers changed in nginx 1.23+ Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants