Repository: wezterm/wezterm (language: rust)

Issue:
openssl-devel-engine do not installed by ./get-deps on fedora 41
### What Operating System(s) are you seeing this problem on?

Linux Wayland

### Which Wayland compositor or X11 Window manager(s) are you using?

standard

### WezTerm version

20241205-083533-6f375e29

### Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

### Describe the bug

I followed building instruction on https://wezfurlong.org/wezterm/install/source.html#installing-from-source but it looks like ./get-deps forget to install openssl-devel-engine.

 error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "vendored/include" "-I" "/home/sanja/wezterm/target/release/build/libssh-rs-sys-b9a2ecbeeef843f2/out/include" "-I" "/usr/include" "-I" "/usr/include" "-Wno-deprecated-declarations" "-DLIBSSH_STATIC" "-DGLOBAL_CLIENT_CONFIG=\"/etc/ssh/ssh_config\"" "-DGLOBAL_BIND_CONFIG=\"/etc/ssh/libssh_server_config\"" "-DHAVE_GETADDRINFO=1" "-DHAVE_LIBCRYPTO=1" "-DHAVE_OPENSSL_AES_H=1" "-DHAVE_OPENSSL_BLOWFISH_H=1" "-DHAVE_OPENSSL_DES_H=1" "-DHAVE_OPENSSL_ECC=1" "-DHAVE_OPENSSL_ECDH_H=1" "-DHAVE_OPENSSL_ECDSA_H=1" "-DHAVE_ECC=1" "-DHAVE_DSA=1" "-DHAVE_OPENSSL_EC_H=1" "-DHAVE_OPENSSL_EVP_CHACHA20=1" "-DHAVE_STDINT_H=1" "-DWITH_ZLIB=1" "-DWITH_GEX=1" "-DWITH_SFTP=1" "-DWITH_SERVER=1" "-DHAVE_ARPA_INET_H=1" "-DHAVE_CLOCK_GETTIME=1" "-DHAVE_PTHREAD_H=1" "-DHAVE_PTHREAD=1" "-DHAVE_SELECT=1" "-DHAVE_SNPRINTF=1" "-DHAVE_STRTOULL=1" "-DHAVE_SYS_TIME_H=1" "-DHAVE_TERMIOS_H=1" "-DHAVE_UNISTD_H=1" "-DHAVE_VSNPRINTF=1" "-DHAVE_POLL=1" "-DHAVE_STRNDUP=1" "-D_GNU_SOURCE" "-DHAVE_COMPILER__FUNCTION__=1" "-DHAVE_COMPILER__FUNC__=1" "-DHAVE_GCC_THREAD_LOCAL_STORAGE=1" "-o" "/home/sanja/wezterm/target/release/build/libssh-rs-sys-b9a2ecbeeef843f2/out/1fa44eb5313ef680-pki_crypto.o" "-c" "vendored/src/pki_crypto.c" with args cc did not execute successfully (status code exit status: 1).


After installing the package it buids with no problems

### To Reproduce

get fedora-workstation and build following the instruction on https://wezfurlong.org/wezterm/install/source.html#installing-from-source

### Configuration

it is problem of build scripts

### Expected Behavior

_No response_

### Logs

 error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "vendored/include" "-I" "/home/sanja/wezterm/target/release/build/libssh-rs-sys-b9a2ecbeeef843f2/out/include" "-I" "/usr/include" "-I" "/usr/include" "-Wno-deprecated-declarations" "-DLIBSSH_STATIC" "-DGLOBAL_CLIENT_CONFIG=\"/etc/ssh/ssh_config\"" "-DGLOBAL_BIND_CONFIG=\"/etc/ssh/libssh_server_config\"" "-DHAVE_GETADDRINFO=1" "-DHAVE_LIBCRYPTO=1" "-DHAVE_OPENSSL_AES_H=1" "-DHAVE_OPENSSL_BLOWFISH_H=1" "-DHAVE_OPENSSL_DES_H=1" "-DHAVE_OPENSSL_ECC=1" "-DHAVE_OPENSSL_ECDH_H=1" "-DHAVE_OPENSSL_ECDSA_H=1" "-DHAVE_ECC=1" "-DHAVE_DSA=1" "-DHAVE_OPENSSL_EC_H=1" "-DHAVE_OPENSSL_EVP_CHACHA20=1" "-DHAVE_STDINT_H=1" "-DWITH_ZLIB=1" "-DWITH_GEX=1" "-DWITH_SFTP=1" "-DWITH_SERVER=1" "-DHAVE_ARPA_INET_H=1" "-DHAVE_CLOCK_GETTIME=1" "-DHAVE_PTHREAD_H=1" "-DHAVE_PTHREAD=1" "-DHAVE_SELECT=1" "-DHAVE_SNPRINTF=1" "-DHAVE_STRTOULL=1" "-DHAVE_SYS_TIME_H=1" "-DHAVE_TERMIOS_H=1" "-DHAVE_UNISTD_H=1" "-DHAVE_VSNPRINTF=1" "-DHAVE_POLL=1" "-DHAVE_STRNDUP=1" "-D_GNU_SOURCE" "-DHAVE_COMPILER__FUNCTION__=1" "-DHAVE_COMPILER__FUNC__=1" "-DHAVE_GCC_THREAD_LOCAL_STORAGE=1" "-o" "/home/sanja/wezterm/target/release/build/libssh-rs-sys-b9a2ecbeeef843f2/out/1fa44eb5313ef680-pki_crypto.o" "-c" "vendored/src/pki_crypto.c" with args cc did not execute successfully (status code exit status: 1).


### Anything else?

_No response_


Discussion / hints:
Thank you! Just had the same experience on Fedora 41 and this helped me through the compilation.
Looks like a problem that only occurs on Fedora 41 (and above?) according to [this stack overflow answer](https://stackoverflow.com/questions/46008624/how-to-fix-fatal-error-openssl-opensslv-h-no-such-file-or-directory-in-redhat). 
Would one of you like to submit a PR got get-deps to teach it to install this dep when appropriate?

Fix patch:
diff --git a/get-deps b/get-deps
index 7d6a00b02ac..743f756e915 100755
--- a/get-deps
+++ b/get-deps
@@ -107,6 +107,13 @@ fedora_deps() {
   if test_flag; then
     $YUM install -y 'openssh-server'
   fi
+
+  # Fedora 41 and above split a part of openssl-devel into openssl-devel-engine.
+  # CentOS/RHEL 10 are doing the same thing.
+  if { [ "$VERSION_ID" -ge "41" ] && [ "$ID" == "fedora" ]; } \
+     || { [ "$VERSION_ID" -ge "10" ] && [ "$ID" != "fedora" ]; }; then
+    $YUM install -y 'openssl-devel-engine'
+  fi
 }
 
 suse_deps() {


Test patch: