nginx / homebrew-unit

Unit Homebrew tap
15 stars 23 forks source link

no NJS library found #9

Closed codygreen closed 1 year ago

codygreen commented 1 year ago

brew install -v nginx/unit/unit is failing with the error: ./configure: error: no NJS library found

Full output:

brew install -v nginx/unit/unit
==> Downloading https://formulae.brew.sh/api/formula.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3763k  100 3763k    0     0  35.3M      0 --:--:-- --:--:-- --:--:-- 36.7M
==> Fetching nginx/unit/unit
==> Downloading https://hg.nginx.org/njs/archive/0.7.10.tar.gz
Already downloaded: /Users/c.green/Library/Caches/Homebrew/downloads/0fba99a09d085b6fd0007e6ef6995ad06ef907d01da30dd4d7bc24f80d8dc618--njs-0.7.10.tar.gz
==> Verifying checksum for '0fba99a09d085b6fd0007e6ef6995ad06ef907d01da30dd4d7bc24f80d8dc618--njs-0.7.10.tar.gz'
==> Downloading https://unit.nginx.org/download/unit-1.29.1.tar.gz
Already downloaded: /Users/c.green/Library/Caches/Homebrew/downloads/b088cdd10a3c42bce66aab198e9ce0309a3b85724bcbe0d00cdc394127b11af7--unit-1.29.1.tar.gz
==> Verifying checksum for 'b088cdd10a3c42bce66aab198e9ce0309a3b85724bcbe0d00cdc394127b11af7--unit-1.29.1.tar.gz'
==> Installing unit from nginx/unit
/usr/bin/env tar --extract --no-same-owner --file /Users/c.green/Library/Caches/Homebrew/downloads/b088cdd10a3c42bce66aab198e9ce0309a3b85724bcbe0d00cdc394127b11af7--unit-1.29.1.tar.gz --directory /private/tmp/d20230402-67885-c2y2q6
/usr/bin/env cp -pR /private/tmp/d20230402-67885-c2y2q6/unit-1.29.1/. /private/tmp/unit-20230402-67885-12ocpi7/unit-1.29.1
/usr/bin/env tar --extract --no-same-owner --file /Users/c.green/Library/Caches/Homebrew/downloads/0fba99a09d085b6fd0007e6ef6995ad06ef907d01da30dd4d7bc24f80d8dc618--njs-0.7.10.tar.gz --directory /private/tmp/d20230402-67885-gre037
/usr/bin/env cp -pR /private/tmp/d20230402-67885-gre037/njs-0.7.10/. /private/tmp/unit--njs-20230402-67885-ge4fdf/njs-0.7.10
==> ./configure --no-libxml2
configuring for Darwin 22.3.0 arm64
checking for C compiler: clang
 + using Clang C compiler
 + Apple clang version 14.0.0 (clang-1400.0.29.202)
checking for sizeof(int) ... 4
checking for sizeof(u_int) ... 4
checking for sizeof(void *) ... 8
checking for sizeof(uintptr_t) ... 8
checking for sizeof(size_t) ... 8
checking for sizeof(off_t) ... 8
checking for sizeof(time_t) ... 8
checking for flag -ffp-eval-method=double ... not found
checking for system byte ordering ... little
checking for GCC unsigned __int128 ... found
checking for GCC __builtin_expect() ... found
checking for GCC __builtin_unreachable() ... found
checking for GCC __builtin_prefetch() ... found
checking for GCC __builtin_clz() ... found
checking for GCC __builtin_clzll() ... found
checking for GCC __attribute__ visibility ... found
checking for GCC __attribute__ malloc ... found
checking for GCC __attribute__ aligned ... found
checking for GCC __attribute__ packed ... found
checking for GCC __attribute__ fallthrough ... found
checking for Address sanitizer ... not found
checking for Memory sanitizer ... not found
checking for _mm_setcsr() ... not found
checking for clock_gettime(CLOCK_MONOTONIC) ... found
checking for struct tm.tm_gmtoff ... found
checking for altzone ... not found
checking for posix_memalign() ... found
checking for getrandom() ... not found
checking for SYS_getrandom in Linux ... not found
checking for getentropy() ... not found
checking for getentropy() in sys/random.h ... found
checking for stat.st_atimespec ... found
checking for stat.st_birthtim ... not found
checking for stat.st_atim ... not found
checking for Computed goto ... found
checking for explicit_bzero() ... not found
checking for explicit_memset() ... not found
checking for PCRE2 library ... not found
checking for PCRE2 library in /opt/homebrew/Cellar/pcre2/10.42 ... found
checking for PCRE2 version ... 10.42
checking for GNU readline library ... found
checking for OpenSSL library ... not found
checking for OpenSSL library -lcrypto ... found
checking for OpenSSL version ... "OpenSSL 1.1.1t  7 Feb 2023"
creating build/Makefile
checking for expect ... found
 + Expect version: expect version 5.45

NJS configuration summary:

 + using CC: "clang"
 + using CFLAGS: " -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O "

 + using PCRE library: -L/opt/homebrew/Cellar/pcre2/10.42/lib -lpcre2-8
 + using readline library: -lreadline
 + using OpenSSL library: -lcrypto

 njs build dir: build
 njs CLI: build/njs

==> make libnjs njs
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_diyfp.o \
        -MMD -MF build/src/njs_diyfp.dep -MT build/src/njs_diyfp.o \
        src/njs_diyfp.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_dtoa.o \
        -MMD -MF build/src/njs_dtoa.dep -MT build/src/njs_dtoa.o \
        src/njs_dtoa.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_dtoa_fixed.o \
        -MMD -MF build/src/njs_dtoa_fixed.dep -MT build/src/njs_dtoa_fixed.o \
        src/njs_dtoa_fixed.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_str.o \
        -MMD -MF build/src/njs_str.dep -MT build/src/njs_str.o \
        src/njs_str.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_strtod.o \
        -MMD -MF build/src/njs_strtod.dep -MT build/src/njs_strtod.o \
        src/njs_strtod.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_murmur_hash.o \
        -MMD -MF build/src/njs_murmur_hash.dep -MT build/src/njs_murmur_hash.o \
        src/njs_murmur_hash.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_djb_hash.o \
        -MMD -MF build/src/njs_djb_hash.dep -MT build/src/njs_djb_hash.o \
        src/njs_djb_hash.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_utf8.o \
        -MMD -MF build/src/njs_utf8.dep -MT build/src/njs_utf8.o \
        src/njs_utf8.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_utf16.o \
        -MMD -MF build/src/njs_utf16.dep -MT build/src/njs_utf16.o \
        src/njs_utf16.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_arr.o \
        -MMD -MF build/src/njs_arr.dep -MT build/src/njs_arr.o \
        src/njs_arr.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_rbtree.o \
        -MMD -MF build/src/njs_rbtree.dep -MT build/src/njs_rbtree.o \
        src/njs_rbtree.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_lvlhsh.o \
        -MMD -MF build/src/njs_lvlhsh.dep -MT build/src/njs_lvlhsh.o \
        src/njs_lvlhsh.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_trace.o \
        -MMD -MF build/src/njs_trace.dep -MT build/src/njs_trace.o \
        src/njs_trace.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_random.o \
        -MMD -MF build/src/njs_random.dep -MT build/src/njs_random.o \
        src/njs_random.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_md5.o \
        -MMD -MF build/src/njs_md5.dep -MT build/src/njs_md5.o \
        src/njs_md5.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_sha1.o \
        -MMD -MF build/src/njs_sha1.dep -MT build/src/njs_sha1.o \
        src/njs_sha1.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_sha2.o \
        -MMD -MF build/src/njs_sha2.dep -MT build/src/njs_sha2.o \
        src/njs_sha2.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_time.o \
        -MMD -MF build/src/njs_time.dep -MT build/src/njs_time.o \
        src/njs_time.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_file.o \
        -MMD -MF build/src/njs_file.dep -MT build/src/njs_file.o \
        src/njs_file.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_malloc.o \
        -MMD -MF build/src/njs_malloc.dep -MT build/src/njs_malloc.o \
        src/njs_malloc.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_mp.o \
        -MMD -MF build/src/njs_mp.dep -MT build/src/njs_mp.o \
        src/njs_mp.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_sprintf.o \
        -MMD -MF build/src/njs_sprintf.dep -MT build/src/njs_sprintf.o \
        src/njs_sprintf.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_utils.o \
        -MMD -MF build/src/njs_utils.dep -MT build/src/njs_utils.o \
        src/njs_utils.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_chb.o \
        -MMD -MF build/src/njs_chb.dep -MT build/src/njs_chb.o \
        src/njs_chb.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_value.o \
        -MMD -MF build/src/njs_value.dep -MT build/src/njs_value.o \
        src/njs_value.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_vm.o \
        -MMD -MF build/src/njs_vm.dep -MT build/src/njs_vm.o \
        src/njs_vm.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_vmcode.o \
        -MMD -MF build/src/njs_vmcode.dep -MT build/src/njs_vmcode.o \
        src/njs_vmcode.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_boolean.o \
        -MMD -MF build/src/njs_boolean.dep -MT build/src/njs_boolean.o \
        src/njs_boolean.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_number.o \
        -MMD -MF build/src/njs_number.dep -MT build/src/njs_number.o \
        src/njs_number.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_symbol.o \
        -MMD -MF build/src/njs_symbol.dep -MT build/src/njs_symbol.o \
        src/njs_symbol.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_string.o \
        -MMD -MF build/src/njs_string.dep -MT build/src/njs_string.o \
        src/njs_string.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_object.o \
        -MMD -MF build/src/njs_object.dep -MT build/src/njs_object.o \
        src/njs_object.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_object_prop.o \
        -MMD -MF build/src/njs_object_prop.dep -MT build/src/njs_object_prop.o \
        src/njs_object_prop.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_array.o \
        -MMD -MF build/src/njs_array.dep -MT build/src/njs_array.o \
        src/njs_array.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_json.o \
        -MMD -MF build/src/njs_json.dep -MT build/src/njs_json.o \
        src/njs_json.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_function.o \
        -MMD -MF build/src/njs_function.dep -MT build/src/njs_function.o \
        src/njs_function.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_regexp.o \
        -MMD -MF build/src/njs_regexp.dep -MT build/src/njs_regexp.o \
        src/njs_regexp.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_date.o \
        -MMD -MF build/src/njs_date.dep -MT build/src/njs_date.o \
        src/njs_date.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_error.o \
        -MMD -MF build/src/njs_error.dep -MT build/src/njs_error.o \
        src/njs_error.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_math.o \
        -MMD -MF build/src/njs_math.dep -MT build/src/njs_math.o \
        src/njs_math.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_timer.o \
        -MMD -MF build/src/njs_timer.dep -MT build/src/njs_timer.o \
        src/njs_timer.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_module.o \
        -MMD -MF build/src/njs_module.dep -MT build/src/njs_module.o \
        src/njs_module.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_event.o \
        -MMD -MF build/src/njs_event.dep -MT build/src/njs_event.o \
        src/njs_event.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_extern.o \
        -MMD -MF build/src/njs_extern.dep -MT build/src/njs_extern.o \
        src/njs_extern.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_variable.o \
        -MMD -MF build/src/njs_variable.dep -MT build/src/njs_variable.o \
        src/njs_variable.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_builtin.o \
        -MMD -MF build/src/njs_builtin.dep -MT build/src/njs_builtin.o \
        src/njs_builtin.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_lexer.o \
        -MMD -MF build/src/njs_lexer.dep -MT build/src/njs_lexer.o \
        src/njs_lexer.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_lexer_keyword.o \
        -MMD -MF build/src/njs_lexer_keyword.dep -MT build/src/njs_lexer_keyword.o \
        src/njs_lexer_keyword.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_parser.o \
        -MMD -MF build/src/njs_parser.dep -MT build/src/njs_parser.o \
        src/njs_parser.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_generator.o \
        -MMD -MF build/src/njs_generator.dep -MT build/src/njs_generator.o \
        src/njs_generator.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_disassembler.o \
        -MMD -MF build/src/njs_disassembler.dep -MT build/src/njs_disassembler.o \
        src/njs_disassembler.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_array_buffer.o \
        -MMD -MF build/src/njs_array_buffer.dep -MT build/src/njs_array_buffer.o \
        src/njs_array_buffer.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_typed_array.o \
        -MMD -MF build/src/njs_typed_array.dep -MT build/src/njs_typed_array.o \
        src/njs_typed_array.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_promise.o \
        -MMD -MF build/src/njs_promise.dep -MT build/src/njs_promise.o \
        src/njs_promise.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_encoding.o \
        -MMD -MF build/src/njs_encoding.dep -MT build/src/njs_encoding.o \
        src/njs_encoding.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_iterator.o \
        -MMD -MF build/src/njs_iterator.dep -MT build/src/njs_iterator.o \
        src/njs_iterator.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_scope.o \
        -MMD -MF build/src/njs_scope.dep -MT build/src/njs_scope.o \
        src/njs_scope.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_async.o \
        -MMD -MF build/src/njs_async.dep -MT build/src/njs_async.o \
        src/njs_async.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/external/njs_regex.o \
        -MMD -MF build/external/njs_regex.dep -MT build/external/njs_regex.o \
        external/njs_regex.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/src/njs_buffer.o \
        -MMD -MF build/src/njs_buffer.dep -MT build/src/njs_buffer.o \
        src/njs_buffer.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/external/njs_crypto_module.o \
        -MMD -MF build/external/njs_crypto_module.dep -MT build/external/njs_crypto_module.o \
        external/njs_crypto_module.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/external/njs_webcrypto_module.o \
        -MMD -MF build/external/njs_webcrypto_module.dep -MT build/external/njs_webcrypto_module.o \
        external/njs_webcrypto_module.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/external/njs_fs_module.o \
        -MMD -MF build/external/njs_fs_module.dep -MT build/external/njs_fs_module.o \
        external/njs_fs_module.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/external/njs_query_string_module.o \
        -MMD -MF build/external/njs_query_string_module.dep -MT build/external/njs_query_string_module.o \
        external/njs_query_string_module.c
clang -c -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O   -I/opt/homebrew/Cellar/pcre2/10.42/include \
        -Isrc -Ibuild -Injs \
        -o build/build/njs_modules.o \
        -MMD -MF build/build/njs_modules.dep -MT build/build/njs_modules.o \
        build/njs_modules.c
sed -e "s,@PREFIX@,/private/tmp/unit-20230402-67885-12ocpi7/unit-1.29.1/njs/build," \
        -e "s,@LIBDIR@,/private/tmp/unit-20230402-67885-12ocpi7/unit-1.29.1/njs/build," \
        -e "s,@CFLAGS@,-I/private/tmp/unit-20230402-67885-12ocpi7/unit-1.29.1/njs/build -I/private/tmp/unit-20230402-67885-12ocpi7/unit-1.29.1/njs/src," \
        -e "s,@VERSION@,0.7.10," \
        -e "s,@EXTRA_LIBS@,-lm   -L/opt/homebrew/Cellar/pcre2/10.42/lib -lpcre2-8 -lcrypto," \
        src/njs.pc.in > build/njs.pc
ar -r -c build/libnjs.a \
        build/src/njs_diyfp.o build/src/njs_dtoa.o build/src/njs_dtoa_fixed.o build/src/njs_str.o build/src/njs_strtod.o build/src/njs_murmur_hash.o build/src/njs_djb_hash.o build/src/njs_utf8.o build/src/njs_utf16.o build/src/njs_arr.o build/src/njs_rbtree.o build/src/njs_lvlhsh.o build/src/njs_trace.o build/src/njs_random.o build/src/njs_md5.o build/src/njs_sha1.o build/src/njs_sha2.o build/src/njs_time.o build/src/njs_file.o build/src/njs_malloc.o build/src/njs_mp.o build/src/njs_sprintf.o build/src/njs_utils.o build/src/njs_chb.o build/src/njs_value.o build/src/njs_vm.o build/src/njs_vmcode.o build/src/njs_boolean.o build/src/njs_number.o build/src/njs_symbol.o build/src/njs_string.o build/src/njs_object.o build/src/njs_object_prop.o build/src/njs_array.o build/src/njs_json.o build/src/njs_function.o build/src/njs_regexp.o build/src/njs_date.o build/src/njs_error.o build/src/njs_math.o build/src/njs_timer.o build/src/njs_module.o build/src/njs_event.o build/src/njs_extern.o build/src/njs_variable.o build/src/njs_builtin.o build/src/njs_lexer.o build/src/njs_lexer_keyword.o build/src/njs_parser.o build/src/njs_generator.o build/src/njs_disassembler.o build/src/njs_array_buffer.o build/src/njs_typed_array.o build/src/njs_promise.o build/src/njs_encoding.o build/src/njs_iterator.o build/src/njs_scope.o build/src/njs_async.o build/external/njs_regex.o build/src/njs_buffer.o build/external/njs_crypto_module.o build/external/njs_webcrypto_module.o build/external/njs_fs_module.o build/external/njs_query_string_module.o build/build/njs_modules.o
clang -O -o build/njs -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -O  \
         -I/opt/homebrew/Cellar/pcre2/10.42/include -Isrc -Ibuild -Injs \
        src/njs_shell.c \
        build/libnjs.a \
        -O -lm   -L/opt/homebrew/Cellar/pcre2/10.42/lib -lpcre2-8 -lcrypto -lreadline
==> ./configure --prefix=/opt/homebrew/Cellar/unit/1.29.1 --sbindir=/opt/homebrew/Cellar/unit/1.29.1/bin --log=/opt/homebrew/var/log/unit/unit.log --pid=/opt/homebrew/var/run/unit/unit.pid --control=unix:/opt/homebrew/var/run/unit/control.sock --modules=/opt/homebrew/lib/unit/modules --state=/opt/homebrew/var/state/unit --tmp=/tmp --openssl --njs --cc-opt=-I/opt/homebrew/opt/openssl@1.1/include --ld-opt=-L/opt/homebrew/opt/openssl@1.1/lib
configuring Unit 1.29.1 for Darwin 22.3.0 arm64
checking for C compiler: clang
 + using Clang C compiler
 + Apple clang version 14.0.0 (clang-1400.0.29.202)
building an "echo" program
checking for endianness ... little endian
checking for int size ... 4
checking for long size ... 8
checking for long long size ... 8
checking for void * size ... 8
checking for size_t size ... 8
checking for off_t size ... 8
checking for time_t size ... 8
checking for C99 variadic macro ... found
checking for GCC __builtin_expect() ... found
checking for GCC __builtin_unreachable() ... found
checking for GCC __builtin_prefetch() ... found
checking for GCC __builtin_clz() ... found
checking for GCC __builtin_popcount() ... found
checking for GCC __attribute__ visibility ... found
checking for GCC __attribute__ aligned ... found
checking for GCC __attribute__ malloc ... found
checking for GCC __attribute__ packed ... found
checking for GCC __attribute__ unused ... found
checking for GCC builtin atomic operations ... found
checking for posix_memalign() ... found
checking for Linux malloc_usable_size() ... not found
checking for FreeBSD malloc_usable_size() ... not found
checking for MacOSX malloc_good_size() ... found
checking for alloca() ... found
checking for Linux mallopt() ... not found
checking for MAP_ANON ... found
checking for MAP_POPULATE ... not found
checking for MAP_PREFAULT_READ ... not found
checking for shm_open() ... found
checking for shm_open(SHM_ANON) ... not found
checking for memfd_create() ... not found
checking for Linux clock_gettime(CLOCK_REALTIME_COARSE) ... not found
checking for FreeBSD clock_gettime(CLOCK_REALTIME_FAST) ... not found
checking for clock_gettime(CLOCK_REALTIME) ... found
checking for Linux clock_gettime(CLOCK_MONOTONIC_COARSE) ... not found
checking for FreeBSD clock_gettime(CLOCK_MONOTONIC_FAST) ... not found
checking for clock_gettime(CLOCK_MONOTONIC) ... found
checking for HP-UX hg_gethrtime() ... not found
checking for struct tm.tm_gmtoff ... found
checking for altzone ... not found
checking for localtime_r() ... found
checking for pthread_yield() ... not found
checking for pthread_yield_np() ... found
checking for pthread spinlock ... not found
checking for sem_timedwait() ... not found
checking for sem_timedwait() in librt ... not found
checking for __thread ... found
checking for Linux epoll ... not found
checking for kqueue ... found
checking for kqueue EVFILT_USER ... found
checking for Solaris event port ... not found
checking for /dev/poll ... not found
checking for AIX pollset ... not found
checking for AF_INET6 ... found
checking for sockaddr.sa_len ... found
checking for struct sockaddr size ... 16
checking for struct sockaddr_in size ... 16
checking for struct sockaddr_in6 size ... 28
checking for struct sockaddr_un size ... 106
checking for struct sockaddr_storage size ... 128
checking for socketpair(AF_UNIX, SOCK_SEQPACKET) ... found but is not working
checking for struct msghdr.msg_control ... found
checking for sockopt SO_PASSCRED ... not found
checking for struct cmsgcred ... not found
checking for sys/filio.h ... found
checking for ioctl(FIONBIO) ... found
checking for socket(SOCK_NONBLOCK) ... not found
checking for accept4() ... not found
checking for Linux sendfile() ... not found
checking for FreeBSD sendfile() ... not found
checking for MacOSX sendfile() ... found
checking for posix_fadvise() ... not found
checking for fcntl(F_READAHEAD) ... not found
checking for fcntl(F_RDAHEAD) ... found
checking for openat2() ... not found
checking for getrandom() ... not found
checking for SYS_getrandom in Linux ... not found
checking for getentropy() ... not found
checking for getentropy() in sys/random.h ... found
checking for ucontext ... not found
checking for _XOPEN_SOURCE ucontext ... not found
checking for dlopen() ... found
checking for setproctitle() ... not found
checking for getgrouplist() ... found
checking for OpenSSL library ... found
checking for OpenSSL version ... "OpenSSL 1.1.1t  7 Feb 2023"
checking for OpenSSL SSL_CONF_cmd() ... found
checking for OpenSSL tlsext support ... found
checking for PCRE2 library ... found
 + PCRE2 version: 10.42
checking for Linux unshare() ... not found
checking for Linux pivot_root() ... not found
checking for <mntent.h> ... not found
checking for prctl(PR_SET_NO_NEW_PRIVS) ... not found
checking for prctl(PR_SET_CHILD_SUBREAPER) ... not found
checking for Linux mount() ... not found
checking for FreeBSD nmount() ... not found
checking for Linux umount2() ... not found
checking for unmount() ... found
checking for Linux capability ... not found
checking for NJS ... not found

./configure: error: no NJS library found.

==> Formula
Tap: nginx/unit
Path: /opt/homebrew/Library/Taps/nginx/homebrew-unit/Formula/unit.rb
==> Configuration
HOMEBREW_VERSION: 4.0.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: cf6614b50eac1c9f4bf386dc6989f0d443148df8
Last commit: 6 days ago
Core tap JSON: 02 Apr 20:26 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
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.37.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.86.0 => /usr/bin/curl
macOS: 13.2.1-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: N/A
Rosetta 2: false
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j10
CMAKE_PREFIX_PATH: /opt/homebrew/opt/openssl@1.1:/opt/homebrew
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /private/tmp/unit-20230402-67885-12ocpi7/unit-1.29.1/njs/build:/opt/homebrew/opt/openssl@1.1/lib/pkgconfig:/opt/homebrew/opt/pcre2/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
ACLOCAL_PATH: /opt/homebrew/share/aclocal
PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/openssl@1.1/bin:/opt/homebrew/opt/pcre2/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: nginx/unit/unit 1.29.1 did not build
Logs:
     /Users/c.green/Library/Logs/Homebrew/unit/00.options.out
     /Users/c.green/Library/Logs/Homebrew/unit/03.configure.cc
     /Users/c.green/Library/Logs/Homebrew/unit/03.configure
     /Users/c.green/Library/Logs/Homebrew/unit/01.configure.cc
     /Users/c.green/Library/Logs/Homebrew/unit/02.make.cc
     /Users/c.green/Library/Logs/Homebrew/unit/01.configure
     /Users/c.green/Library/Logs/Homebrew/unit/02.make
If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/nginx/homebrew-unit/issues
lcrilly commented 1 year ago

Hi Cody, thanks for the report. Can you confirm if this is on a M1 Mac?

My M1's brew config is identical but I cannot reproduce.

It's really quite strange, because "NJS" builds successfully but then cannot be found by the Unit configure script 😕 Doubly strange seeing as $PKG_CONFIG_PATH includes the directory where NJS was built (/private/tmp/unit-20230402-67885-12ocpi7/unit-1.29.1/njs/build)

Will investigate further.

codygreen commented 1 year ago

Yes, this is on a fresh install M1 Pro. Thanks!

hongzhidao commented 1 year ago

Hi @codygreen, Could you show the content of the build/autoconf.err file from Unit? The part related to the njs compiling error is enough.

Btw, with the config options, it seems you didn't specify the njs include and library paths.

==> ./configure --prefix=/opt/homebrew/Cellar/unit/1.29.1 ...  --njs --cc-opt=-I/opt/homebrew/opt/openssl@1.1/include --ld-opt=-L/opt/homebrew/opt/openssl@1.1/lib
lcrilly commented 1 year ago

@codygreen shared the autoconf.err file:

<SNIP 1141 LINES>
/opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config: line 12: /opt/homebrew/opt/pkg-config/bin/pkg-config: No such file or directory
/opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config: line 12: exec: /opt/homebrew/opt/pkg-config/bin/pkg-config: cannot execute: No such file or directory
----------------------------------------
checking for NJS
build/autotest.c:1:10: fatal error: 'njs.h' file not found
#include <njs.h>
         ^~~~~~~
1 error generated.
----------
#include <njs.h>

                  int main(void) {
                      njs_vm_t      *vm;
                      njs_vm_opt_t  opts;

                      njs_vm_opt_init(&opts);

                      vm = njs_vm_create(&opts);
                      if (vm == NULL)
                          return 1;
                      return 0;
                  }
----------
clang -pipe -fPIC -fvisibility=hidden -O -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fstrict-aliasing -Wstrict-overflow=5 -Wmissing-prototypes -Werror -g -I/opt/homebrew/opt/openssl@1.1/include -o build/autotest build/autotest.c -lnjs -lssl -lcrypto \ \ -L/opt/homebrew/Cellar/pcre2/10.42/lib -lpcre2-8 -L/opt/homebrew/opt/openssl@1.1/lib
----------

We concluded that pkg-config was a missing dependency. Confirmed by running brew install pkg-config before installing Unit.

This should fix it:

diff --git a/Formula/unit.rb b/Formula/unit.rb
index 583cf0f..d2a0466 100644
--- a/Formula/unit.rb
+++ b/Formula/unit.rb
@@ -5,6 +5,7 @@ class Unit < Formula
   sha256 "7d756cff8c1a40b38c313fdbe8748333ffce034a3916fa1b502d63cc10623437"
   head "https://hg.nginx.org/unit", using: :hg

+  depends_on "pkg-config"
   depends_on "openssl@1.1"
   depends_on "pcre2"