Building expects openssl/engine.h despite engine API being deprecated?
Fedora 41 fails to build libssh as openssl/engine.h is no longer included with the openssl-devel package. For the time being compatibility is offered via a separate openssl-devel-engine package.
Broader failures will occur once a future OpenSSL 4.0 release arrives. For context the engine API has been deprecated for a while AFAIK and will be dropped in the next major OpenSSL release.
Build error output
Most of that can be ignored, I just wanted to draw attention to the failure cause:
libssh2/src/openssl.h:83:10: fatal error: 'openssl/engine.h' file not found
So that line is upstream at: https://github.com/libssh2/libssh2/blob/libssh2-1.11.0/src/openssl.h#L84
I'm not sure if an issue needs to be raised there as they seem to have support for no engine, thus perhaps it's something required to be detected / handled here instead?
https://github.com/alexcrichton/ssh2-rs/issues/328