hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
668 stars 735 forks source link

Arch Linux: Error while building indy-sdk from source #2590

Closed wiredhikari closed 9 months ago

wiredhikari commented 1 year ago
cargo build                                                                       11:45:31 ─╯
    Updating crates.io index
  Downloaded itoa v0.4.6
  Downloaded cpuid-bool v0.1.2
  Downloaded log v0.4.11
  Downloaded num v0.3.1
  Downloaded num-integer v0.1.44
  Downloaded block-buffer v0.9.0
  Downloaded fnv v1.0.7
  Downloaded num_cpus v1.13.0
  Downloaded pkg-config v0.3.19
  Downloaded aho-corasick v0.7.15
  Downloaded autocfg v1.0.1
  Downloaded byteorder v1.3.4
  Downloaded aes-gcm v0.3.2
  Downloaded generic-array v0.14.4
  Downloaded derivative v1.0.4
  Downloaded chacha20 v0.3.4
  Downloaded getrandom v0.2.3
  Downloaded chacha20poly1305 v0.3.3
  Downloaded opaque-debug v0.3.0
  Downloaded digest v0.9.0
  Downloaded num-bigint v0.3.1
  Downloaded hex v0.4.2
  Downloaded getrandom v0.1.15
  Downloaded num-iter v0.1.42
  Downloaded dirs-sys v0.3.5
  Downloaded num-traits v0.2.14
  Downloaded num-complex v0.3.1
  Downloaded owning_ref v0.4.1
  Downloaded rand_chacha v0.2.2
  Downloaded ppv-lite86 v0.2.10
  Downloaded proc-macro2 v1.0.24
  Downloaded regex v1.4.2
  Downloaded sha2 v0.8.2
  Downloaded block-padding v0.2.1
  Downloaded openssl v0.10.31
  Downloaded threadpool v1.8.1
  Downloaded version_check v0.9.2
  Downloaded stable_deref_trait v1.2.0
  Downloaded ryu v1.0.5
  Downloaded ahash v0.7.4
  Downloaded subtle v2.4.0
  Downloaded rusqlite v0.25.3
  Downloaded smallvec v1.6.1
  Downloaded termcolor v1.1.2
  Downloaded memchr v2.3.4
  Downloaded rustc-demangle v0.1.18
  Downloaded num-rational v0.3.2
  Downloaded openssl-sys v0.9.59
  Downloaded hashlink v0.7.0
  Downloaded once_cell v1.8.0
  Downloaded unicode-xid v0.2.1
  Downloaded zeroize_derive v1.0.1
  Downloaded serde_json v1.0.60
  Downloaded zeroize v1.2.0
  Downloaded synstructure v0.12.4
  Downloaded sha2 v0.9.2
  Downloaded serde v1.0.118
  Downloaded serde_derive v1.0.118
  Downloaded typenum v1.12.0
  Downloaded syn v1.0.54
  Downloaded regex-syntax v0.6.21
  Downloaded sha3 v0.9.1
  Downloaded backtrace-sys v0.1.37
  Downloaded libsqlite3-sys v0.22.2
  Downloaded 64 crates (6.2 MB) in 3.92s (largest was `libsqlite3-sys` at 2.3 MB)
   Compiling typenum v1.12.0
   Compiling libc v0.2.66
   Compiling cc v1.0.41
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.54
   Compiling pkg-config v0.3.19
   Compiling byteorder v1.3.4
   Compiling cfg-if v0.1.10
   Compiling rand_core v0.4.2
   Compiling version_check v0.9.2
   Compiling rand_core v0.3.1
   Compiling subtle v2.4.0
   Compiling autocfg v0.1.7
   Compiling proc-macro2 v0.4.30
   Compiling num-traits v0.2.14
   Compiling quote v1.0.7
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.44
   Compiling opaque-debug v0.2.3
   Compiling generic-array v0.12.3
   Compiling byte-tools v0.3.1
   Compiling serde_derive v1.0.118
   Compiling block-padding v0.1.5
   Compiling digest v0.8.1
   Compiling clear_on_drop v0.2.3
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.118
   Compiling rand_chacha v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling num-integer v0.1.44
   Compiling log v0.4.11
   Compiling quote v0.6.13
   Compiling lazy_static v1.4.0
   Compiling getrandom v0.1.15
   Compiling memchr v2.3.4
   Compiling block-buffer v0.7.3
   Compiling universal-hash v0.3.0
   Compiling rand v0.6.5
   Compiling backtrace-sys v0.1.37
   Compiling rand_os v0.1.3
   Compiling subtle v1.0.0
   Compiling toml v0.2.1
   Compiling error-chain v0.10.0
   Compiling bitflags v1.2.1
   Compiling crypto-mac v0.7.0
   Compiling metadeps v1.1.2
   Compiling curve25519-dalek v1.2.3
   Compiling block-cipher-trait v0.6.2
   Compiling openssl-sys v0.9.59
   Compiling ahash v0.7.4
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling rand_xorshift v0.1.1
   Compiling rand_jitter v0.1.4
   Compiling num-bigint v0.3.1
   Compiling ryu v1.0.5
   Compiling failure_derive v0.1.8
   Compiling synstructure v0.10.2
The following warnings were emitted during compilation:

warning: build/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token
warning:     4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v
warning:       |                        ^~~~~~~~~~~~~
warning: build/expando.c:5:23: note: in expansion of macro ‘VERSION2’
warning:     5 | #define VERSION(n, v) VERSION2(n, v)
warning:       |                       ^~~~~~~~
warning: build/expando.c:10:1: note: in expansion of macro ‘VERSION’
warning:    10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER)
warning:       | ^~~~~~~

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

Caused by:
  process didn't exit successfully: `/home/hikari/dev/mitacs/indy-sdk/libindy/target/debug/build/openssl-sys-03efe7298db6e881/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_DIR
  OPENSSL_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=OPENSSL_STATIC
  cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=SYSROOT
  cargo:rerun-if-env-changed=OPENSSL_STATIC
  cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rustc-link-lib=ssl
  cargo:rustc-link-lib=crypto
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=OPENSSL_STATIC
  cargo:rerun-if-env-changed=OPENSSL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  OPT_LEVEL = Some("0")
  TARGET = Some("x86_64-unknown-linux-gnu")
  HOST = Some("x86_64-unknown-linux-gnu")
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "/usr/include" "-Wall" "-Wextra" "-E" "build/expando.c"
  cargo:warning=build/expando.c:4:24: error: pasting "RUST_VERSION_OPENSSL_" and "(" does not give a valid preprocessing token
  cargo:warning=    4 | #define VERSION2(n, v) RUST_VERSION_##n##_##v
  cargo:warning=      |                        ^~~~~~~~~~~~~
  cargo:warning=build/expando.c:5:23: note: in expansion of macro ‘VERSION2’
  cargo:warning=    5 | #define VERSION(n, v) VERSION2(n, v)
  cargo:warning=      |                       ^~~~~~~~
  cargo:warning=build/expando.c:10:1: note: in expansion of macro ‘VERSION’
  cargo:warning=   10 | VERSION(OPENSSL, OPENSSL_VERSION_NUMBER)
  cargo:warning=      | ^~~~~~~
  exit status: 1

  --- stderr
  thread 'main' panicked at '
  Header expansion error:
  Error { kind: ToolExecError, message: "Command \"cc\" \"-O0\" \"-ffunction-sections\" \"-fdata-sections\" \"-fPIC\" \"-g\" \"-fno-omit-frame-pointer\" \"-m64\" \"-I\" \"/usr/include\" \"-Wall\" \"-Wextra\" \"-E\" \"build/expando.c\" with args \"cc\" did not execute successfully (status code exit status: 1)." }

  Failed to find OpenSSL development headers.

  You can try fixing this setting the `OPENSSL_DIR` environment variable
  pointing to your OpenSSL installation or installing OpenSSL headers package
  specific to your distribution:

      # On Ubuntu
      sudo apt-get install libssl-dev
      # On Arch Linux
      sudo pacman -S openssl
      # On Fedora
      sudo dnf install openssl-devel

  See rust-openssl README for more information:

      https://github.com/sfackler/rust-openssl#linux
  ', /home/hikari/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.59/build/main.rs:141:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
ianco commented 1 year ago

Looks like openssl isn't installed (or isn't installed properly)