Forum: NGINX Deprecated warnings in 1.5.8 are now errors in 1.5.12

827d1f54ddb67b01ceae7192c367978d?d=identicon&s=25 Thijs Koerselman (Guest)
on 2014-04-08 11:44
(Received via mailing list)
Hi,

I'm trying to compile 1.5.12 on OSX. For some reason 1.5.12 generates
errors in make where in 1.5.8 these same messages appeared as warnings
and
were ignored.

I'm trying to build the nginx core without extra modules. Below is my
configure output and the first errors that appear. Any idea how I can
get
around this?

Thijs

checking for OS

 + Darwin 13.1.0 x86_64

checking for C compiler ... found

 + using Clang C compiler

 + clang version: 5.1 (clang-503.0.38) (based on LLVM 3.4svn)

checking for gcc builtin atomic operations ... found

checking for C99 variadic macros ... found

checking for gcc variadic macros ... found

checking for unistd.h ... found

checking for inttypes.h ... found

checking for limits.h ... found

checking for sys/filio.h ... found

checking for sys/param.h ... found

checking for sys/mount.h ... found

checking for sys/statvfs.h ... found

checking for crypt.h ... not found

checking for Darwin specific features

 + kqueue found

checking for kqueue's EVFILT_TIMER ... found

checking for Darwin 64-bit kqueue millisecond timeout bug ... not found

checking for sendfile() ... found

checking for atomic(3) ... found

checking for nobody group ... found

checking for poll() ... found

checking for /dev/poll ... not found

checking for crypt() ... found

checking for F_READAHEAD ... not found

checking for posix_fadvise() ... not found

checking for O_DIRECT ... not found

checking for F_NOCACHE ... found

checking for directio() ... not found

checking for statfs() ... found

checking for statvfs() ... found

checking for dlopen() ... found

checking for sched_yield() ... found

checking for SO_SETFIB ... not found

checking for SO_ACCEPTFILTER ... not found

checking for TCP_DEFER_ACCEPT ... not found

checking for TCP_KEEPIDLE ... not found

checking for TCP_FASTOPEN ... not found

checking for TCP_INFO ... not found

checking for accept4() ... not found

checking for int size ... 4 bytes

checking for long size ... 8 bytes

checking for long long size ... 8 bytes

checking for void * size ... 8 bytes

checking for uint64_t ... found

checking for sig_atomic_t ... found

checking for sig_atomic_t size ... 4 bytes

checking for socklen_t ... found

checking for in_addr_t ... found

checking for in_port_t ... found

checking for rlim_t ... found

checking for uintptr_t ... uintptr_t found

checking for system byte ordering ... little endian

checking for size_t size ... 8 bytes

checking for off_t size ... 8 bytes

checking for time_t size ... 8 bytes

checking for setproctitle() ... not found

checking for pread() ... found

checking for pwrite() ... found

checking for sys_nerr ... found

checking for localtime_r() ... found

checking for posix_memalign() ... found

checking for memalign() ... not found

checking for mmap(MAP_ANON|MAP_SHARED) ... found

checking for mmap("/dev/zero", MAP_SHARED) ... found but is not working

checking for System V shared memory ... found

checking for POSIX semaphores ... found but is not working

checking for POSIX semaphores in libpthread ... found but is not working

checking for POSIX semaphores in librt ... not found

checking for struct msghdr.msg_control ... found

checking for ioctl(FIONBIO) ... found

checking for struct tm.tm_gmtoff ... found

checking for struct dirent.d_namlen ... found

checking for struct dirent.d_type ... found

checking for sysconf(_SC_NPROCESSORS_ONLN) ... found

checking for openat(), fstatat() ... not found

checking for getaddrinfo() ... found

checking for PCRE library ... found

checking for PCRE JIT support ... not found

checking for md5 in system md library ... not found

checking for md5 in system md5 library ... not found

checking for md5 in system OpenSSL crypto library ... found

checking for sha1 in system md library ... not found

checking for sha1 in system OpenSSL crypto library ... found

checking for zlib library ... found

creating objs/Makefile


Configuration summary

  + using system PCRE library

  + OpenSSL library is not used

  + md5: using system crypto library

  + sha1: using system crypto library

  + using system zlib library


*src/core/ngx_crypt.c:82:5: **error: **'MD5_Init' is deprecated: first
deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]*

    ngx_md5_init(&md5);

*    ^*

*src/core/ngx_md5.h:30:25: note: *expanded from macro 'ngx_md5_init'

#define ngx_md5_init    MD5_Init

*                        ^*

*/usr/include/openssl/md5.h:113:5: note: *'MD5_Init' declared here

int MD5_Init(MD5_CTX *c) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;

*    ^*

*src/core/ngx_crypt.c:83:5: **error: **'MD5_Update' is deprecated: first
deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]*

    ngx_md5_update(&md5, key, keylen);

*    ^*

*src/core/ngx_md5.h:31:25: note: *expanded from macro 'ngx_md5_update'

#define ngx_md5_update  MD5_Update

*                        ^*

*/usr/include/openssl/md5.h:114:5: note: *'MD5_Update' declared here

int MD5_Update(MD5_CTX *c, const void *data, size_t len)
DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER;
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-04-08 12:23
(Received via mailing list)
Hello!

On Tue, Apr 08, 2014 at 11:43:58AM +0200, Thijs Koerselman wrote:

> Thijs
>
> checking for OS
>
>  + Darwin 13.1.0 x86_64

[...]

>   + OpenSSL library is not used
>
>   + md5: using system crypto library

[...]

> *src/core/ngx_crypt.c:82:5: **error: **'MD5_Init' is deprecated: first
> deprecated in OS X 10.7 [-Werror,-Wdeprecated-declarations]*
>
>     ngx_md5_init(&md5);

Apple deprecated OpenSSL library they have in base system a while
ago (including MD5 interface), and in 10.9 they additionally
broke their own version handling framework we've used to silence
these deprecation warnings.

The warning should go away once you'll compile with non-system
OpenSSL.  Alternatively, trivial solution is to use:

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

Previously these warnings was ignored as -Werror wasn't enabled by
default with clang (http://hg.nginx.org/nginx/rev/c86dd32573c0).

--
Maxim Dounin
http://nginx.org/
827d1f54ddb67b01ceae7192c367978d?d=identicon&s=25 Thijs Koerselman (Guest)
on 2014-04-08 13:14
(Received via mailing list)
Thanks a lot Maxim, that explains everything. I used the flag and all
went
well.

Cheers,
Thijs
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.