Skip to content

rust-lld: error: unable to find library -lssl and -lcrypto #1794

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

Closed
gc-victor opened this issue Jan 19, 2023 · 4 comments
Closed

rust-lld: error: unable to find library -lssl and -lcrypto #1794

gc-victor opened this issue Jan 19, 2023 · 4 comments

Comments

@gc-victor
Copy link

Hi, any idea what the problem could be?

The project is using attohttpc as a dependency, but it looks like the error is from this library.

$ cargo build --target wasm32-wasi --release

error: linking with `rust-lld` failed: exit status: 1
...
= note: 
rust-lld: error: unable to find library -lssl
rust-lld: error: unable to find library -lcrypto

.cargo.toml

OPENSSL_DIR = "/usr"
OPENSSL_LIB_DIR ="/usr/lib"
OPENSSL_INCLUDE_DIR ="/usr/include"

I have checked: pkg-config --libs --cflags openssl and it prints -lssl -lcrypto

@sfackler
Copy link
Owner

Do you have a copy of OpenSSL built for WASM in /usr/lib?

@gc-victor
Copy link
Author

Do you have a copy of OpenSSL built for WASM in /usr/lib?

No, I don't have it. I guess that I'm doing it wrong

@sfackler
Copy link
Owner

You're going to need that to be able to use this library. I'm not sure what the status of building OpenSSL for WASM is - see #1016.

@gc-victor
Copy link
Author

Thanks for the support!

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

2 participants