feature: fixed compatibility with macOS 11.15+.

bumped version to 1.17.8.1 RC1.

win32/win64: upgraded pcre to 8.44 and openssl to 1.1.1d.
pull/596/head
Yichun Zhang (agentzh) 3 years ago
parent 721d7dacc4
commit 2ac0ad9f03
  1. 80
      t/000-sanity.t
  2. 8
      util/build-win32.sh
  3. 17
      util/configure
  4. 2
      util/ver

@ -1806,43 +1806,43 @@ clean:
=== TEST 22: ngx_postgres enabled and --with-pg_config is specified
--- cmd: ./configure --with-pg_config=pg_config --with-http_postgres_module --dry-run
--- out_like
platform: linux \(linux\)
--- out
platform: linux (linux)
cp -rp bundle/ build
cd build
export LIBPQ_LIB='(/usr/lib64|/usr/lib/x86_64-linux-gnu)'
export LIBPQ_INC='(?:/usr/include|/usr/include/postgresql)'
export LIBPQ_LIB='/usr/lib64'
export LIBPQ_INC='/usr/include'
cd LuaJIT-2.1-20200102
INFO: found -msse4.2 in cc.
gmake TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=\$OPENRESTY_BUILD_DIR/luajit-root/
export LUAJIT_LIB='\$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='\$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root/
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
cd ..
patching the resty script with hard-coded nginx binary path...
cd nginx-1.17.8
sh ./configure --prefix=/usr/local/openresty/nginx \\
--with-cc-opt='-O2' \\
--add-module=../ngx_devel_kit-0.3.1rc1 \\
--add-module=../echo-nginx-module-0.62rc1 \\
--add-module=../xss-nginx-module-0.06 \\
--add-module=../ngx_coolkit-0.2 \\
--add-module=../set-misc-nginx-module-0.32 \\
--add-module=../form-input-nginx-module-0.12 \\
--add-module=../encrypted-session-nginx-module-0.08 \\
--add-module=../ngx_postgres-1.0 \\
--add-module=../srcache-nginx-module-0.32rc1 \\
--add-module=../ngx_lua-0.10.16rc4 \\
--add-module=../ngx_lua_upstream-0.07 \\
--add-module=../headers-more-nginx-module-0.33 \\
--add-module=../array-var-nginx-module-0.05 \\
--add-module=../memc-nginx-module-0.19 \\
--add-module=../redis2-nginx-module-0.15 \\
--add-module=../redis-nginx-module-0.3.7 \\
--add-module=../rds-json-nginx-module-0.15 \\
--add-module=../rds-csv-nginx-module-0.09 \\
--add-module=../ngx_stream_lua-0.0.8rc2 \\
--with-ld-opt='-Wl,-rpath,\1:/usr/local/openresty/luajit/lib' \\
sh ./configure --prefix=/usr/local/openresty/nginx \
--with-cc-opt='-O2' \
--add-module=../ngx_devel_kit-0.3.1rc1 \
--add-module=../echo-nginx-module-0.62rc1 \
--add-module=../xss-nginx-module-0.06 \
--add-module=../ngx_coolkit-0.2 \
--add-module=../set-misc-nginx-module-0.32 \
--add-module=../form-input-nginx-module-0.12 \
--add-module=../encrypted-session-nginx-module-0.08 \
--add-module=../ngx_postgres-1.0 \
--add-module=../srcache-nginx-module-0.32rc1 \
--add-module=../ngx_lua-0.10.16rc4 \
--add-module=../ngx_lua_upstream-0.07 \
--add-module=../headers-more-nginx-module-0.33 \
--add-module=../array-var-nginx-module-0.05 \
--add-module=../memc-nginx-module-0.19 \
--add-module=../redis2-nginx-module-0.15 \
--add-module=../redis-nginx-module-0.3.7 \
--add-module=../rds-json-nginx-module-0.15 \
--add-module=../rds-csv-nginx-module-0.09 \
--add-module=../ngx_stream_lua-0.0.8rc2 \
--with-ld-opt='-Wl,-rpath,/usr/lib64:/usr/local/openresty/luajit/lib' \
--with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module
cd ../..
Type the following commands to build and install:
@ -2354,8 +2354,8 @@ cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20200102
INFO: found -msse4.2 in cc.
gmake TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root/
gmake TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root/
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
cd ..
@ -2392,7 +2392,7 @@ Type the following commands to build and install:
.PHONY: all install clean
all:
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit
cd $OPENRESTY_BUILD_DIR/lua-cjson-2.1.0.7 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_CMODULE_DIR=/usr/local/openresty/lualib LUA_MODULE_DIR=/usr/local/openresty/lualib CJSON_CFLAGS="-g -fpic" CJSON_LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-resty-signal-0.02 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-redis-parser-0.13 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
@ -2402,7 +2402,7 @@ all:
install: all
mkdir -p $(DESTDIR)/usr/local/openresty/
-cp $OPENRESTY_DIR/COPYRIGHT $(DESTDIR)/usr/local/openresty/
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd $OPENRESTY_BUILD_DIR/lua-cjson-2.1.0.7 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_CMODULE_DIR=/usr/local/openresty/lualib LUA_MODULE_DIR=/usr/local/openresty/lualib CJSON_CFLAGS="-g -fpic" CJSON_LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-resty-signal-0.02 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-redis-parser-0.13 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
@ -2432,7 +2432,8 @@ install: all
clean:
rm -rf build *.exe *.dll openresty-*
--- err
Can't exec "sw_vers": No such file or directory at ./configure line 823.
Can't exec "sw_vers": No such file or directory at ./configure line 829.
Use of uninitialized value $v in scalar chomp at ./configure line 830.
@ -2444,8 +2445,8 @@ cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20200102
INFO: found -msse4.2 in cc.
gmake TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root/
gmake TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit
gmake install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root/
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1'
cd ..
@ -2482,7 +2483,7 @@ Type the following commands to build and install:
.PHONY: all install clean
all:
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit
cd $OPENRESTY_BUILD_DIR/lua-cjson-2.1.0.7 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_CMODULE_DIR=/usr/local/openresty/lualib LUA_MODULE_DIR=/usr/local/openresty/lualib CJSON_CFLAGS="-g -fpic" CJSON_LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-resty-signal-0.02 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-redis-parser-0.13 && $(MAKE) DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
@ -2492,7 +2493,7 @@ all:
install: all
mkdir -p $(DESTDIR)/usr/local/openresty/
-cp $OPENRESTY_DIR/COPYRIGHT $(DESTDIR)/usr/local/openresty/
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd $OPENRESTY_BUILD_DIR/LuaJIT-2.1-20200102 && $(MAKE) install TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2 -fno-stack-check' CC=cc PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
cd $OPENRESTY_BUILD_DIR/lua-cjson-2.1.0.7 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_CMODULE_DIR=/usr/local/openresty/lualib LUA_MODULE_DIR=/usr/local/openresty/lualib CJSON_CFLAGS="-g -fpic" CJSON_LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-resty-signal-0.02 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
cd $OPENRESTY_BUILD_DIR/lua-redis-parser-0.13 && $(MAKE) install DESTDIR=$(DESTDIR) LUA_INCLUDE_DIR=$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.1 LUA_LIB_DIR=/usr/local/openresty/lualib LDFLAGS='-bundle -undefined dynamic_lookup' CC=cc
@ -2522,7 +2523,8 @@ install: all
clean:
rm -rf build *.exe *.dll openresty-*
--- err
Can't exec "sw_vers": No such file or directory at ./configure line 823.
Can't exec "sw_vers": No such file or directory at ./configure line 829.
Use of uninitialized value $v in scalar chomp at ./configure line 830.

@ -1,13 +1,13 @@
#!/bin/bash
PCRE=pcre-8.43
PCRE=pcre-8.44
ZLIB=zlib-1.2.11
OPENSSL=openssl-1.1.0k
OPENSSL=openssl-1.1.1d
JOBS=12
# wget https://www.openssl.org/source/openssl-1.1.0k.tar.gz
# wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
# wget http://zlib.net/zlib-1.2.11.tar.gz
# wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
# wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz
rm -rf objs || exit 1
mkdir -p objs/lib || exit 1

17
util/configure vendored

@ -775,6 +775,12 @@ int main(void) {
}
}
if ($platform eq 'macosx') {
# to work around a bug in the Xcode toolchain in macOS 11.15:
# https://github.com/openresty/homebrew-brew/issues/10
$luajit_xcflags .= " -fno-stack-check";
}
if ($opts->{debug}) {
$luajit_xcflags .= " -DLUA_USE_APICHECK -DLUA_USE_ASSERT";
@ -819,13 +825,18 @@ int main(void) {
if ($platform eq 'macosx') {
my $v = $ENV{MACOSX_DEPLOYMENT_TARGET};
if (!defined $v || $v !~ /^\d+\.\d+$/) {
if (!defined($v) || $v !~ /^\d+\.\d+$/) {
$v = `sw_vers -productVersion`;
if (defined $v && $v =~ /^\s*(\d+\.\d+)/) {
$ENV{MACOSX_DEPLOYMENT_TARGET} = $1;
chomp $v;
if (defined($v) && $v =~ /^\s*(\d+\.\d+)/) {
$v = $1;
$ENV{MACOSX_DEPLOYMENT_TARGET} = $v;
#warn "MACOSX_DEPLOYMENT_TARGET = $1";
}
}
if ($v) {
$extra_opts .= " MACOSX_DEPLOYMENT_TARGET='$v'";
}
}
if (defined $cores) {

@ -1,7 +1,7 @@
#!/bin/bash
main_ver=1.17.8
minor_ver=1rc0
minor_ver=1rc1
version=$main_ver.$minor_ver
echo $version

Loading…
Cancel
Save