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

Build fails for dfinity_js_backend canister due to openssl-sys crate linking error #2

Open
wirapratamaz opened this issue Feb 5, 2024 · 0 comments

Comments

@wirapratamaz
Copy link

When attempting to deploy my canisters using dfx deploy, the build process fails for the dfinity_js_backend canister. The error message indicates that the openssl-sys crate is unable to find the required files to link OpenSSL.

Steps to Reproduce:

  1. Run dfx start --clean to start the local replica.
  2. Run dfx deploy to deploy all canisters.
  3. Observe the build error for the dfinity_js_backend canister.

The build process fails with the following error message:

Error: Command failed: cd .azle/dfinity_js_backend && /root/.config/azle/rust/1.73.0/bin/cargo build --target wasm32-wasi --manifest-path canister/Cargo.toml --release
...
thread 'main' panicked at /root/.config/azle/rust/1.73.0/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.99/build/main.rs:406:13:
OpenSSL libdir at `["/usr/lib64", "/usr/lib"]` does not contain the required files to either statically or dynamically link OpenSSL
...

**Environment:**
- Operating System: [e.g., Ubuntu 20.04]
- Rust Version: [output of `rustc --version`]
- OpenSSL Version: [output of `openssl version`]
- dfx Version: [output of `dfx --version`]

**Attempts to Resolve:**
- Installed `pkg-config` and `libssl-dev`.
- Verified that `pkg-config` is in the PATH.
- Set `OPENSSL_DIR` environment variable.
- Checked permissions and paths for OpenSSL libraries.

Has anyone experienced a similar issue or have any suggestions on what might be wrong with my configuration or build process? What is the best way to resolve this OpenSSL linking problem?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant