Собирают статический бинарник nginx:
./configure --prefix=nginx-static --with-cc-opt="-static -static-libgcc" \
--with-ld-opt="-static" --with-cpu-opt=generic \
--with-mail --with-ipv6 --with-poll_module --with-select_module \
--with-select_module --with-poll_module \
--with-http_ssl_module --with-http_realip_module \
--with-http_addition_module --with-http_sub_module --with-http_dav_module \
--with-http_flv_module --with-http_mp4_module --with-http_gunzip_module \
--with-http_gzip_static_module --with-http_auth_request_module \
--with-http_random_index_module --with-http_secure_link_module \
--with-http_degradation_module --with-http_stub_status_module \
--with-mail --with-mail_ssl_module --with-openssl=./openssl-${OPENSSL_VERSION} \
--with-pcre=./pcre-${PCRE_VERSION}
и при сборке на Centos 6.10 получаю ошибку:
checking for OS
+ Linux 2.6.32-754.30.2.el6.x86_64 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
checking for gcc -pipe switch ... found
checking for --with-ld-opt="-static" ... not found
./configure: error: the invalid value in --with-ld-opt="-static"
Ошибка:
cat autoconf.err
----------------------------------------
checking for C compiler
----------------------------------------
checking for gcc -pipe switch
----------------------------------------
checking for --with-ld-opt="-static"
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
----------
#include <sys/types.h>
int main(void) {
;
return 0;
}
----------
cc -static -static-libgcc -o objs/autotest objs/autotest.c -static
----------
Проблема в сборке только в Centos 6, к примеру, в Archlinux все собралось без проблем.
Я наверное туплю, но что тут не так?