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

fix: install openssl@3 when building wws in actions #164

Merged
merged 10 commits into from
Jun 30, 2023

Conversation

Angelmmiguel
Copy link
Contributor

When releasing wws v1.3, the artifacts action was failing for macOS. The issue was related to the openssl crate upgrade on #132.

This is the error message from the job:

  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = x86_64-apple-darwin
  $TARGET = aarch64-apple-darwin
  openssl-sys = 0.9.90

Based on the openssl crate documentation, you need to install OpenSSL to build it. I assume the action runner was installing and old version that it's no longer valid for the crate and we need to explicitly install the latest one.

@Angelmmiguel Angelmmiguel added the 🐛 bug Something isn't working label Jun 23, 2023
@Angelmmiguel Angelmmiguel added this to the v1.3.0 milestone Jun 23, 2023
@Angelmmiguel Angelmmiguel self-assigned this Jun 23, 2023
@Angelmmiguel Angelmmiguel requested a review from a team June 29, 2023 12:56
@Angelmmiguel
Copy link
Contributor Author

To fix this, I tried several approaches, from installing architecture-specific packages with brew to set the OpenSSL location. After checking for multiple issues around, I found that OpenSSL is specially difficult to integrate in projects that targets multiple platforms. Even the cross team removed OpenSSL because it was difficult to maintain. That was another approach I wanted to try 🥲.

Finally, I decided to make the openssl vendored feature available as a wws feature. This approach allow us to toggle the vendored flag under demand. Before, it was automatically enabled for certain targets.

This PR / issue is another one on the "OpenSSL" related issues archive. I believe we should move to rust-tls sooner than later.

@Angelmmiguel
Copy link
Contributor Author

I removed the artifacts action condition to run it on pull requests (I added it for testing). Here you have a successful action that created all the artifacts: https://github.com/vmware-labs/wasm-workers-server/actions/runs/5411363945

Copy link
Contributor

@ereslibre ereslibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @Angelmmiguel 👏

@Angelmmiguel Angelmmiguel merged commit 1c0599e into main Jun 30, 2023
@Angelmmiguel Angelmmiguel deleted the fix-openssl-compilation branch June 30, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working cla-not-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants