build fails with wasm32-unknown-unknown #3513
Replies: 7 comments 8 replies
-
clang details: |
Beta Was this translation helpful? Give feedback.
-
It looks like you are asking in the wrong place. This problem has nothing to do with In any case, you can't compile |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply! |
Beta Was this translation helpful? Give feedback.
-
I didn't want to burden with too much information, trying to create a contract in wasm that includes hyperledger AnonCreds - https://github.com/hyperledger/anoncreds-rs - when it is included as a dependency in one of the contracts, it is trying to build it. thanks for the help! |
Beta Was this translation helpful? Give feedback.
-
I have pretty much saw (rust junior) what you mentioned, that features are disabled so the failures I have during build should not happen, but still they do. |
Beta Was this translation helpful? Give feedback.
-
I will upload the project to github for reference soon, generally? trying to create a contract that uses HyperLedger AnonCreds as a dependency. found this thread with similar issue: sfackler/rust-openssl#1016 |
Beta Was this translation helpful? Give feedback.
-
uploaded it to repo: https://github.com/gmesika-coti/cw-plus, the annoncreds as a dependency needs to be git cloned , and referenced in the toml , currently it is expected under /code/anoncreds-rs |
Beta Was this translation helpful? Give feedback.
-
Hi
Trying to build a project that uses a crate, that has ursa as a dependency, which has openssl-sys
│ │ ├── openssl v0.10.55
│ │ │ ├── bitflags v1.3.2
│ │ │ ├── cfg-if v1.0.0
│ │ │ ├── foreign-types v0.3.2
│ │ │ │ └── foreign-types-shared v0.1.1
│ │ │ ├── libc v0.2.147
│ │ │ ├── once_cell v1.18.0
│ │ │ ├── openssl-macros v0.1.1 (proc-macro)
│ │ │ │ ├── proc-macro2 v1.0.63 ()
│ │ │ │ ├── quote v1.0.29 ()
│ │ │ │ └── syn v2.0.22 (*)
│ │ │ └── openssl-sys v0.9.90
│ │ │ └── libc v0.2.147
when running cargo build with --target=wasm32-unknown-unknown it fails on the error below
when running cargo build with --target=x86_64-unknown-linux-gnu its working fine (but of course does not generate what's expected)
what are my options:
similar issues: servo/rust-stb-image#94
my error:
Compiling rand_chacha v0.3.1
Compiling time v0.1.45
Compiling zeroize_derive v1.4.2
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.90/src/./aes.rs:3:24
|
3 | pub const AES_ENCRYPT: c_int = 1;
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::ffi::c_int;
|
1 | use std::ffi::c_int;
|
1 | use std::os::raw::c_int;
|
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.90/src/./aes.rs:4:24
|
4 | pub const AES_DECRYPT: c_int = 0;
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::ffi::c_int;
|
1 | use std::ffi::c_int;
|
1 | use std::os::raw::c_int;
|
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.90/src/./aes.rs:6:22
|
6 | pub const AES_MAXNR: c_int = 14;
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::ffi::c_int;
|
1 | use std::ffi::c_int;
|
1 | use std::os::raw::c_int;
|
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.90/src/./aes.rs:7:27
|
7 | pub const AES_BLOCK_SIZE: c_int = 16;
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::ffi::c_int;
|
1 | use std::ffi::c_int;
|
1 | use std::os::raw::c_int;
|
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.90/src/./asn1.rs:6:23
|
6 | pub const V_ASN1_EOC: c_int = 0;
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::ffi::c_int;
|
1 | use std::ffi::c_int;
|
1 | use std::os::raw::c_int;
|
error[E0412]: cannot find type c_int in this scope
--> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.90/src/./asn1.rs:7:27
|
7 | pub const V_ASN1_BOOLEAN: c_int = 1;
| ^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::ffi::c_int;
|
1 | use std::ffi::c_int;
|
1 | use std::os::raw::c_int;
|
Beta Was this translation helpful? Give feedback.
All reactions