help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make -Werror-deprecated-declarations


From: deon
Subject: make -Werror-deprecated-declarations
Date: Thu, 20 Jul 2023 15:04:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Hi

Whilst compiling Nginx I got this error with relation to the new ssl-lib.. It seems some of the functions in the older version of the SSL lib has been deprecated. The compiler show this as warnings but treat it as failures and will not continue the compilation.

Now the question:

How do flag the compiler not to treat this as fatal?

Where do is specify the -Wno-deprecated flag? Anyone that can provide me with a quick solution.

It has been a few year that I had to delve into the make internals!

Regards

Deon.

Sample output  below:

make -f objs/Makefile
make[1]: Entering directory '/root/nginx-1.18.0'
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I../nginx-rtmp-module-dev -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
    -o objs/src/event/ngx_event_openssl.o \
    src/event/ngx_event_openssl.c
src/event/ngx_event_openssl.c: In function ‘ngx_ssl_load_certificate_key’:
src/event/ngx_event_openssl.c:721:9: error: ‘ENGINE_by_id’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  721 |         engine = ENGINE_by_id((char *) p);
      |         ^~~~~~
In file included from src/event/ngx_event_openssl.h:22,
                 from src/core/ngx_core.h:84,
                 from src/event/ngx_event_openssl.c:9:
/usr/include/openssl/engine.h:336:31: note: declared here
  336 | OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
      |                               ^~~~~~~~~~~~
src/event/ngx_event_openssl.c:730:9: error: ‘ENGINE_load_private_key’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]   730 |         pkey = ENGINE_load_private_key(engine, (char *) last, 0, 0);
      |         ^~~~
In file included from src/event/ngx_event_openssl.h:22,
                 from src/core/ngx_core.h:84,
                 from src/event/ngx_event_openssl.c:9:
/usr/include/openssl/engine.h:638:11: note: declared here
  638 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
      |           ^~~~~~~~~~~~~~~~~~~~~~~
src/event/ngx_event_openssl.c:734:13: error: ‘ENGINE_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  734 |             ENGINE_free(engine);
      |             ^~~~~~~~~~~
In file included from src/event/ngx_event_openssl.h:22,
                 from src/core/ngx_core.h:84,
                 from src/event/ngx_event_openssl.c:9:
/usr/include/openssl/engine.h:493:27: note: declared here
  493 | OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
      |                           ^~~~~~~~~~~
src/event/ngx_event_openssl.c:738:9: error: ‘ENGINE_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  738 |         ENGINE_free(engine);
      |         ^~~~~~~~~~~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]