Skip to content

wasm-ld cannot find -lcrypto after building OpenSSL with make openssl #186

@Yaxuan-w

Description

@Yaxuan-w

I ran into an issue when writing the witness grate and trying to use the OpenSSL built by make openssl.

When compiling the grate, I get the following error:

lind@7abae280c536:~/lind-wasm-example-grates/examples/witness-grate$ ./compile_grate.sh
wasm-ld: error: unable to find library -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)

However, libcrypto.a does seem to exist in the sysroot:

lind@7abae280c536:~/lind-wasm-example-grates/examples/witness-grate$ find /home/lind/lind-wasm/build/sysroot/ -name libcrypto.a
/home/lind/lind-wasm/build/sysroot/usr/lib/wasm32-wasi/libcrypto.a

I used rsync -a to replace lind-wasm/build/sysroot with lind-wasm/build/sysroot_overlay.

At the moment, I am not sure whether this is caused by my sysroot/sysroot_overlay replacement step, or libcrypto is present but not actually usable/compatible for this wasm target.

Any pointers would be appreciated. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions