On Mon, Sep 30, 2013 at 11:05:18AM +0300, Alex Domoradov wrote: > Просто при сборке надо явно указывать путь > > # ./configure --with-http_image_filter_module > --with-cc-opt=-I/opt/libgd-2.1.0/include > --with-ld-opt=-L/opt/libgd-2.1.0/lib/ > # make > > # ldd objs/nginx | grep libgd > libgd.so.3 => /opt/libgd-2.1.0/lib/libgd.so.3 (0x00007ff43af12000) > > 2 Developers > А почему nginx игнорирует CFLAGS/LDFLAGS? Т.е. если я делаю > > # export CFLAGS=-I/opt/libgd-2.1.0/include/ > # export LDFLAGS=-L/opt/libgd-2.1.0/lib/ > > а потом пробую собрать, то получаю ошибку > > # ./configure --with-http_image_filter_module > ... > checking for GD library ... not found > checking for GD library in /usr/local/ ... not found > checking for GD library in /usr/pkg/ ... not found > checking for GD library in /opt/local/ ... not found
Потому что configure nginx'а не поддерживает LDFLAGS. > 2013/9/30 Alex Domoradov <[email protected]>: > >> У вас заголовочные файлы стоят - libgd-dev? > > ТС из исходников ставил libgd. > > > > 2013/9/30 Aleksandr Sytar <[email protected]>: > >> > >> > >> > >> 29 сентября 2013 г., 12:08 пользователь MaxNikitin <[email protected]> > >> написал: > >> > >>> Здравствуйте. Скачал последнюю версию libgd (2.1.0), скомпилировал > >>> (настройки по умолчанию), запускаю ./configire > >>> --with-http_image_filter_module (версия исходников nginx - 1.5.5) - ошибок > >>> не выдает (checking for GD library ... found), однако, при запуске make > >>> вылезает ошибка: > >>> objs/ngx_modules.o \ > >>> -lpthread -lcrypt -lpcre -lssl -lcrypto -ldl -lz -lgd > >>> objs/src/http/modules/ngx_http_image_filter_module.o: In function > >>> `ngx_http_image_source': > >>> /root/nginx2/src/http/modules/ngx_http_image_filter_module.c:1030: > >>> undefined > >>> reference to `gdImageCreateFromJpegPtr' > >>> /root/nginx2/src/http/modules/ngx_http_image_filter_module.c:1040: > >>> undefined > >>> reference to `gdImageCreateFromPngPtr' > >>> objs/src/http/modules/ngx_http_image_filter_module.o: In function > >>> `ngx_http_image_out': > >>> /root/nginx2/src/http/modules/ngx_http_image_filter_module.c:1106: > >>> undefined > >>> reference to `gdImageJpegPtr' > >>> /root/nginx2/src/http/modules/ngx_http_image_filter_module.c:1116: > >>> undefined > >>> reference to `gdImagePngPtr' > >>> collect2: ld returned 1 exit status > >>> > >>> Что я не так делаю? > >> > >> > >> > >> У вас заголовочные файлы стоят - libgd-dev? > >> > >> _______________________________________________ > >> nginx-ru mailing list > >> [email protected] > >> http://mailman.nginx.org/mailman/listinfo/nginx-ru > > _______________________________________________ > nginx-ru mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx-ru > -- Ruslan Ermilov _______________________________________________ nginx-ru mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-ru
