make -Werror-deprecated-declarations

deon <[email protected]>
Newsgroups gmane.comp.gnu.make.general
Message-ID <[email protected]>
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);
       |         ^~~~~~~~~~~
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.