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

Unable to build #288

Closed
signed-log opened this issue May 18, 2023 · 2 comments
Closed

Unable to build #288

signed-log opened this issue May 18, 2023 · 2 comments
Labels

Comments

@signed-log
Copy link

signed-log commented May 18, 2023

Tested on rustc 1.69.0 (84c898d65 2023-04-16) and rustc 1.71.0-nightly (e9e1bbc7a 2023-05-17) with weird stderr about a git repo missing (all on x86_64_unknown_linux_gnu on Linux)

Logs :

Caused by:
  process didn't exit successfully: `/tmp/cargo-install9VODsy/release/build/libssh2-sys-b14afd0f9fde8b3f/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=LIBSSH2_SYS_USE_PKG_CONFIG
  cargo:include=/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/include
  cargo:root=/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out
  cargo:rerun-if-env-changed=DEP_Z_INCLUDE
  cargo:rerun-if-env-changed=DEP_OPENSSL_INCLUDE
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
  CC_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
  CC_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
  CFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
  CFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/include" "-I" "libssh2/src" "-I" "/tmp/cargo-install9VOD
sy/release/build/libssh2-sys-dff5c1cdf3610735/out/build" "-I" "/usr/include" "-fvisibility=hidden" "-DHAVE_LONGLONG" "-DHAVE_SNPRINTF" "-DHAVE_UNISTD_H" "-DHAVE_INTTYPES_H" "-DHAVE_STDLIB_H" "-DHAVE_SYS_SELECT_H
" "-DHAVE_SYS_SOCKET_H" "-DHAVE_SYS_IOCTL_H" "-DHAVE_SYS_TIME_H" "-DHAVE_SYS_UN_H" "-DHAVE_O_NONBLOCK" "-DLIBSSH2_OPENSSL" "-DHAVE_LIBCRYPT32" "-DHAVE_EVP_AES_128_CTR" "-DHAVE_POLL" "-DHAVE_GETTIMEOFDAY" "-DLIBS
SH2_DH_GEX_NEW" "-DLIBSSH2_HAVE_ZLIB" "-o" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/build/libssh2/src/agent.o" "-c" "libssh2/src/agent.c"
  exit status: 0
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/include" "-I" "libssh2/src" "-I" "/tmp/cargo-install9VOD
sy/release/build/libssh2-sys-dff5c1cdf3610735/out/build" "-I" "/usr/include" "-fvisibility=hidden" "-DHAVE_LONGLONG" "-DHAVE_SNPRINTF" "-DHAVE_UNISTD_H" "-DHAVE_INTTYPES_H" "-DHAVE_STDLIB_H" "-DHAVE_SYS_SELECT_H
" "-DHAVE_SYS_SOCKET_H" "-DHAVE_SYS_IOCTL_H" "-DHAVE_SYS_TIME_H" "-DHAVE_SYS_UN_H" "-DHAVE_O_NONBLOCK" "-DLIBSSH2_OPENSSL" "-DHAVE_LIBCRYPT32" "-DHAVE_EVP_AES_128_CTR" "-DHAVE_POLL" "-DHAVE_GETTIMEOFDAY" "-DLIBS
SH2_DH_GEX_NEW" "-DLIBSSH2_HAVE_ZLIB" "-o" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/build/libssh2/src/bcrypt_pbkdf.o" "-c" "libssh2/src/bcrypt_pbkdf.c"
  cargo:warning=libssh2/src/bcrypt_pbkdf.c: In function ‘bcrypt_pbkdf’:
  cargo:warning=libssh2/src/bcrypt_pbkdf.c:113:24: error: storage size of ‘ctx’ isn’t known
  cargo:warning=  113 |     libssh2_sha512_ctx ctx;
  cargo:warning=      |                        ^~~
  exit status: 1
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/include" "-I" "libssh2/src" "-I" "/tmp/cargo-install9VOD
sy/release/build/libssh2-sys-dff5c1cdf3610735/out/build" "-I" "/usr/include" "-fvisibility=hidden" "-DHAVE_LONGLONG" "-DHAVE_SNPRINTF" "-DHAVE_UNISTD_H" "-DHAVE_INTTYPES_H" "-DHAVE_STDLIB_H" "-DHAVE_SYS_SELECT_H
" "-DHAVE_SYS_SOCKET_H" "-DHAVE_SYS_IOCTL_H" "-DHAVE_SYS_TIME_H" "-DHAVE_SYS_UN_H" "-DHAVE_O_NONBLOCK" "-DLIBSSH2_OPENSSL" "-DHAVE_LIBCRYPT32" "-DHAVE_EVP_AES_128_CTR" "-DHAVE_POLL" "-DHAVE_GETTIMEOFDAY" "-DLIBS
SH2_DH_GEX_NEW" "-DLIBSSH2_HAVE_ZLIB" "-o" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/build/libssh2/src/blowfish.o" "-c" "libssh2/src/blowfish.c"
  exit status: 0

  --- stderr
  fatal: not a git repository (or any parent up to mount point /)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).


  error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/include" "-I" "libssh2/src" "-I" "/tmp/ca
rgo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/build" "-I" "/usr/include" "-fvisibility=hidden" "-DHAVE_LONGLONG" "-DHAVE_SNPRINTF" "-DHAVE_UNISTD_H" "-DHAVE_INTTYPES_H" "-DHAVE_STDLIB_H" "-DHA
VE_SYS_SELECT_H" "-DHAVE_SYS_SOCKET_H" "-DHAVE_SYS_IOCTL_H" "-DHAVE_SYS_TIME_H" "-DHAVE_SYS_UN_H" "-DHAVE_O_NONBLOCK" "-DLIBSSH2_OPENSSL" "-DHAVE_LIBCRYPT32" "-DHAVE_EVP_AES_128_CTR" "-DHAVE_POLL" "-DHAVE_GETTIM
EOFDAY" "-DLIBSSH2_DH_GEX_NEW" "-DLIBSSH2_HAVE_ZLIB" "-o" "/tmp/cargo-install9VODsy/release/build/libssh2-sys-dff5c1cdf3610735/out/build/libssh2/src/bcrypt_pbkdf.o" "-c" "libssh2/src/bcrypt_pbkdf.c" with args "c
c" did not execute successfully (status code exit status: 1).
@yodaldevoid
Copy link
Collaborator

My apologies for taking so long to get to this issue.

Sadly, I need more information to debug this issue.

How did you download libssh2-sys? e.g. Clone into a git repository, downloaded the source files as a zip file, downloaded by cargo as a part of another build, etc.

You seem to be using the vendored copy of libssh2. If you got the source files through git, try running git submodule update --init and attempting the build again. Otherwise, the vendored copy of libssh2 you were trying to build with may be incompatible with the version of libssh-sys you were attempting to build. Can you tell me what commit/version of libssh2 you were building with?

@signed-log
Copy link
Author

signed-log commented Sep 28, 2023

Got the source of the issue (nabijaczleweli/cargo-update#242), the used version of git2 by cargo-update is 1.16 so it was throwing some openssl errors (see log) 1.18.1 has those fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants