bugreport: --with-ld-opt broken in some cases

Igor Sysoev is at rambler-co.ru
Tue Jul 25 16:19:19 MSD 2006


On Tue, 25 Jul 2006, Konstantin Sorokin wrote:

> Igor Sysoev wrote:
>> On Wed, 19 Jul 2006, Konstantin Sorokin wrote:
>>
>>> Если собирать nginx 0.3.54 с такими опциями ./configure:
>>>
>>> ./configure \
>>> --without-http_charset_module \
>>> --without-http_ssi_module \
>>> --without-http_access_module \
>>> --without-http_geo_module \
>>> --without-http_auth_basic_module \
>>> --without-http_rewrite_module \
>>> --without-http_gzip_module \
>>> --without-http_proxy_module \
>>> --without-http_fastcgi_module \
>>> --without-http_memcached_module \
>>> --without-http_userid_module \
>>> --with-cc-opt="-I/usr/local/include/db43" \
>>> --with-ld-opt="-L/usr/local/lib/db43 -ldb"
>>>
>>> то не происходит линковка внешней либы (BDB в данном случае). А если
>>> убрать
>>> из опций ./configure --without-http_gzip_module, то внешняя либа
>>> линкуется
>>> нормально.
>>
>> А что пишет ? У меня не воспроизводится.
>
> Ничего не пишет, просто не линкует либу (bdb в данном случае):
>
> ./configure --without-http_charset_module --without-http_ssi_module
> --without-http_access_module --without-http_geo_module
> --without-http_auth_basic_module --without-http_rewrite_module
> --without-http_gzip_module --without-http_proxy_module
> --without-http_fastcgi_module --without-http_memcached_module
> --without-http_userid_module --with-cc-opt="-I/usr/local/include/db43"
> --with-ld-opt="-L/usr/local/lib/db43 -ldb" --prefix=/tmp/ttt && make &&
> make install && ldd /tmp/ttt/sbin/nginx
>
> <skipped>
>
> /tmp/ttt/sbin/nginx:
>        libc.so.6 => /lib/libc.so.6 (0x280a2000)
>
> Убираем --without-http_gzip_module из параметров ./configure:
>
> /tmp/ttt/sbin/nginx:
>        libdb-4.3.so.0 => /usr/local/lib/libdb-4.3.so.0 (0x280a3000)
>        libz.so.3 => /lib/libz.so.3 (0x2816e000)
>        libc.so.6 => /lib/libc.so.6 (0x2817e000)

Патч.


Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
--- auto/make	Mon Jul 10 14:08:52 2006
+++ auto/make	Tue Jul 25 16:09:26 2006
@@ -175,8 +175,10 @@
     | sed -e "s/  *\([^ ][^ ]*\)/$ngx_long_regex_cont\1/g" \
           -e "s/\//$ngx_regex_dirsep/g"`
 
-ngx_libs=${CORE_LIBS:+`echo $NGX_LD_OPT $CORE_LIBS \
-    | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`}
+if test -n "$NGX_LD_OPT$CORE_LIBS"; then
+    ngx_libs=`echo $NGX_LD_OPT $CORE_LIBS \
+        | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`
+fi
 
 ngx_link=${CORE_LINK:+`echo $CORE_LINK \
     | sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`}


More information about the nginx-ru mailing list