Faced this error compiling php7.4 with openssl 3.0.15. As a workaround just commented out line with usage of this constant from sources, did not get any further issues for now, it seems nobody use it.
Likely in your case it is ossl_pkey_rsa.c:942