Skip to content

Instantly share code, notes, and snippets.

@yongboy
Last active January 20, 2021 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yongboy/369ec88a9d00a678a71d4c842e072c67 to your computer and use it in GitHub Desktop.
Save yongboy/369ec88a9d00a678a71d4c842e072c67 to your computer and use it in GitHub Desktop.
build gcc 4.8.2 AddressSanitizer (ASAN) with openresty + stream-lua-nginx-module for debug, the linux bash script
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++
yum install devtoolset-2-libasan-devel libssan
/opt/rh/devtoolset-2/root/usr/bin/gcc --version
cd openresty-1.11.2.5
export ASAN_OPTIONS=detect_leaks=0
./configure --with-cc="gcc -fsanitize=address" \
--with-cc-opt="-O1 -fno-omit-frame-pointer" \
--with-debug \
--prefix=/usr/local/openresty-asan \
--with-luajit-xcflags="-DLUAJIT_USE_VALGRIND" \
--with-no-pool-patch \
--with-stream \
--with-stream_ssl_module \
--add-module=/the_path/stream-lua-nginx-module \
-j9
gmake -j9
gmake install
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment