Cannot build cryptsetup-2.0.3 against libressl-2.7.3
When I try this, I see the errors:
CC lib/crypto_backend/libcrypto_backend_la-crc32.lo
CC lib/crypto_backend/libcrypto_backend_la-argon2_generic.lo
CC lib/crypto_backend/libcrypto_backend_la-cipher_generic.lo
CC lib/crypto_backend/libcrypto_backend_la-crypto_openssl.lo
lib/crypto_backend/crypto_openssl.c:66:20: error: static declaration of 'EVP_MD_CTX_new' follows non-static declaration
static EVP_MD_CTX *EVP_MD_CTX_new(void)
^~~~~~~~~~~~~~
In file included from lib/crypto_backend/crypto_openssl.c:33:0:
/nix/store/l084jjmbkx41c01ls5vivcyxgzkhg7af-libressl-2.7.3-dev/include/openssl/evp.h:538:13: note: previous declaration of 'EVP_MD_CTX_new' was here
EVP_MD_CTX *EVP_MD_CTX_new(void);
^~~~~~~~~~~~~~
lib/crypto_backend/crypto_openssl.c:76:13: error: static declaration of 'EVP_MD_CTX_free' follows non-static declaration
static void EVP_MD_CTX_free(EVP_MD_CTX *md)
^~~~~~~~~~~~~~~
In file included from lib/crypto_backend/crypto_openssl.c:33:0:
/nix/store/l084jjmbkx41c01ls5vivcyxgzkhg7af-libressl-2.7.3-dev/include/openssl/evp.h:539:6: note: previous declaration of 'EVP_MD_CTX_free' was here
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
^~~~~~~~~~~~~~~
lib/crypto_backend/crypto_openssl.c:82:18: error: static declaration of 'HMAC_CTX_new' follows non-static declaration
static HMAC_CTX *HMAC_CTX_new(void)
^~~~~~~~~~~~
In file included from lib/crypto_backend/crypto_openssl.c:34:0:
/nix/store/l084jjmbkx41c01ls5vivcyxgzkhg7af-libressl-2.7.3-dev/include/openssl/hmac.h:86:11: note: previous declaration of 'HMAC_CTX_new' was here
HMAC_CTX *HMAC_CTX_new(void);
^~~~~~~~~~~~
lib/crypto_backend/crypto_openssl.c:92:13: error: static declaration of 'HMAC_CTX_free' follows non-static declaration
static void HMAC_CTX_free(HMAC_CTX *md)
^~~~~~~~~~~~~
In file included from lib/crypto_backend/crypto_openssl.c:34:0:
/nix/store/l084jjmbkx41c01ls5vivcyxgzkhg7af-libressl-2.7.3-dev/include/openssl/hmac.h:87:6: note: previous declaration of 'HMAC_CTX_free' was here
void HMAC_CTX_free(HMAC_CTX *ctx);
^~~~~~~~~~~~~
make[2]: *** [Makefile:1691: lib/crypto_backend/libcrypto_backend_la-crypto_openssl.lo] Error 1
make[2]: Leaving directory '/build/cryptsetup-2.0.3'
make[1]: *** [Makefile:2132: all-recursive] Error 1
make[1]: Leaving directory '/build/cryptsetup-2.0.3'
make: *** [Makefile:1014: all] Error 2
I don't know exactly how to fix it, but I know these problems are very common for users of libressl!
Edited by qoli