Skip to content

support for illumos systems #51

Closed
@jclulow

Description

@jclulow

At the moment, when building for an illumos system, you get this error:

error: failed to run custom build command for `openssl-sys v0.9.53`

Caused by:
  process didn't exit successfully: `/rust/build/x86_64-unknown-linux-gnu/stage1-tools/release/build/openssl-sys-cd2ff60dc414d5d9/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn

--- stderr
thread 'main' panicked at 'don't know how to configure OpenSSL for x86_64-sun-solaris', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.6.1+1.1.1d/src/lib.rs:180:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The fix is pretty simple:

diff --git a/src/lib.rs b/src/lib.rs
index 12e3438..3a177ad 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -180,6 +180,7 @@ impl Build {
             "x86_64-unknown-linux-gnu" => "linux-x86_64",
             "x86_64-unknown-linux-musl" => "linux-x86_64",
             "x86_64-unknown-netbsd" => "BSD-x86_64",
+            "x86_64-sun-solaris" => "solaris64-x86_64-gcc",
             "wasm32-unknown-emscripten" => "gcc",
             "wasm32-unknown-unknown" => "gcc",
             "aarch64-apple-ios" => "ios64-cross",

I hit this as part of getting illumos/Solaris support into rustup. Is it alright if I open a PR with the change above? With the above patched in, everything works and I'm able to get a static vendored OpenSSL in my rustup binary.

Additionally, it looks like for openssl-sys to pick such a change up, we'd also need to update the version and publish the crate? Is it OK if I include bumping the version to 111.6.2+1.1.1d in the PR, or do you want to do that separately?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions