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

Cannot build DIDKit for Android #107

Closed
SametSahin10 opened this issue Aug 2, 2022 · 7 comments
Closed

Cannot build DIDKit for Android #107

SametSahin10 opened this issue Aug 2, 2022 · 7 comments

Comments

@SametSahin10
Copy link

I'm following the instructions to run the app. I've installed DIDKit, SSI. Cloned the Credible repository and put didkit, ssi and spruce into the same directory. I've been able to run the command make -C lib install-rustup-android and make -C lib ../target/test/java.stamp successfully but when I run make -C lib ../target/test/android.stamp, I get errors. Below is the full output of the command. What could be the issue here? As it says in the output, an error occurrs while building the dependency ring. I've checked out lots of issues and questions but I couldn't find an answer. I'm using Pop!_OS 21.10 which is based on Ubuntu 21.10.

make: Entering directory '/home/sametsahin/work/spruceid/didkit/lib'
jar -cf ../target/didkit.jar -C ../target/jvm com/spruceid/DIDKit.class -C ../target/jvm com/spruceid/DIDKitException.class
PATH=/home/sametsahin/Android/Sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/bin:"/home/sametsahin/.nvm/versions/node/v16.15.1/bin:/home/sametsahin/.cargo/bin:/home/sametsahin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/go/bin:/home/sametsahin/work/android-studio/bin:/home/sametsahin/Android/Sdk/emulator:/home/sametsahin/Android/Sdk/platform-tools:/opt/idea-IC-203.7148.57/bin:/home/sametsahin/work/flutter/bin:/home/sametsahin/work/flutter/bin/cache/dart-sdk/bin:/home/sametsahin/.pub-cache/bin:/usr/share/code:/home/sametsahin/work/google-cloud-sdk/bin" \
cargo build --lib --release --target i686-linux-android
warning: /home/sametsahin/work/spruceid/didkit/http/Cargo.toml: only one of `license` or `license-file` is necessary
`license` should be used if the package license can be expressed with a standard SPDX expression.
`license-file` should be used if the package uses a non-standard license.
See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
warning: /home/sametsahin/work/spruceid/didkit/lib/Cargo.toml: only one of `license` or `license-file` is necessary
`license` should be used if the package license can be expressed with a standard SPDX expression.
`license-file` should be used if the package uses a non-standard license.
See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
warning: /home/sametsahin/work/spruceid/didkit/cli/Cargo.toml: only one of `license` or `license-file` is necessary
`license` should be used if the package license can be expressed with a standard SPDX expression.
`license-file` should be used if the package uses a non-standard license.
See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.13.0
   Compiling subtle v2.4.1
   Compiling byteorder v1.4.3
   Compiling pin-project-lite v0.2.9
   Compiling opaque-debug v0.3.0
   Compiling cpufeatures v0.2.2
   Compiling futures-io v0.3.21
   Compiling bytes v1.2.1
   Compiling block-padding v0.2.1
   Compiling itoa v1.0.2
   Compiling constant_time_eq v0.1.5
   Compiling arrayref v0.3.6
   Compiling keccak v0.1.2
   Compiling futures-sink v0.3.21
   Compiling arrayvec v0.7.2
   Compiling data-encoding v2.3.2
   Compiling pin-utils v0.1.0
   Compiling base-x v0.2.11
   Compiling ppv-lite86 v0.2.16
   Compiling smallvec v1.9.0
   Compiling unsigned-varint v0.7.1
   Compiling ryu v1.0.10
   Compiling cache-padded v1.2.0
   Compiling adler v1.0.2
   Compiling const-oid v0.5.2
   Compiling fnv v1.0.7
   Compiling const-oid v0.6.2
   Compiling tap v1.0.1
   Compiling wyz v0.2.0
   Compiling funty v1.1.0
   Compiling foreign-types-shared v0.1.1
   Compiling tinyvec_macros v0.1.0
   Compiling matches v0.1.9
   Compiling parking v2.0.0
   Compiling waker-fn v1.1.0
   Compiling fastrand v1.8.0
   Compiling spin v0.5.2
   Compiling bitflags v1.3.2
   Compiling event-listener v2.5.3
   Compiling base64 v0.13.0
   Compiling hashbrown v0.12.3
   Compiling static_assertions v1.1.0
   Compiling byte-tools v0.3.1
   Compiling openssl-probe v0.1.5
   Compiling async-task v4.3.0
   Compiling try-lock v0.2.3
   Compiling unicode-bidi v0.3.8
   Compiling percent-encoding v2.1.0
   Compiling atomic-waker v1.0.0
   Compiling hex v0.4.3
   Compiling scopeguard v1.1.0
   Compiling tower-service v0.3.2
   Compiling httpdate v1.0.2
   Compiling subtle v1.0.0
   Compiling either v1.7.0
   Compiling fake-simd v0.1.2
   Compiling hashbrown v0.11.2
   Compiling opaque-debug v0.2.3
   Compiling pct-str v1.1.0
   Compiling langtag v0.2.0
   Compiling base64 v0.12.3
   Compiling ryu-js v0.2.2
   Compiling json v0.12.4
   Compiling arrayvec v0.5.2
   Compiling untrusted v0.7.1
   Compiling mown v0.2.1
   Compiling ucd-trie v0.1.4
   Compiling mime v0.3.16
   Compiling ipnet v2.5.0
   Compiling bech32 v0.8.1
   Compiling combination v0.1.5
   Compiling ssi-contexts v0.1.3 (/home/sametsahin/work/spruceid/ssi/contexts)
   Compiling regex-syntax v0.6.27
   Compiling gimli v0.26.2
   Compiling rustc-demangle v0.1.21
   Compiling dyn-clone v1.0.8
   Compiling lalrpop-util v0.19.8
   Compiling memsec v0.6.2
   Compiling xxhash-rust v0.8.5
   Compiling cesu8 v1.1.0
   Compiling jni-sys v0.3.0
   Compiling typenum v1.15.0
   Compiling libc v0.2.126
   Compiling memchr v2.5.0
   Compiling serde v1.0.141
   Compiling log v0.4.17
   Compiling futures-core v0.3.21
   Compiling anyhow v1.0.59
   Compiling getrandom v0.1.16
   Compiling crunchy v0.2.2
   Compiling parking_lot_core v0.9.3
   Compiling futures-channel v0.3.21
   Compiling futures-task v0.3.21
   Compiling futures-util v0.3.21
   Compiling radium v0.6.2
   Compiling tiny-keccak v2.0.2
   Compiling tracing-core v0.1.29
   Compiling serde_json v1.0.82
   Compiling blake2b_simd v1.0.0
   Compiling blake2s_simd v1.0.0
   Compiling concurrent-queue v1.2.4
   Compiling miniz_oxide v0.5.3
   Compiling http v0.2.8
   Compiling der v0.4.5
   Compiling foreign-types v0.3.2
   Compiling tinyvec v1.6.0
   Compiling crc32fast v1.3.2
   Compiling httparse v1.7.1
   Compiling lazy_static v1.4.0
   Compiling async-lock v2.5.0
   Compiling fixed-hash v0.7.0
   Compiling block-padding v0.1.5
   Compiling form_urlencoded v1.0.1
   Compiling crossbeam-utils v0.8.11
   Compiling encoding_rs v0.8.31
   Compiling iref v2.1.3
   Compiling blake2b_simd v0.5.11
   Compiling cached v0.30.0
   Compiling libm v0.2.3
   Compiling generic-array v0.14.5
   Compiling value-bag v1.0.0-alpha.9
   Compiling num-traits v0.2.15
   Compiling indexmap v1.9.1
   Compiling num-integer v0.1.45
   Compiling slab v0.4.7
   Compiling lock_api v0.4.7
   Compiling num-bigint v0.2.6
   Compiling blake3 v1.3.1
   Compiling tokio v1.20.1
   Compiling num-bigint v0.4.3
   Compiling clear_on_drop v0.2.5
   Compiling ring v0.16.20
   Compiling num-iter v0.1.43
error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/home/sametsahin/work/spruceid/didkit/target/release/build/ring-203a974efa355649/build-script-build` (exit status: 101)
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("i686-linux-android")
  HOST = Some("x86_64-unknown-linux-gnu")
  CC_i686-linux-android = None
  CC_i686_linux_android = None
  TARGET_CC = None
  CC = None
  CFLAGS_i686-linux-android = None
  CFLAGS_i686_linux_android = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")

  --- stderr
  running "i686-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/home/sametsahin/work/spruceid/didkit/target/i686-linux-android/release/build/ring-bb955e14aaf4337f/out/aesni-x86-elf.o" "/home/sametsahin/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86-elf.S"
  thread 'main' panicked at 'failed to execute ["i686-linux-android-clang" "-O3" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-DNDEBUG" "-c" "-o/home/sametsahin/work/spruceid/didkit/target/i686-linux-android/release/build/ring-bb955e14aaf4337f/out/aesni-x86-elf.o" "/home/sametsahin/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesni-x86-elf.S"]: No such file or directory (os error 2)', /home/sametsahin/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:653:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:99: ../target/i686-linux-android/release/libdidkit.so] Error 101
make: Leaving directory '/home/sametsahin/work/spruceid/didkit/lib'
@sbihel
Copy link
Member

sbihel commented Aug 3, 2022

Do you have llvm/clang installed?

@SametSahin10
Copy link
Author

Do you have llvm/clang installed?

I've installed both of them and tried again but I still get the error. I'm attaching the info of clang and llvm that are installed on my machine.

Output of apt show clang:

Package: clang
Version: 1:13.0-53~exp1
Priority: optional
Section: universe/devel
Source: llvm-defaults (0.53~exp1)
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: LLVM Packaging Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 24.6 kB
Depends: clang-13 (>= 13~)
Breaks: clang-3.2, clang-3.3, clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1)
Replaces: clang (<< 3.2-1~exp2), clang-3.2, clang-3.3, clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1)
Download-Size: 3,080 B
APT-Manual-Installed: yes
APT-Sources: http://old-releases.ubuntu.com/ubuntu impish/universe amd64 Packages
Description: C, C++ and Objective-C compiler (LLVM based), clang binary
 Clang project is a C, C++, Objective C and Objective C++ front-end
 for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
 Collection (GCC).
 .
 Clang implements all of the ISO C++ 1998, 11 and 14 standards and also
 provides most of the support of C++17.
 .
 This is a dependency package providing the default clang compiler.

Output of apt show llvm:

Package: llvm
Version: 1:13.0-53~exp1
Priority: optional
Section: universe/devel
Source: llvm-defaults (0.53~exp1)
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: LLVM Packaging Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 85.0 kB
Depends: llvm-runtime (= 1:13.0-53~exp1), llvm-13 (>= 13~)
Download-Size: 3,512 B
APT-Sources: http://old-releases.ubuntu.com/ubuntu impish/universe amd64 Packages
Description: Low-Level Virtual Machine (LLVM)
 The Low-Level Virtual Machine (LLVM) is a collection of libraries and
 tools that make it easy to build compilers, optimizers, Just-In-Time
 code generators, and many other compiler-related programs.
 .
 This is a dependency package providing the default llvm package.

@sbihel
Copy link
Member

sbihel commented Aug 3, 2022

If it's the same error, try export TARGET_CC=$(which clang), I believe it should work on Linux.

@SametSahin10
Copy link
Author

The export solved the issue on ring but now an error occurrs related to openssl-sys. Below is the part of the output that shows the error.

error: failed to run custom build command for `openssl-sys v0.9.75`

Caused by:
  process didn't exit successfully: `/home/sametsahin/work/spruceid/didkit/target/release/build/openssl-sys-3257b66156297b35/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=ARMV7_LINUX_ANDROIDEABI_OPENSSL_NO_VENDOR
  ARMV7_LINUX_ANDROIDEABI_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  CC_armv7-linux-androideabi = None
  CC_armv7_linux_androideabi = None
  TARGET_CC = Some("/usr/bin/clang")
  CFLAGS_armv7-linux-androideabi = None
  CFLAGS_armv7_linux_androideabi = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  running "perl" "./Configure" "--prefix=/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-stdio" "linux-armv4" "-O2" "-DANDROID" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=armv7-linux-androideabi"
  Configuring OpenSSL version 1.1.1q (0x1010111fL) for linux-armv4
  Using os-specific seed configuration
  Creating configdata.pm
  Creating Makefile

  **********************************************************************
  ***                                                                ***
  ***   OpenSSL has been successfully configured                     ***
  ***                                                                ***
  ***   If you encounter a problem while building, please open an    ***
  ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
  ***   and include the output from the following command:           ***
  ***                                                                ***
  ***       perl configdata.pm --dump                                ***
  ***                                                                ***
  ***   (If you are new to OpenSSL, you might want to consult the    ***
  ***   'Troubleshooting' section in the INSTALL file first)         ***
  ***                                                                ***
  **********************************************************************
  running "make" "depend"
  make[1]: Entering directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'
  make[1]: Leaving directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'
  running "make" "build_libs"
  make[1]: Entering directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'
  /usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
      "-oMakefile" include/crypto/bn_conf.h.in > include/crypto/bn_conf.h
  /usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
      "-oMakefile" include/crypto/dso_conf.h.in > include/crypto/dso_conf.h
  /usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
      "-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
  make depend && make _build_libs
  make[2]: Entering directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'
  make[2]: Leaving directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'
  make[2]: Entering directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'
  CC="/usr/bin/clang" /usr/bin/perl crypto/aes/asm/aes-armv4.pl linux32 crypto/aes/aes-armv4.S
  /usr/bin/clang  -I. -Iinclude -fPIC -pthread -Wa,--noexecstack -Qunused-arguments -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7-linux-androideabi -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/install/lib/engines-1.1\"" -DNDEBUG -DANDROID -MMD -MF crypto/aes/aes_cbc.d.tmp -MT crypto/aes/aes_cbc.o -c -o crypto/aes/aes_cbc.o crypto/aes/aes_cbc.c
  /usr/bin/clang  -I. -Iinclude -fPIC -pthread -Wa,--noexecstack -Qunused-arguments -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7-linux-androideabi -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/install/lib/engines-1.1\"" -DNDEBUG -DANDROID -MMD -MF crypto/aes/aes_cfb.d.tmp -MT crypto/aes/aes_cfb.o -c -o crypto/aes/aes_cfb.o crypto/aes/aes_cfb.c
  /usr/bin/clang  -I. -Iinclude -fPIC -pthread -Wa,--noexecstack -Qunused-arguments -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7-linux-androideabi -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/install/lib/engines-1.1\"" -DNDEBUG -DANDROID -MMD -MF crypto/aes/aes_ecb.d.tmp -MT crypto/aes/aes_ecb.o -c -o crypto/aes/aes_ecb.o crypto/aes/aes_ecb.c
  /usr/bin/clang  -I. -Iinclude -fPIC -pthread -Wa,--noexecstack -Qunused-arguments -Wall -O3 -O2 -ffunction-sections -fdata-sections -fPIC --target=armv7-linux-androideabi -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/install/lib/engines-1.1\"" -DNDEBUG -DANDROID -MMD -MF crypto/aes/aes_ige.d.tmp -MT crypto/aes/aes_ige.o -c -o crypto/aes/aes_ige.o crypto/aes/aes_ige.c
  make[2]: Leaving directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'
  make[1]: Leaving directory '/home/sametsahin/work/spruceid/didkit/target/armv7-linux-androideabi/release/build/openssl-sys-7cf7047181e0f9fc/out/openssl-build/build/src'

  --- stderr
  In file included from crypto/aes/aes_ige.c:10:
  In file included from include/internal/cryptlib.h:22:
  In file included from include/openssl/crypto.h:415:
  /usr/include/pthread.h:698:6: error: 'regparm' is not valid on this platform
       __cleanup_fct_attribute;
       ^~~~~~~~~~~~~~~~~~~~~~~
  /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
  # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
                                                   ^            ~
  In file included from crypto/aes/aes_ige.c:10:
  In file included from include/internal/cryptlib.h:22:
  In file included from include/openssl/crypto.h:415:
  /usr/include/pthread.h:710:3: error: 'regparm' is not valid on this platform
    __cleanup_fct_attribute;
    ^~~~~~~~~~~~~~~~~~~~~~~
  /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
  # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
                                                   ^            ~
  In file included from crypto/aes/aes_ige.c:10:
  In file included from include/internal/cryptlib.h:22:
  In file included from include/openssl/crypto.h:415:
  /usr/include/pthread.h:751:6: error: 'regparm' is not valid on this platform
       __cleanup_fct_attribute __attribute__ ((__noreturn__))
       ^~~~~~~~~~~~~~~~~~~~~~~
  /usr/include/bits/pthreadtypes-arch.h:52:50: note: expanded from macro '__cleanup_fct_attribute'
  # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
                                                   ^            ~
  3 errors generated.
  make[2]: *** [Makefile:694: crypto/aes/aes_ige.o] Error 1
  make[1]: *** [Makefile:174: build_libs] Error 2
  thread 'main' panicked at '


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


      ', /home/sametsahin/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.22.0+1.1.1q/src/lib.rs:490:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:99: ../target/armv7-linux-androideabi/release/libdidkit.so] Error 101
make: Leaving directory '/home/sametsahin/work/spruceid/didkit/lib'

@SametSahin10
Copy link
Author

I'm not completely sure but this was probably due to NDK not being installed correctly. If anyone comes across this error in the future, I suggest running the commands in install_android_dependencies.sh and making sure there are no errors. That's how I solved my issue.

@hpelitebook745G2
Copy link

@SametSahin10 i tried running but I'm still getting different error: #112

any advice?

@shabaadh
Copy link

shabaadh commented Feb 9, 2024

I'm not completely sure but this was probably due to NDK not being installed correctly. If anyone comes across this error in the future, I suggest running the commands in install_android_dependencies.sh and making sure there are no errors. That's how I solved my issue.

@SametSahin10 May I know which ndk version you are using ?

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

4 participants