Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBSD 7.4 with LibreSSL 3.8.2 doesn't compile #346

Open
McQueen2063 opened this issue Mar 18, 2024 · 1 comment
Open

OpenBSD 7.4 with LibreSSL 3.8.2 doesn't compile #346

McQueen2063 opened this issue Mar 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@McQueen2063
Copy link

Describe the bug

Checked out master and ran cargo build --release results in the following error:

  cargo:rustc-cfg=libressl370
  cargo:rustc-cfg=libressl381
  cargo:libressl_version_number=3080200f

  --- stderr
  thread 'main' panicked at '

  This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3), or LibreSSL 2.5
  through 3.8.1, but a different version of OpenSSL was found. The build is now aborting
  due to this version mismatch.

Indeed, OpenBSD is at LibreSSL 3.8.2:

openssl version
LibreSSL 3.8.2

To Reproduce
Steps to reproduce the behavior:

  1. Install OpenBSD 7.4
  2. pkg_add rust
  3. clone repository
  4. run cargo build --release

I tried applying https://github.com/rapiz1/rathole/pull/311/files and the build doesn't fail at the version check. So that's good.

But it fails later with:

   Compiling fdlimit v0.2.1
error[E0599]: no method named `with_interval` found for struct `TcpKeepalive` in the current scope
  --> src/helper.rs:27:10
   |
25 |       let keepalive = TcpKeepalive::new()
   |  _____________________-
26 | |         .with_time(keepalive_duration)
27 | |         .with_interval(keepalive_interval);
   | |         -^^^^^^^^^^^^^ method not found in `TcpKeepalive`
   | |_________|
   |

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rathole` (lib) due to previous error

Should this rather be a 2nd bug report? :)

Configuration
Configuration used to reproduce the behavior:

Nothing configured in this project, apart from applying https://github.com/rapiz1/rathole/pull/311/files before build.

Logs

Environment:

  • OS: OpenBSD 7.4
  • rathole --version output: N/A (can't compile)
  • CPU architecture: amd64
  • rustc version:
rustc --version
rustc 1.72.1 (d5c2e9c34 2023-09-13) (built from a source tarball)

coming from:

pkg_info | grep rust
rust-1.72.1         compiler for Rust Language
@McQueen2063 McQueen2063 added the bug Something isn't working label Mar 18, 2024
@sunnypatell
Copy link

Hello @McQueen2063,

Thank you for reporting this compilation issue and for providing such a detailed account of the behavior, including the steps you've taken to mitigate some of the problems. I appreciate the effort you’ve put into troubleshooting this before reaching out.

Issue Analysis

The error you encountered stems from a version compatibility issue with LibreSSL. Our crate is configured to support up to LibreSSL 3.8.1, and since you are using LibreSSL 3.8.2, it triggers the build abort.

The subsequent error related to TcpKeepalive::with_interval not being found is due to changes or limitations in the fdlimit dependency or its interaction with newer or unsupported versions of Rust or system libraries on OpenBSD.

Suggested Next Steps

  1. Regarding LibreSSL Version Issue:

    • Temporarily, you could modify the crate's configuration to accept LibreSSL 3.8.2 as a valid version by mirroring the adjustments you applied from pull request #311. However, for a permanent fix, we should consider updating the dependency specifications to include support for LibreSSL 3.8.2. I will raise this with the maintainers to incorporate in future releases.
  2. TcpKeepalive Issue:

    • It seems like the method with_interval() might not be available or implemented differently in your environment. This could be due to the version of Rust or the operating system specifics. To better assist you, could you confirm if this method is indeed available in your version of Rust's documentation or if there have been any recent changes to the TcpKeepalive API?
  3. Filing a Separate Bug Report:

    • Given that the issues are somewhat distinct — one relating to version compatibility and another to specific method availability — it might be clearer to track and manage them as separate reports. This would allow us to address the root causes more effectively and organize the resolution process.

Request for Further Information

Could you provide any additional logs that appear after applying the pull request and the detailed error messages from the fdlimit compilation failure? This will help us further diagnose the issue and provide a more targeted solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants