rust-lang / rust-lang/ssh2-rs

Building expects `openssl/engine.h` despite engine API being deprecated?

Open
#328 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
566
Forks
163
Avg merge
4h 51m
Merged PRs (30d)
2

Description

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
  cargo:warning=In file included from libssh2/src/agent.c:40:
  cargo:warning=In file included from libssh2/src/libssh2_priv.h:57:
  cargo:warning=In file included from /usr/include/stdio.h:28:
  cargo:warning=In file included from /usr/include/bits/libc-header-start.h:33:
  cargo:warning=/usr/include/features.h:503:9: warning: '__GLIBC_MINOR__' macro redefined [-Wmacro-redefined]
  cargo:warning=  503 | #define __GLIBC_MINOR__ 40
  cargo:warning=      |         ^
  cargo:warning=<command line>:1:9: note: previous definition is here
  cargo:warning=    1 | #define __GLIBC_MINOR__ 17
  cargo:warning=      |         ^
  cargo:warning=In file included from libssh2/src/bcrypt_pbkdf.c:21:
  cargo:warning=In file included from libssh2/src/libssh2_priv.h:57:
  cargo:warning=In file included from /usr/include/stdio.h:28:
  cargo:warning=In file included from /usr/include/bits/libc-header-start.h:33:
  cargo:warning=/usr/include/features.h:503:9: warning: '__GLIBC_MINOR__' macro redefined [-Wmacro-redefined]
  cargo:warning=  503 | #define __GLIBC_MINOR__ 40
  cargo:warning=      |         ^
  cargo:warning=<command line>:1:9: note: previous definition is here
  cargo:warning=    1 | #define __GLIBC_MINOR__ 17
  cargo:warning=      |         ^
  cargo:warning=In file included from libssh2/src/blowfish.c:49:
  cargo:warning=In file included from /usr/include/sys/types.h:25:
  cargo:warning=/usr/include/features.h:503:9: warning: '__GLIBC_MINOR__' macro redefined [-Wmacro-redefined]
  cargo:warning=  503 | #define __GLIBC_MINOR__ 40
  cargo:warning=      |         ^
  cargo:warning=<command line>:1:9: note: previous definition is here
  cargo:warning=    1 | #define __GLIBC_MINOR__ 17
  cargo:warning=      |         ^
  cargo:warning=In file included from libssh2/src/agent.c:40:
  cargo:warning=In file included from libssh2/src/libssh2_priv.h:141:
  cargo:warning=In file included from libssh2/src/crypto.h:42:
  cargo:warning=libssh2/src/openssl.h:83:10: fatal error: 'openssl/engine.h' file not found
  cargo:warning=   83 | #include <openssl/engine.h>
  cargo:warning=      |          ^~~~~~~~~~~~~~~~~~
  cargo:warning=1 warning and 1 error generated.
  exit status: 1

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with libssh2/src/openssl.h at line 83 and the libssh2 no-engine support commit linked in the issue. Reproduce the Fedora 41 build failure and determine how ssh2-rs should handle the missing engine header or upstream capability. Done means the project builds without requiring openssl/engine.h on affected systems.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, rust
Domain
build-system, cryptography, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.