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

Cargo fails to install #592

Closed
1 task done
StandingPadAnimations opened this issue Nov 13, 2022 · 2 comments
Closed
1 task done

Cargo fails to install #592

StandingPadAnimations opened this issue Nov 13, 2022 · 2 comments

Comments

@StandingPadAnimations
Copy link
Contributor

Duplicates

  • I have searched the existing issues

Current behavior 😯

When running cargo quickinstall or cargo install on Fedora 36, gitoxide both fails to find a binary release, and fails to build.

Output:

Could not find a pre-built package for gitoxide 0.17.0 on x86_64-unknown-linux-gnu.
We have reported your installation request, so it should be built soon.
Falling back to `cargo install`.
    Updating crates.io index
  Installing gitoxide v0.17.0
   Compiling autocfg v1.1.0
   Compiling libc v0.2.137
   Compiling proc-macro2 v1.0.47
   Compiling unicode-ident v1.0.5
   Compiling quote v1.0.21
   Compiling syn v1.0.103
   Compiling cfg-if v1.0.0
   Compiling serde_derive v1.0.147
   Compiling serde v1.0.147
   Compiling version_check v0.9.4
   Compiling memchr v2.5.0
   Compiling once_cell v1.16.0
   Compiling cc v1.0.76
   Compiling scopeguard v1.1.0
   Compiling futures-core v0.3.25
   Compiling log v0.4.17
   Compiling thiserror v1.0.37
   Compiling pkg-config v0.3.26
   Compiling parking_lot_core v0.9.4
   Compiling regex-automata v0.1.10
   Compiling lock_api v0.4.9
   Compiling bitflags v1.3.2
   Compiling signal-hook v0.3.14
   Compiling crossbeam-utils v0.8.12
   Compiling cmake v0.1.49
   Compiling memoffset v0.6.5
   Compiling fastrand v1.8.0
   Compiling crossbeam-epoch v0.9.11
   Compiling itoa v1.0.4
   Compiling hashbrown v0.12.3
   Compiling typenum v1.15.0
   Compiling generic-array v0.14.6
   Compiling time-core v0.1.0
   Compiling unicode-width v0.1.10
   Compiling waker-fn v1.1.0
   Compiling time-macros v0.2.6
   Compiling event-listener v2.5.3
   Compiling rayon-core v1.9.3
   Compiling libz-sys v1.1.8
   Compiling pin-project-lite v0.2.9
   Compiling parking v2.0.0
   Compiling futures-io v0.3.25
   Compiling cache-padded v1.2.0
   Compiling num_threads v0.1.6
   Compiling quick-error v2.0.1
   Compiling crossbeam-deque v0.8.2
   Compiling concurrent-queue v1.2.4
   Compiling futures-lite v1.12.0
   Compiling crossbeam-channel v0.5.6
   Compiling polling v2.4.0
   Compiling slab v0.4.7
   Compiling unicode-segmentation v1.10.0
   Compiling parking_lot_core v0.8.5
   Compiling signal-hook-registry v1.4.0
   Compiling mio v0.8.5
   Compiling cassowary v0.3.0
   Compiling crossbeam-queue v0.3.6
   Compiling futures-channel v0.3.25
   Compiling signal-hook-mio v0.2.3
   Compiling socket2 v0.4.7
   Compiling num_cpus v1.14.0
   Compiling time v0.3.17
   Compiling atty v0.2.14
   Compiling sha1-asm v0.5.1
   Compiling async-io v1.10.0
   Compiling rayon v1.5.3
   Compiling instant v0.1.12
   Compiling futures-sink v0.3.25
   Compiling crc32fast v1.3.2
   Compiling either v1.8.0
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.3
   Compiling async-lock v2.6.0
   Compiling async-channel v1.7.1
   Compiling num-traits v0.2.15
   Compiling ansi_term v0.12.1
   Compiling humantime v2.1.0
   Compiling hex v0.4.3
   Compiling adler v1.0.2
   Compiling crossbeam v0.8.2
   Compiling digest v0.10.5
   Compiling miniz_oxide v0.5.4
   Compiling human_format v1.0.3
   Compiling cpufeatures v0.2.5
   Compiling bytesize v1.1.0
   Compiling same-file v1.0.6
   Compiling sha1 v0.10.5
   Compiling walkdir v2.3.2
   Compiling bytes v1.2.1
   Compiling sha1_smol v1.0.0
   Compiling minimal-lexical v0.2.1
   Compiling remove_dir_all v0.5.3
   Compiling nom v7.1.1
   Compiling tempfile v3.3.0
   Compiling openssl-src v111.24.0+1.1.1s
   Compiling memmap2 v0.5.8
   Compiling tinyvec_macros v0.1.0
   Compiling hash_hasher v2.0.3
   Compiling tinyvec v1.6.0
   Compiling curl-sys v0.4.59+curl-7.86.0
   Compiling openssl-sys v0.9.77
   Compiling unicase v2.6.0
   Compiling ahash v0.8.2
   Compiling unicode-bidi v0.3.8
   Compiling btoi v0.4.2
   Compiling percent-encoding v2.2.0
   Compiling rustversion v1.0.9
   Compiling getrandom v0.2.8
   Compiling form_urlencoded v1.1.0
   Compiling ryu v1.0.11
error: failed to run custom build command for `openssl-sys v0.9.77`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installV2xbN4/release/build/openssl-sys-50c27d58fb67f4ee/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rustc-cfg=openssl
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  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 "perl" "./Configure" "--prefix=/tmp/cargo-installV2xbN4/release/build/openssl-sys-52bf1ce4c8be7dff/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" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"

  --- stderr
  Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.34 /usr/local/share/perl5/5.34 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./Configure line 15.
  BEGIN failed--compilation aborted at ./Configure line 15.
  thread 'main' panicked at '


  Error configuring OpenSSL build:
      Command: "perl" "./Configure" "--prefix=/tmp/cargo-installV2xbN4/release/build/openssl-sys-52bf1ce4c8be7dff/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" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"
      Exit status: exit status: 2


      ', /home/mahid_sheikh/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.24.0+1.1.1s/src/lib.rs:498:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `gitoxide v0.17.0`, intermediate artifacts can be found at `/tmp/cargo-installV2xbN4`
Error: `cargo install` didn't work either. Looks like you're on your own.

Expected behavior 🤔

Gitoxide shouldn't have build errors

Steps to reproduce 🕹

  1. Run rustup update
  2. Run cargo quickinstall gitoxide
@Byron
Copy link
Member

Byron commented Nov 13, 2022

Thanks for reporting, it's good to know that openssl can cause trouble (probably along with all other C dependencies).

A a workaround, you can try cargo install --no-default-features --features small gitoxide which will avoid pulling in most C code (maybe even be pure Rust), at the expense of not being competitive in performance.

This probably means that there should be a pure-Rust version optimized for performance one day, maybe even as the default.

Please note that I am closing this issue as there is nothing I can do at this time to support each and every platform while C toolchains are involved.

@Byron Byron closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2022
@StandingPadAnimations
Copy link
Contributor Author

Alright it seems like the error is a general OpenSSL error on Fedora. The solution is to install perl using sudo dnf install perl before installing gitoxide. Once perl is installed, then gitoxide builds perfectly fine.

Byron added a commit to StandingPadAnimations/gitoxide that referenced this issue Nov 14, 2022
Byron added a commit to StandingPadAnimations/gitoxide that referenced this issue Nov 14, 2022
…toxideLabs#592)

As opposed to the `small` option, it comes with all the features but
avoids anything written in C (as far as we know), which should make
building easier as it should only invoke the Rust compiler.
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

2 participants