ftw icon indicating copy to clipboard operation
ftw copied to clipboard

Dependency error on install

Open RampedIndent opened this issue 1 year ago • 6 comments

It appears one of the dependencies might be out of date, looking at cargo git-ref semms to have renamed itself to gix-ref log.txt

    Updating crates.io index
  Installing ftw v0.12.0
   Compiling libc v0.2.147
   Compiling proc-macro2 v1.0.66
   Compiling unicode-ident v1.0.11
   Compiling memchr v2.5.0
   Compiling cfg-if v1.0.0
   Compiling thiserror v1.0.44
   Compiling autocfg v1.1.0
   Compiling regex-syntax v0.7.4
   Compiling once_cell v1.18.0
   Compiling pkg-config v0.3.27
   Compiling version_check v0.9.4
   Compiling rustix v0.38.6
   Compiling bitflags v2.3.3
   Compiling linux-raw-sys v0.4.5
   Compiling num-traits v0.2.16
   Compiling time-core v0.1.1
   Compiling itoa v1.0.9
   Compiling time-macros v0.2.11
   Compiling num_threads v0.1.6
   Compiling deranged v0.3.7
   Compiling serde v1.0.181
   Compiling aho-corasick v1.0.2
   Compiling quote v1.0.32
   Compiling smallvec v1.11.0
   Compiling jobserver v0.1.26
   Compiling syn v2.0.28
   Compiling getrandom v0.2.10
   Compiling lazy_static v1.4.0
   Compiling vcpkg v0.2.15
   Compiling cc v1.0.81
   Compiling lock_api v0.4.10
   Compiling bitflags v1.3.2
   Compiling ucd-trie v0.1.6
   Compiling crunchy v0.2.2
   Compiling serde_derive v1.0.181
   Compiling parking_lot_core v0.9.8
   Compiling regex-automata v0.3.4
   Compiling openssl-src v111.27.0+1.1.1v
   Compiling scopeguard v1.2.0
   Compiling time v0.3.25
   Compiling signal-hook v0.3.17
   Compiling fastrand v2.0.0
   Compiling tiny-keccak v2.0.2
   Compiling proc-macro-hack v0.5.20+deprecated
   Compiling same-file v1.0.6
   Compiling static_assertions v1.1.0
   Compiling tempfile v3.7.0
   Compiling walkdir v2.3.3
   Compiling openssl-sys v0.9.90
   Compiling libz-sys v1.1.12
   Compiling libssh2-sys v0.2.23
   Compiling signal-hook-registry v1.4.1
   Compiling quick-error v2.0.1
   Compiling syn v1.0.109
   Compiling tinyvec_macros v0.1.1
   Compiling hashbrown v0.14.0
   Compiling minimal-lexical v0.2.1
   Compiling percent-encoding v2.3.0
   Compiling hex v0.4.3
   Compiling bstr v1.6.0
   Compiling regex v1.9.1
   Compiling dashmap v5.5.0
   Compiling nom v7.1.3
   Compiling tinyvec v1.6.0
   Compiling thiserror-impl v1.0.44
   Compiling is-terminal v0.4.9
   Compiling btoi v0.4.3
   Compiling rand_core v0.6.4
   Compiling ahash v0.7.6
   Compiling ppv-lite86 v0.2.17
   Compiling utf8parse v0.2.1
   Compiling either v1.9.0
   Compiling sha1_smol v1.0.0
   Compiling anstyle-parse v0.2.1
   Compiling itertools v0.10.5
   Compiling rand_chacha v0.3.1
   Compiling const-random-macro v0.1.15
   Compiling unicode-normalization v0.1.22
   Compiling liquid-derive v0.26.4
   Compiling git-hash v0.10.3
   Compiling pest v2.7.2
   Compiling git-date v0.4.3
   Compiling git-features v0.26.5
   Compiling git-actor v0.17.2
   Compiling git-validate v0.7.3
   Compiling git-path v0.7.2
   Compiling git-tempfile v3.0.3
   Compiling kstring v2.0.0
   Compiling libgit2-sys v0.14.2+1.5.1
   Compiling ahash v0.8.3
   Compiling smartstring v1.0.1
   Compiling pest_meta v2.7.2
   Compiling anstyle v1.0.1
   Compiling fastrand v1.9.0
   Compiling anstyle-query v1.0.0
   Compiling log v0.4.19
   Compiling heck v0.4.1
   Compiling unicode-bidi v0.3.13
   Compiling colorchoice v1.0.0
   Compiling doc-comment v0.3.3
   Compiling unicode-width v0.1.10
   Compiling anymap2 v0.13.0
   Compiling unicode-segmentation v1.10.1
   Compiling pest_generator v2.7.2
   Compiling portable-atomic v1.4.2
   Compiling idna v0.4.0
   Compiling console v0.15.7
   Compiling anstream v0.3.2
   Compiling git-lock v3.0.3
   Compiling git-object v0.26.2
   Compiling const-random v0.1.15
   Compiling rand v0.8.5
   Compiling form_urlencoded v1.2.0
   Compiling pest_derive v2.7.2
   Compiling memmap2 v0.5.10
   Compiling names v0.14.0
   Compiling semver v1.0.18
   Compiling fnv v1.0.7
   Compiling rustversion v1.0.14
   Compiling paste v1.0.14
   Compiling liquid-core v0.26.4
   Compiling anyhow v1.0.72
   Compiling clap_lex v0.5.0
   Compiling openssl v0.10.55
   Compiling foreign-types-shared v0.1.1
   Compiling clap_builder v4.3.19
   Compiling foreign-types v0.3.2
   Compiling globset v0.4.12
   Compiling git-ref v0.23.1
   Compiling hashbrown v0.12.3
   Compiling url v2.4.0
error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/store/packed/find.rs:95:52
   |
95 |                 .map(|(_rest, r)| r.name.as_bstr().as_ref())
   |                                                    ^^^^^^ the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0277]: the trait bound `BStr: AsRef<[_; 0]>` is not satisfied
  --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/store/packed/find.rs:91:43
   |
91 |         a.binary_search_by_key(&full_name.as_ref(), |b: &u8| {
   |                                           ^^^^^^ the trait `AsRef<[_; 0]>` is not implemented for `BStr`
   |
   = help: the following other types implement trait `AsRef<T>`:
             <BStr as AsRef<BStr>>
             <BStr as AsRef<[u8]>>

error[E0283]: type annotations needed
    --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:109:43
     |
109  |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
     |                                           ^^^^^^^^^^^^ -------------------------- type must be known at this point
     |                                           |
     |                                           cannot infer type of the type parameter `P` declared on the method `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
     = help: the following types implement trait `core::slice::SlicePattern`:
               [T; N]
               [T]
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /home/rampedindent/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2333:28
     |
2333 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
109  |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
     |                                                       +++++

error[E0283]: type annotations needed
   --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:109:43
    |
109 |             if let Some(shortened) = name.strip_prefix(category.prefix().as_ref()) {
    |                                           ^^^^^^^^^^^^                   ------ type must be known at this point
    |                                           |
    |                                           cannot infer type of the type parameter `P` declared on the method `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
109 |             if let Some(shortened) = name.strip_prefix::<P>(category.prefix().as_ref()) {
    |                                                       +++++

error[E0283]: type annotations needed
   --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:132:46
    |
132 |         } else if let Some(shortened) = name.strip_prefix(Category::MainPseudoRef.prefix().as_ref()) {
    |                                              ^^^^^^^^^^^^                                  ------ type must be known at this point
    |                                              |
    |                                              cannot infer type of the type parameter `P` declared on the method `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
132 |         } else if let Some(shortened) = name.strip_prefix::<P>(Category::MainPseudoRef.prefix().as_ref()) {
    |                                                          +++++

error[E0283]: type annotations needed
   --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/fullname.rs:139:18
    |
139 |             name.strip_prefix(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                  ^^^^^^^^^^^^                                                        ------ type must be known at this point
    |                  |
    |                  cannot infer type of the type parameter `P` declared on the method `strip_prefix`
    |
    = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
            - impl AsRef<BStr> for BStr;
            - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
    |
139 |             name.strip_prefix::<P>(Category::LinkedPseudoRef { name: "".into() }.prefix().as_ref())
    |                              +++++

error[E0283]: type annotations needed
    --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/raw.rs:76:18
     |
76   |                 .strip_prefix(namespace.0.as_bstr().as_ref())
     |                  ^^^^^^^^^^^^ ------------------------------ type must be known at this point
     |                  |
     |                  cannot infer type of the type parameter `P` declared on the method `strip_prefix`
     |
     = note: cannot satisfy `_: core::slice::SlicePattern`
     = help: the following types implement trait `core::slice::SlicePattern`:
               [T; N]
               [T]
note: required by a bound in `core::slice::<impl [T]>::strip_prefix`
    --> /home/rampedindent/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:2333:28
     |
2333 |     pub fn strip_prefix<P: SlicePattern<Item = T> + ?Sized>(&self, prefix: &P) -> Option<&[T]>
     |                            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::slice::<impl [T]>::strip_prefix`
help: consider specifying the generic argument
     |
76   |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
     |                              +++++

error[E0283]: type annotations needed
  --> /home/rampedindent/.cargo/registry/src/github.com-1ecc6299db9ec823/git-ref-0.23.1/src/raw.rs:76:18
   |
76 |                 .strip_prefix(namespace.0.as_bstr().as_ref())
   |                  ^^^^^^^^^^^^                       ------ type must be known at this point
   |                  |
   |                  cannot infer type of the type parameter `P` declared on the method `strip_prefix`
   |
   = note: multiple `impl`s satisfying `BStr: AsRef<_>` found in the `bstr` crate:
           - impl AsRef<BStr> for BStr;
           - impl AsRef<[u8]> for BStr;
help: consider specifying the generic argument
   |
76 |                 .strip_prefix::<P>(namespace.0.as_bstr().as_ref())
   |                              +++++

Some errors have detailed explanations: E0277, E0283.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `git-ref` due to 8 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `ftw v0.12.0`, intermediate artifacts can be found at `/tmp/cargo-installhF7YYj`

RampedIndent avatar Aug 04 '23 05:08 RampedIndent

@RampedIndent can you share the rust version and the operating system you are running this from? Thanks :)

macalimlim avatar Sep 03 '23 01:09 macalimlim

I am running arch linux image

RampedIndent avatar Sep 03 '23 02:09 RampedIndent

Hi @RampedIndent I have updated ftw to 0.13.0. You can use this command to update your ftw cargo install --force ftw. Can you also verify on your end if you are still getting the same error? Attached is what it looks like in my machine. 2023-10-21-14:27:05

macalimlim avatar Oct 21 '23 06:10 macalimlim

I am also getting a build issue, however its an issue relating to openssl-sys compilation on windows.

   Compiling clap v4.3.24
error: failed to run custom build command for `openssl-sys v0.9.77`

Caused by:
  process didn't exit successfully: `C:\Users\WINUSER\AppData\Local\Temp\cargo-installkMJVCG\release\build\openssl-sys-be3b5c33d8f81d6f\build-script-main` (exit code: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rustc-cfg=openssl
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  running "perl" "./Configure" "--prefix=C:\\Users\\WINUSER\\AppData\\Local\\Temp\\cargo-installkMJVCG\\release\\build\\openssl-sys-182c3822f8c26067\\out\\openssl-build\\install" "--openssldir=SYS$MANAGER:[OPENSSL]" "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-engine" "no-asm" "VC-WIN64A"
  Configuring OpenSSL version 1.1.1s (0x1010113fL) for VC-WIN64A
  Using os-specific seed configuration

  --- stderr

  ******************************************************************************
  This perl implementation doesn't produce Windows like paths (with backward
  slash directory separators).  Please use an implementation that matches your
  building platform.

  This Perl version: 5.36.1 for x86_64-msys-thread-multi
  ******************************************************************************
  thread 'main' panicked at C:\Users\WINUSER\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-src-111.24.0+1.1.1s\src\lib.rs:498:13:



  Error configuring OpenSSL build:
      Command: "perl" "./Configure" "--prefix=C:\\Users\\WINUSER\\AppData\\Local\\Temp\\cargo-installkMJVCG\\release\\build\\openssl-sys-182c3822f8c26067\\out\\openssl-build\\install" "--openssldir=SYS$MANAGER:[OPENSSL]" "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-engine" "no-asm" "VC-WIN64A"
      Exit status: exit code: 127


CoryRobertson avatar Feb 11 '24 22:02 CoryRobertson

@CoryRobertson do you have an openssl installed?

macalimlim avatar May 29 '24 07:05 macalimlim

Sorry for the delay, can confirm seems to work flawlessly now image

RampedIndent avatar Jun 03 '24 00:06 RampedIndent

@RampedIndent Thankyou. I will be closing this issue. @CoryRobertson If your error still persists, please open a new issue.

macalimlim avatar Jul 12 '24 17:07 macalimlim