[PATCH] Configure: fix build from sources for OpenSSL on OS X

Maxim Dounin mdounin at mdounin.ru
Tue Jun 17 10:35:58 UTC 2014


Hello!

On Tue, Jun 17, 2014 at 02:56:38AM -0700, Piotr Sikora wrote:

> # HG changeset patch
> # User Piotr Sikora <piotr at cloudflare.com>
> # Date 1402998740 25200
> #      Tue Jun 17 02:52:20 2014 -0700
> # Node ID d325d3f2df583988567a979bc8736dbf08291f84
> # Parent  baf2816d556d26b79ecc745140b408d59908a182
> Configure: fix build from sources for OpenSSL on OS X.
> 
> Signed-off-by: Piotr Sikora <piotr at cloudflare.com>
> 
> diff -r baf2816d556d -r d325d3f2df58 auto/lib/openssl/make
> --- a/auto/lib/openssl/make	Tue Jun 17 12:07:06 2014 +0400
> +++ b/auto/lib/openssl/make	Tue Jun 17 02:52:20 2014 -0700
> @@ -51,12 +51,17 @@ END
>              *)  ngx_prefix="$PWD/$OPENSSL/.openssl" ;;
>          esac
>  
> +        case $NGX_PLATFORM in
> +            Darwin:*:x86_64) OPENSSL_CONFIG="./Configure darwin64-x86_64-cc" ;;
> +            *)               OPENSSL_CONFIG="./config" ;;
> +        esac
> +
>          cat << END                                            >> $NGX_MAKEFILE
>  
>  $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 \\
> +	&& $OPENSSL_CONFIG --prefix=$ngx_prefix no-shared $OPENSSL_OPT \\
>  	&& \$(MAKE) \\
>  	&& \$(MAKE) install LIBDIR=lib

This looks utterly wrong to me.

The problem seems to be in OpenSSL as it fails to detect default 
arch to build for, and looking into config script suggests a quick 
fix is to set KERNEL_BITS=64 in the environment.

I don't think nginx should try to do anything with this.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list