compile ngx_resty to statically link some libs?

dannynoonan nginx-forum at nginx.us
Fri Dec 2 01:45:10 UTC 2011


To close out the thread, here's some shell snippets that produce an
nginx binary with libdrizzle statically liniked in:

<snip>
curl http://agentzh.org/misc/nginx/ngx_openresty-1.0.9.10.tar.gz | tar
-zxvf - 
cd ngx_openresty-1.0.9.10
curl http://agentzh.org/misc/nginx/drizzle7-2011.07.21.tar.gz | tar
-zxvf - 

# build librizzle statically
(cd drizzle7-2011.07.21 && ./configure  --without-server 
--enable-static && make libdrizzle-1.0) 
find . -name libdrizzle.a  -exec cp {} . \;
export LIBDRIZZLE_INC=`pwd`/drizzle7-2011.07.21/libdrizzle-1.0/
export LIBDRIZZLE_LIB=`pwd`
./configure  --prefix=/data/local/nginx-resty-1.0.9.10 
--with-http_drizzle_module 
--add-module=$HOME/src/third-party/nginx-gridfs
--add-module=$HOME/src/third-party/nginx_upload_module-2.2.0
--with-ld-opt="-Bstatic"
gmake

[david at dev-3 ngx_openresty-1.0.9.10]$ ldd build/nginx-1.0.9/objs/nginx |
grep drizzle
[david at dev-3 ngx_openresty-1.0.9.10]$ 
</snip>

Huzzah!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,218343,219452#msg-219452



More information about the nginx mailing list