Skip to content

Kotlin bindings generation fails locally #197

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

Closed
tnull opened this issue Nov 15, 2023 · 0 comments · Fixed by #207
Closed

Kotlin bindings generation fails locally #197

tnull opened this issue Nov 15, 2023 · 0 comments · Fixed by #207
Labels
bug Something isn't working

Comments

@tnull
Copy link
Collaborator

tnull commented Nov 15, 2023

Our bindings generation script suddenly fails locally at least on macOS:

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

Caused by:
  process didn't exit successfully: `/Users/ero/workspace/ldk-node/target/release-smaller/build/openssl-sys-86e229479d1274d2/build-script-main` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=X86_64_LINUX_ANDROID_OPENSSL_LIB_DIR
  X86_64_LINUX_ANDROID_OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
  OPENSSL_LIB_DIR unset
  cargo:rerun-if-env-changed=X86_64_LINUX_ANDROID_OPENSSL_INCLUDE_DIR
  X86_64_LINUX_ANDROID_OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
  OPENSSL_INCLUDE_DIR unset
  cargo:rerun-if-env-changed=X86_64_LINUX_ANDROID_OPENSSL_DIR
  X86_64_LINUX_ANDROID_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_ALLOW_CROSS_x86_64-linux-android
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_x86_64_linux_android
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-linux-android
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_linux_android
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-linux-android
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_linux_android
  cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  run pkg_config fail: pkg-config has not been configured to support cross-compilation.

  Install a sysroot for the target platform and configure it via
  PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
  cross-compiling wrapper for pkg-config and set it via
  PKG_CONFIG environment variable.

  --- stderr
  thread 'main' panicked at /Users/ero/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.95/build/find_normal.rs:190:5:


  Could not find directory of OpenSSL installation, and this `-sys` crate cannot
  proceed without this knowledge. If OpenSSL is installed and this crate had
  trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
  compilation process.

  Make sure you also have the development packages of openssl installed.
  For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

  If you're in a situation where you think the directory *should* be found
  automatically, please open a bug at https://github.com/sfackler/rust-openssl
  and include information about your system as well as this message.

  $HOST = aarch64-apple-darwin
  $TARGET = x86_64-linux-android
  openssl-sys = 0.9.95


  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

This is a bit curious as we don't want to use openssl-sys at all, however, we currently depend on esplora-client 0.4 which still enables this by default for reqwest, pulling in the dependency even though we won't actually use it. We're currently blocked from upgrading though as both lightning-transaction-sync and BDK 0.28.2 depend on this version, where upgrading the latter is prohibited by 0.29 and 1.0 already upgraded to rust-bitcoin 0.30.

I'm generally a bit dubious where the failure suddenly comes from as openssl-sys had been updated 12 days ago and only http had been updated in the last few days. However, more people seem to run into this issue, so hopefully. it will be resolved soon: sfackler/rust-openssl#2092

@tnull tnull added bug Something isn't working and removed bug Something isn't working labels Nov 15, 2023
This was referenced Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant