Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation on Arch Linux fails with "openssl_hsm_pkey.c:193:5: error: ‘EVP_PKEY_get1_RSA’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]" #89

Open
schaiba opened this issue Jun 27, 2024 · 3 comments

Comments

@schaiba
Copy link

schaiba commented Jun 27, 2024

Hey,

Arch Linux up-to-date amd64, gcc version 14.1.1, and the complete error is this :

libtool: compile:  gcc -I. -I../../../src/libpki -I../.. -DENABLE_ECDSA=1 -D__LIB_BUILD__ -g -O2 -maccumulate-outgoing-args -Wno-deprecated -Wall -Wmissing-field-initializers -Wmissing-parameter-type -Wtype-limits -Wuninitialized -Wconversion -Wfatal-errors -Wunused-variable -Werror -Wno-switch -DENABLE_ECDSA=1 -DENABLE_COMPOSITE=1 -I/usr/include/libxml2 -I/usr/include/mysql -I/usr/include/mysql/mysql -I/usr/include -DLINUX -g -O2 -maccumulate-outgoing-args -Wno-deprecated -Wall -Wmissing-field-initializers -Wmissing-parameter-type -Wtype-limits -Wuninitialized -Wconversion -Wfatal-errors -Wunused-variable -Werror -MT libpki_token_openssl_la-openssl_hsm_pkey.lo -MD -MP -MF .deps/libpki_token_openssl_la-openssl_hsm_pkey.Tpo -c openssl_hsm_pkey.c  -fPIC -DPIC -o .libs/libpki_token_openssl_la-openssl_hsm_pkey.o
openssl_hsm_pkey.c: In function ‘_pki_rsakey_new’:
openssl_hsm_pkey.c:193:5: error: ‘EVP_PKEY_get1_RSA’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  193 |     rsa = EVP_PKEY_get1_RSA(pkey);
      |     ^~~
compilation terminated due to -Wfatal-errors.
cc1: all warnings being treated as errors
@ruomad
Copy link
Contributor

ruomad commented Jun 29, 2024

You must remove -Wfatal-errors, there are a lot of warnings of deprecated functions after openssl 3

@e64462
Copy link

e64462 commented Aug 17, 2024

I'm on Ubuntu 22.04. I was drawn here by a similar error, so I ran ./configure CFLAGS='-w' to suppress the warnings. The build process got further, before terminating with:

libtool: compile:  gcc -I. -I../../src/libpki -I.. -DENABLE_ECDSA=1 -D__LIB_BUILD__ -I/usr/include -w -maccumulate-outgoing-args -Werror -Wfatal-errors -Wunused-variable -Wno-switch -DENABLE_ECDSA=1 -I/usr/include/libxml2 -I/usr/include/mysql -DLINUX -w -maccumulate-outgoing-args -Werror -Wfatal-errors -Wunused-variable -MT libpki_openssl_la-pki_id.lo -MD -MP -MF .deps/libpki_openssl_la-pki_id.Tpo -c pki_id.c  -fPIC -DPIC -o .libs/libpki_openssl_la-pki_id.o
pki_id.c: In function ‘PKI_ID_is_composite’:
pki_id.c:86:25: error: ‘OPENCA_ALG_PKEY_EXP_COMP_NAME’ undeclared (first use in this function)
   86 |         if (OBJ_txt2nid(OPENCA_ALG_PKEY_EXP_COMP_NAME) == id) {
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.

If there was a bertter way to "remove -Wfatal-errors" I would be happy to try it. Please just provide those instructions

@e64462
Copy link

e64462 commented Aug 17, 2024

I'm on Ubuntu 22.04. I was drawn here by a similar error, so I ran ./configure CFLAGS='-w' to suppress the warnings. The build process got further, before terminating with:

libtool: compile:  gcc -I. -I../../src/libpki -I.. -DENABLE_ECDSA=1 -D__LIB_BUILD__ -I/usr/include -w -maccumulate-outgoing-args -Werror -Wfatal-errors -Wunused-variable -Wno-switch -DENABLE_ECDSA=1 -I/usr/include/libxml2 -I/usr/include/mysql -DLINUX -w -maccumulate-outgoing-args -Werror -Wfatal-errors -Wunused-variable -MT libpki_openssl_la-pki_id.lo -MD -MP -MF .deps/libpki_openssl_la-pki_id.Tpo -c pki_id.c  -fPIC -DPIC -o .libs/libpki_openssl_la-pki_id.o
pki_id.c: In function ‘PKI_ID_is_composite’:
pki_id.c:86:25: error: ‘OPENCA_ALG_PKEY_EXP_COMP_NAME’ undeclared (first use in this function)
   86 |         if (OBJ_txt2nid(OPENCA_ALG_PKEY_EXP_COMP_NAME) == id) {
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.

If there was a bertter way to "remove -Wfatal-errors" I would be happy to try it. Please just provide those instructions

resolved with

./configure CFLAGS='-w' --enable-extra-checks --enable-composite
make

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants