I hope it is ok if I add another compiler problem. This time, it is MSYS2/Rtools (gcc 8.3), cmake was cmake -DSWIPL_PACKAGES_X=OFF -DINSTALL_DOCUMENTATION=OFF -DMINGW_ROOT=/mingw64 -G “MSYS Makefiles” …
I get two problems:
-
C:/…/swipl-devel/packages/ssl/cryptolib.c:53:1: error: static declaration of ‘EVP_MD_CTX_free’ follows non-static declaration
EVP_MD_CTX_free(EVP_MD_CTX *ctx)
^~~~~~~~~~~~~~~
In file included from C:/rtools40/mingw64/include/openssl/hmac.h:15,
from C:/Users/matth/Seafile/2021-SS-QHelp/rolog/src/swipl-devel/packages/ssl/crypto4pl.c:40:
C:/rtools40/mingw64/include/openssl/evp.h:540:6: note: previous declaration of ‘EVP_MD_CTX_free’ was here
void EVP_MD_CTX_free(EVP_MD_CTX *ctx); -
C:/…/swipl-devel/packages/ssl/ssl4pl.c:718:73: error: dereferencing pointer to incomplete type ‘X509_CRL’ {aka ‘struct X509_crl_st’}
unify_hash(hash, palg->algorithm, i2d_X509_CRL_INFO_wrapper, crl->crl) &&
I can solve the problem by adding
#define HAVE_EVP_MD_CTX_FREE 1 // added by MG
#define HAVE_X509_DIGEST 1
#define HAVE_X509_CRL_DIGEST 1
to the config.h that was generated by cmake, the one in (builddir)/packages/ssl.