mozilla / rust-android-gradle

Apache License 2.0
1.03k stars 67 forks source link

Building the Rust library faild #35

Open maxre404 opened 4 years ago

maxre404 commented 4 years ago

When I add reqwest in Cargo.toml compilation error

--- stderr crypto/aes/aes_ecb.c:10:10: fatal error: 'assert.h' file not found

include

     ^~~~~~~~~~

In file included from crypto/aes/aes_ofb.c:10: include/openssl/aes.h:15:11: fatal error: 'stddef.h' file not found

include

      ^~~~~~~~~~

In file included from crypto/aes/aes_cbc.c:10: include/openssl/aes.h:15:11: fatal error: 'stddef.h' file not found

include

      ^~~~~~~~~~

In file included from crypto/aes/aes_wrap.c:10: include/internal/cryptlib.h:13:11: fatal error: 'stdlib.h' file not found

include

      ^~~~~~~~~~

In file included from crypto/aes/aes_misc.c:11: include/openssl/aes.h:15:11: fatal error: 'stddef.h' file not found

include

      ^~~~~~~~~~

In file included from crypto/aes/aes_ige.c:10: include/internal/cryptlib.h:13:11: fatal error: 'stdlib.h' file not found

include

      ^~~~~~~~~~

1 error generated. 1 error generated. 1 error generated. 1 error generated. make[1]: [crypto/aes/aes_ofb.o] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: [crypto/aes/aes_ecb.o] Error 1 make[1]: [crypto/aes/aes_cbc.o] Error 1 In file included from crypto/aes/aes_cfb.c:10: include/openssl/aes.h:15:11: fatal error: 'stddef.h' file not found

include

      ^~~~~~~~~~

make[1]: [crypto/aes/aes_misc.o] Error 1 1 error generated. make[1]: [crypto/aes/aes_cfb.o] Error 1 1 error generated. 1 error generated. make[1]: [crypto/aes/aes_wrap.o] Error 1 make[1]: [crypto/aes/aes_ige.o] Error 1 make: *** [build_libs] Error 2 thread 'main' panicked at '

Error building OpenSSL: Command: "make" "build_libs" Exit status: exit code: 2

', /Users/shuais/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.9.0+1.1.1g/src/lib.rs:379:13

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Task :app:cargoBuildArm FAILED

FAILURE: Build failed with an exception.

maxre404 commented 4 years ago

how can i solve it