Hello.
A build of nginx with static-linked OpenSSL seems to fail on Mac.
$ uname -ar
Darwin host 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT
2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
$ cd nginx-1.7.9
$ ./configure
–with-http_ssl_module
–with-openssl=…/openssl-1.0.1k
$ make
.
.
.
Operating system: i686-apple-darwinDarwin Kernel Version 14.0.0: Fri Sep
19
00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64
WARNING! If you wish to build 64-bit library, then you have to
invoke ‘./Configure darwin64-x86_64-cc’ manually.
You have about 5 seconds to press Ctrl-C to abort.
.
.
.
(too many errors)
.
.
.
“_sk_value”, referenced from:
_ngx_ssl_session_cache in ngx_event_openssl.o
_ngx_ssl_check_host in ngx_event_openssl.o
_ngx_ssl_stapling in ngx_event_openssl_stapling.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[1]: *** [objs/nginx] Error 1
$
Though the rough patch below fixes failure, is there a better solution
expect dynamic-linking OpenSSL?
diff -r e9effef98874 auto/lib/openssl/make
— a/auto/lib/openssl/make Fri Dec 26 16:22:59 2014 +0300
+++ b/auto/lib/openssl/make Fri Jan 09 19:24:06 2015 +0900
@@ -56,7 +56,7 @@
$OPENSSL/.openssl/include/openssl/ssl.h: $NGX_MAKEFILE
cd $OPENSSL \
&& if [ -f Makefile ]; then $(MAKE) clean; fi \
- && ./config --prefix=$ngx_prefix no-shared
$OPENSSL_OPT \
+ && ./Configure darwin64-x86_64-cc
–prefix=$ngx_prefix no-shared $OPENSSL_OPT \
&& $(MAKE) \
&& $(MAKE) install LIBDIR=lib
Posted at Nginx Forum: