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

feat: support apisix-runtime debug #346

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build-apisix-runtime-debug-centos7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ set -x

yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo
yum -y install gcc gcc-c++ patch wget git make sudo
yum -y install openresty-openssl111-debug-devel openresty-pcre-devel openresty-zlib-devel
yum -y install openresty-openssl111-devel openresty-pcre-devel openresty-zlib-devel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not need it anymore.
not need this path /usr/local/openresty-debug/openssl


export openssl_prefix=/usr/local/openresty-debug/openssl111
export openssl_prefix=/usr/local/openresty/openssl111
export zlib_prefix=/usr/local/openresty/zlib
export pcre_prefix=/usr/local/openresty/pcre

export cc_opt="-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC -I${zlib_prefix}/include -I${pcre_prefix}/include -I${openssl_prefix}/include -O0"
export ld_opt="-L${zlib_prefix}/lib -L${pcre_prefix}/lib -L${openssl_prefix}/lib -Wl,-rpath,${zlib_prefix}/lib:${pcre_prefix}/lib:${openssl_prefix}/lib"
export luajit_xcflags="-DLUAJIT_ASSERT -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -O0"
export OR_PREFIX=/usr/local/openresty-debug
export OR_PREFIX=/usr/local/openresty
export debug_args=--with-debug

./build-apisix-runtime.sh
./build-apisix-runtime.sh latest
29 changes: 9 additions & 20 deletions build-apisix-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,18 @@ set -x

version=${version:-0.0.0}

OPENRESTY_VERSION=${OPENRESTY_VERSION:-1.21.4.2}
if [ "$OPENRESTY_VERSION" == "source" ] || [ "$OPENRESTY_VERSION" == "default" ]; then
OPENRESTY_VERSION="1.21.4.2"
fi
OPENRESTY_VERSION="1.21.4.2"
ngx_multi_upstream_module_ver="1.1.1"
mod_dubbo_ver="1.0.2"
apisix_nginx_module_ver="1.15.0"
wasm_nginx_module_ver="0.6.5"
lua_var_nginx_module_ver="v0.5.3"
grpc_client_nginx_module_ver="v0.4.4"
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"}
debug_args=${debug_args:-}

if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then
ngx_multi_upstream_module_ver="master"
mod_dubbo_ver="master"
apisix_nginx_module_ver="main"
wasm_nginx_module_ver="main"
lua_var_nginx_module_ver="master"
grpc_client_nginx_module_ver="main"
debug_args="--with-debug"
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty-debug"}
else
ngx_multi_upstream_module_ver="1.1.1"
mod_dubbo_ver="1.0.2"
apisix_nginx_module_ver="1.15.0"
wasm_nginx_module_ver="0.6.5"
lua_var_nginx_module_ver="v0.5.3"
grpc_client_nginx_module_ver="v0.4.4"
debug_args=${debug_args:-}
OR_PREFIX=${OR_PREFIX:="/usr/local/openresty"}
fi

prev_workdir="$PWD"
Expand Down