I’m trying to build Python 3.10.7 sources with Openssl 3.0.5 external binaries on windows with the help of Visual studio 2017. But, I’m getting the below error.
openssl\macros.h(139): fatal error C1189: #error: “The requested API level higher than the configured API compatibility level” [D:\Python-3.10.7\PCbuild_ssl.vcxproj]
Can you please help with this build issue?
I would suggest that you read the openssl\macros.h header file at line 139 to find out what it is checking for.
Note: 3.10.8 was just released with more bug fixes. Upgrade if you can.
If you build with \PCbuild\build.bat, it will fetch into \externals the openssl-bin-1.1.1q files that Windows python is currently configured to work with. (Perhaps you know this already.) The error message suggests that you need to patch at least PCBuild_ssl.vcxproj. But I would not be surprised if you have to also patch some of the Modules_ssl files. I do see _ssl_data_300.h but I don’t know if it is tested and ready to use.
Sticking with the default 1.1.1 would be easier.