MAC OS X Lion + Xcode + nginx-1.0.5 make error

qinjianmatoMac:nginx-1.0.5 qinjian$ make
make -f objs/Makefile
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/nginx.o
src/core/nginx.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_log.o
src/core/ngx_log.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_palloc.o
src/core/ngx_palloc.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_array.o
src/core/ngx_array.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_list.o
src/core/ngx_list.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_hash.o
src/core/ngx_hash.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_buf.o
src/core/ngx_buf.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_queue.o
src/core/ngx_queue.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_output_chain.o
src/core/ngx_output_chain.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_string.o
src/core/ngx_string.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_parse.o
src/core/ngx_parse.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_inet.o
src/core/ngx_inet.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_file.o
src/core/ngx_file.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_crc32.o
src/core/ngx_crc32.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_murmurhash.o
src/core/ngx_murmurhash.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_md5.o
src/core/ngx_md5.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_rbtree.o
src/core/ngx_rbtree.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_radix_tree.o
src/core/ngx_radix_tree.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_slab.o
src/core/ngx_slab.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_times.o
src/core/ngx_times.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_shmtx.o
src/core/ngx_shmtx.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_connection.o
src/core/ngx_connection.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_cycle.o
src/core/ngx_cycle.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_spinlock.o
src/core/ngx_spinlock.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_cpuinfo.o
src/core/ngx_cpuinfo.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_conf_file.o
src/core/ngx_conf_file.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_resolver.o
src/core/ngx_resolver.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_open_file_cache.o
src/core/ngx_open_file_cache.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/src/core/ngx_crypt.o
src/core/ngx_crypt.c
cc1: warnings being treated as errors
src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’:
src/core/ngx_crypt.c:76: warning: ‘MD5_Init’ is deprecated (declared
at /usr/include/openssl/md5.h:113)
src/core/ngx_crypt.c:77: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:78: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:79: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:81: warning: ‘MD5_Init’ is deprecated (declared
at /usr/include/openssl/md5.h:113)
src/core/ngx_crypt.c:82: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:83: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:84: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:85: warning: ‘MD5_Final’ is deprecated
(declared at /usr/include/openssl/md5.h:115)
src/core/ngx_crypt.c:88: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:95: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:98: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:102: warning: ‘MD5_Final’ is deprecated
(declared at /usr/include/openssl/md5.h:115)
src/core/ngx_crypt.c:105: warning: ‘MD5_Init’ is deprecated
(declared at /usr/include/openssl/md5.h:113)
src/core/ngx_crypt.c:108: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:111: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:115: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:119: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:123: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:126: warning: ‘MD5_Update’ is deprecated
(declared at /usr/include/openssl/md5.h:114)
src/core/ngx_crypt.c:129: warning: ‘MD5_Final’ is deprecated
(declared at /usr/include/openssl/md5.h:115)
src/core/ngx_crypt.c: In function ‘ngx_crypt_ssha’:
src/core/ngx_crypt.c:215: warning: ‘SHA1_Init’ is deprecated
(declared at /usr/include/openssl/sha.h:121)
src/core/ngx_crypt.c:216: warning: ‘SHA1_Update’ is deprecated
(declared at /usr/include/openssl/sha.h:122)
src/core/ngx_crypt.c:217: warning: ‘SHA1_Update’ is deprecated
(declared at /usr/include/openssl/sha.h:122)
src/core/ngx_crypt.c:218: warning: ‘SHA1_Final’ is deprecated
(declared at /usr/include/openssl/sha.h:123)
make[1]: *** [objs/src/core/ngx_crypt.o] Error 1
make: *** [build] Error 2
qinjianmatoMac:nginx-1.0.5 qinjian$ pwd
/Users/qinjian/Downloads/nginx-1.0.5

Posted at Nginx Forum:

On Fri, Jul 22, 2011 at 05:51:17AM -0400, qinjian wrote:

cc1: warnings being treated as errors
src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’:
src/core/ngx_crypt.c:76: warning: ‘MD5_Init’ is deprecated (declared
at /usr/include/openssl/md5.h:113)

make[1]: *** [objs/src/core/ngx_crypt.o] Error 1
make: *** [build] Error 2
qinjianmatoMac:nginx-1.0.5 qinjian$ pwd
/Users/qinjian/Downloads/nginx-1.0.5

Could you please send me privatly /usr/include/openssl/md5.h file ?


Igor S.

In Lion+Xcode 4.1, almost all openssl functions are “deprecated” by
a DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER macro:

110 #ifdef OPENSSL_FIPS
111 int private_MD5_Init(MD5_CTX *c)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
112 #endif
113 int MD5_Init(MD5_CTX *c)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
114 int MD5_Update(MD5_CTX *c, const void *data, size_t len)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
115 int MD5_Final(unsigned char *md, MD5_CTX *c)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
116 unsigned char *MD5(const unsigned char *d, size_t n, unsigned char
*md)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
117 void MD5_Transform(MD5_CTX *c, const unsigned char *b)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
118 #ifdef __cplusplus
119 }
120 #endif

2011/7/22 Igor S. [email protected]

Thank you. Are any pointers what they suggest to use instead ?

On Fri, Jul 22, 2011 at 06:14:37PM +0800, 191919 wrote:

115 int MD5_Final(unsigned char *md, MD5_CTX *c)

/Users/qinjian/Downloads/nginx-1.0.5

Could you please send me privatly /usr/include/openssl/md5.h file ?


Igor S.

Hello!

On Fri, Jul 22, 2011 at 05:51:17AM -0400, qinjian wrote:

[…]

cc1: warnings being treated as errors
src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’:
src/core/ngx_crypt.c:76: warning: ‘MD5_Init’ is deprecated (declared
at /usr/include/openssl/md5.h:113)

For now, you may use

./configure --with-cc-opt="-Wno-deprecated-declarations"

as a workaround.

Maxim D.

Not even a clue why they did this.

Regards,
191919

Le Friday, July 22, 2011 à 6:25 PM, Igor S. a écrit :

On Friday 22 Jul 2011 11:25:40 Igor S. wrote:

Thank you. Are any pointers what they suggest to use instead ?

http://www.openssl.org/docs/crypto/EVP_DigestInit.html

“The EVP interface to message digests should almost always be used in
preference to the low level interfaces”.

Are these functions available on Lion?

MD5_Update(MD5_CTX *c, const void *data, size_t len)

qinjianmatoMac:nginx-1.0.5 qinjian$ pwd
/Users/qinjian/Downloads/nginx-1.0.5

Could you please send me privatly /usr/include/openssl/md5.h file ?

Rob Stradling
Senior Research & Development Scientist
COMODO - Creating Trust Online
Office Tel: +44.(0)1274.730505
Office Fax: +44.(0)1274.730909

COMODO CA Limited, Registered in England No. 04058690
Registered Office:
3rd Floor, 26 Office Village, Exchange Quay,
Trafford Road, Salford, Manchester M5 3EQ

This e-mail and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
If you have received this email in error please notify the sender by
replying
to the e-mail containing this attachment. Replies to this email may be
monitored by Comodo for operational or business reasons. Whilst every
endeavour is taken to ensure that e-mails are free from viruses, no
liability
can be accepted and the recipient is requested to use their own virus
checking
software.

openssl api is deprecated in Mac OS 10.7

Instead it is advised to use CommonCrypto/CommonDigest.h which has an
api compatible with openssl:

#if defined(APPLE)

define COMMON_DIGEST_FOR_OPENSSL

include <CommonCrypto/CommonDigest.h>

define SHA1 CC_SHA1

#else

include <openssl/sha.h>

#endif