denji / homebrew-nginx

:fire_engine: Community NGINX tap for custom modules
https://denji.github.io/homebrew-nginx/
Other
617 stars 199 forks source link

error when running `brew install nginx-full --with-brotli-module ` #429

Open xionsun opened 5 months ago

xionsun commented 5 months ago

Indicate troubleshooting steps taken

Bug reports / build errors:

Bug

Brief summary of issue:

Error when running brew install nginx-full --with-brotli-module

The complete command that you issued:

sunx@sunX-MacBook-M1Pro brotli-nginx-module % brew install nginx-full --with-brotli-module                                                                                              
==> Fetching denji/nginx/nginx-full
==> Downloading https://nginx.org/download/nginx-1.26.0.tar.gz
Already downloaded: /Users/sunx/Library/Caches/Homebrew/downloads/0559a7b0672b443e9b27dc5d52d2a7d5aa2f593d4c54ade253c2348efd74de51--nginx-1.26.0.tar.gz
==> Installing nginx-full from denji/nginx
==> ./configure --with-http_ssl_module --with-pcre --with-ipv6 --sbin-path=/opt/homebrew/Cellar/nginx-full/1.26.0/bin/nginx --with-cc-opt=-I/opt/homebrew/include -I/opt/homebrew/opt/pcre/include -I/opt/homebrew/o
Last 15 lines from /Users/sunx/Library/Logs/Homebrew/nginx-full/01.configure:
checking for struct dirent.d_namlen ... found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... not found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
configuring additional modules
adding module in /opt/homebrew/share/brotli-nginx-module

./configure: error: Brotli library is missing from the /usr directory.

Please make sure that the git submodule has been checked out:

    cd /opt/homebrew/share/brotli-nginx-module && git submodule update --init && cd /private/tmp/nginx-full-20240527-82548-os6dy4/nginx-1.26.0

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/denji/homebrew-nginx/issues

These open issues may also help:
building nginx-full with healthcheck module giving error https://github.com/denji/homebrew-nginx/issues/263
Brew install nginx-full --with-rtmp-module brew install nginx-full --with-rtmp-module https://github.com/denji/homebrew-nginx/issues/382
`brew install nginx-full --with-lua-module` fails https://github.com/denji/homebrew-nginx/issues/407
brew install nginx-full --with-njs-module          Error https://github.com/denji/homebrew-nginx/issues/419
`cp: /usr/local/etc/nginx/koi-win: Operation not permitted` installing nginx-full https://github.com/denji/homebrew-nginx/issues/359
mv: nginx.xsc: No such file or directory while installing nginx-full --with-perl https://github.com/denji/homebrew-nginx/issues/361
Compiler error when installing nginx-full ---with-upload-module https://github.com/denji/homebrew-nginx/issues/304

Gist with output of brew doctor:

nothing uncommon

Output of brew config:

HOMEBREW_VERSION: 4.3.2
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9fdb0d53990d3e62e25325a6f89dbb769e84a530
Last commit: 10 hours ago
Core tap JSON: 27 May 11:04 UTC
Core cask tap JSON: 27 May 11:04 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.1 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.1/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.4.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4
Rosetta 2: false
jeffdyke commented 5 months ago

Running into same problem on 14.5, with newly updated x-code

HOMEBREW_VERSION: 4.3.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: e130e47f23b8b806096f9ec4f2c193213b8ec908
Last commit: 2 days ago
Core tap JSON: 04 Jun 16:52 UTC
Core cask tap JSON: 04 Jun 16:52 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.2 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.2/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.42.0 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4
Rosetta 2: false

Tried linking various directories from /opt/homebrew to /usr/local, with no luck so far.

jleider commented 5 months ago

I too am having the same problem.

Tracing down the brotli-nginx-module to /opt/homebrew/Cellar/brotli-nginx-module/1.0.0rc/share/brotli-nginx-module I see that there are only c files and no so modules. I assume it needs to be compiled and the README in that module has directions for configuring and compiling nginx but there is no configure executable in /opt/homebrew/Cellar/nginx-full/1.26.0.

Additionally, I wouldn't expect to have to compile the module directly, should I? I would expect that to be taken care of by the brew formula.

HOMEBREW_VERSION: 4.3.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: e130e47f23b8b806096f9ec4f2c193213b8ec908
Last commit: 2 days ago
Core tap JSON: 04 Jun 15:44 UTC
Core cask tap JSON: 04 Jun 15:44 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.2 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.2/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.41.0 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 13.6.7-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: N/A
Rosetta 2: false
denji commented 5 months ago

I've updated the brotli modules denji/homebrew-nginx@5a9b94d (brotli v1.1.0rc), but there are likely to be linking and static build issues. I don't have a macOS Apple Silicon test machine to test at the moment.