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

Install not working #1

Closed
gaschecher opened this issue Mar 19, 2024 · 5 comments
Closed

Install not working #1

gaschecher opened this issue Mar 19, 2024 · 5 comments

Comments

@gaschecher
Copy link

Running the provided install instructions gives me an error:

cargo install jnv
    Updating crates.io index
  Downloaded jnv v0.1.0
  Downloaded 1 crate (24.0 KB) in 0.11s
  Installing jnv v0.1.0
    Updating crates.io index
  Downloaded autotools v0.2.6
  Downloaded anstream v0.6.13
  Downloaded autocfg v1.1.0
  Downloaded equivalent v1.0.1
  Downloaded anstyle-query v1.0.2
  Downloaded anstyle-parse v0.2.3
  Downloaded anstyle v1.0.6
  Downloaded cfg-if v1.0.0
  Downloaded lazy_static v1.4.0
  Downloaded fastrand v2.0.1
  Downloaded errno v0.3.8
  Downloaded clap_lex v0.7.0
  Downloaded bitflags v2.5.0
  Downloaded gag v1.0.0
  Downloaded colorchoice v1.0.0
  Downloaded endian-type v0.1.2
  Downloaded j9 v0.1.1
  Downloaded anyhow v1.0.81
  Downloaded either v1.10.0
  Downloaded filedescriptor v0.8.2
  Downloaded libloading v0.8.3
  Downloaded clap_derive v4.5.3
  Downloaded cexpr v0.6.0
  Downloaded signal-hook-mio v0.2.3
  Downloaded nibble_vec v0.1.0
  Downloaded home v0.5.9
  Downloaded lazycell v1.3.0
  Downloaded itoa v1.0.10
  Downloaded heck v0.5.0
  Downloaded glob v0.3.1
  Downloaded lock_api v0.4.11
  Downloaded same-file v1.0.6
  Downloaded rustc-hash v1.1.0
  Downloaded thiserror v1.0.58
  Downloaded thiserror-impl v1.0.58
  Downloaded shlex v1.3.0
  Downloaded utf8parse v0.2.1
  Downloaded unicode-width v0.1.11
  Downloaded which v4.4.2
  Downloaded strsim v0.11.0
  Downloaded quote v1.0.35
  Downloaded scopeguard v1.2.0
  Downloaded cc v1.0.90
  Downloaded parking_lot_core v0.9.9
  Downloaded clang-sys v1.7.0
  Downloaded clap v4.5.3
  Downloaded signal-hook-registry v1.4.1
  Downloaded walkdir v2.5.0
  Downloaded tempfile v3.10.1
  Downloaded smallvec v1.13.1
  Downloaded log v0.4.21
  Downloaded parking_lot v0.12.1
  Downloaded proc-macro2 v1.0.79
  Downloaded aho-corasick v1.1.2
  Downloaded signal-hook v0.3.17
  Downloaded ryu v1.0.17
  Downloaded prettyplease v0.2.16
  Downloaded promkit v0.3.1
  Downloaded unicode-ident v1.0.12
  Downloaded serde v1.0.197
  Downloaded indexmap v2.2.5
  Downloaded minimal-lexical v0.2.1
  Downloaded memchr v2.7.1
  Downloaded mio v0.8.11
  Downloaded nom v7.1.3
  Downloaded crossterm v0.27.0
  Downloaded hashbrown v0.14.3
  Downloaded itertools v0.12.1
  Downloaded clap_builder v4.5.2
  Downloaded serde_json v1.0.114
  Downloaded bindgen v0.69.4
  Downloaded radix_trie v0.2.1
  Downloaded regex v1.10.3
  Downloaded syn v2.0.53
  Downloaded regex-syntax v0.8.2
  Downloaded rustix v0.38.31
  Downloaded regex-automata v0.4.6
  Downloaded libc v0.2.153
  Downloaded linux-raw-sys v0.4.13
  Downloaded j9-sys v0.1.1
  Downloaded 80 crates (9.3 MB) in 2.86s (largest was `j9-sys` at 1.9 MB)
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.153
   Compiling glob v0.3.1
   Compiling anyhow v1.0.81
   Compiling prettyplease v0.2.16
   Compiling rustix v0.38.31
   Compiling either v1.10.0
   Compiling cfg-if v1.0.0
   Compiling memchr v2.7.1
   Compiling thiserror v1.0.58
   Compiling minimal-lexical v0.2.1
   Compiling linux-raw-sys v0.4.13
   Compiling bitflags v2.5.0
   Compiling regex-syntax v0.8.2
   Compiling home v0.5.9
   Compiling autocfg v1.1.0
   Compiling bindgen v0.69.4
   Compiling smallvec v1.13.1
   Compiling same-file v1.0.6
   Compiling lazycell v1.3.0
   Compiling rustc-hash v1.1.0
   Compiling libloading v0.8.3
   Compiling parking_lot_core v0.9.9
   Compiling cc v1.0.90
   Compiling log v0.4.21
   Compiling lazy_static v1.4.0
   Compiling signal-hook v0.3.17
   Compiling itertools v0.12.1
   Compiling shlex v1.3.0
   Compiling walkdir v2.5.0
   Compiling scopeguard v1.2.0
   Compiling serde v1.0.197
   Compiling utf8parse v0.2.1
   Compiling colorchoice v1.0.0
   Compiling lock_api v0.4.11
   Compiling anstyle-parse v0.2.3
   Compiling serde_json v1.0.114
   Compiling anstyle v1.0.6
   Compiling anstyle-query v1.0.2
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.14.3
   Compiling nibble_vec v0.1.0
   Compiling heck v0.5.0
   Compiling clang-sys v1.7.0
   Compiling endian-type v0.1.2
   Compiling clap_lex v0.7.0
   Compiling ryu v1.0.17
   Compiling anstream v0.6.13
   Compiling strsim v0.11.0
   Compiling fastrand v2.0.1
   Compiling itoa v1.0.10
   Compiling radix_trie v0.2.1
   Compiling nom v7.1.3
   Compiling unicode-width v0.1.11
   Compiling clap_builder v4.5.2
   Compiling autotools v0.2.6
   Compiling quote v1.0.35
   Compiling syn v2.0.53
   Compiling indexmap v2.2.5
   Compiling signal-hook-registry v1.4.1
   Compiling mio v0.8.11
   Compiling regex-automata v0.4.6
   Compiling parking_lot v0.12.1
   Compiling signal-hook-mio v0.2.3
   Compiling which v4.4.2
   Compiling cexpr v0.6.0
   Compiling tempfile v3.10.1
   Compiling regex v1.10.3
   Compiling thiserror-impl v1.0.58
   Compiling clap_derive v4.5.3
   Compiling filedescriptor v0.8.2
   Compiling crossterm v0.27.0
   Compiling gag v1.0.0
   Compiling clap v4.5.3
   Compiling promkit v0.3.1
   Compiling j9-sys v0.1.1
The following warnings were emitted during compilation:

warning: j9-sys@0.1.1: Compiler version doesn't include clang or GCC: "cc" "--version"
warning: j9-sys@0.1.1: Compiler version doesn't include clang or GCC: "c++" "--version"

error: failed to run custom build command for `j9-sys v0.1.1`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installi3WdUy/release/build/j9-sys-12bea070e1c64770/build-script-build` (exit status: 101)
  --- stdout
  cargo:warning=Compiler version doesn't include clang or GCC: "cc" "--version"
  cargo:warning=Compiler version doesn't include clang or GCC: "c++" "--version"
  running: cd "/tmp/cargo-installi3WdUy/release/build/j9-sys-2575b3d26089796e/out/jq_build" && "sh" "-c" "exec \"$0\" \"$@\"" "autoreconf" "-i"

  --- stderr
  autoreconf: 1: exec: autoreconf: not found
  thread 'main' panicked at /home/isaac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/autotools-0.2.6/src/lib.rs:781:5:

  command did not execute successfully, got: exit status: 127

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to compile `jnv v0.1.0`, intermediate artifacts can be found at `/tmp/cargo-installi3WdUy`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

the brew install command gives an error as well



brew install ynqa/tap/jnv
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Error: formulae require at least a URL
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:307:in `determine_active_spec'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:238:in `initialize'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:527:in `new'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:527:in `get_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:751:in `get_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:964:in `factory'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cli/named_args.rb:126:in `block in load_formula_or_cask'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/api.rb:205:in `with_no_api_env_if_needed'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cli/named_args.rb:118:in `load_formula_or_cask'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cli/named_args.rb:83:in `block in to_formulae_and_casks'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cli/named_args.rb:81:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cli/named_args.rb:81:in `flat_map'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cli/named_args.rb:81:in `to_formulae_and_casks'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:197:in `install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:86:in `<main>'

I don't use brew often, and this is my first time using cargo, so apologies if its something obvious!

@ynqa
Copy link
Owner

ynqa commented Mar 19, 2024

@gaschecher Thanks for your reporting! 👍

autoreconf: line 0: exec: autoreconf: not found

I completely overlooked it. There's a dependency on autoconf/automake for building j9. I'll add this to the documentation later, but for now, please try reinstalling after installing automake.

For Ubuntu:

apt-get install automake

For MacOS:

brew install automake

I reproduced the same error at cargo install jnv phase after removing automake/autoconf (though I couldn't reproduce it with brew...).

Note that installing automake will also install autoconf.

@gaschecher
Copy link
Author

Thanks for the reply!

In additional to your commands of installing automake, i had to install more to resolve subsequent errors.

So in total before i could get the cargo install jnv command to work i had to run all of:

sudo apt-get install build-essential autoconf automake libtool pkg-config
sudo apt-get install libonig-dev
sudo apt install libclang-dev
export LIBCLANG_PATH=/usr/lib/llvm-14/lib

@horseinthesky
Copy link

Not sure if I should open a new issue.

After I installed libclang-dev instalation fails with

   Compiling j9-sys v0.1.3
   Compiling j9 v0.1.3
   Compiling jnv v0.2.0
error[E0063]: missing field `word_break_chars` in initializer of `promkit::text_editor::Renderer`
  --> /home/horseinthesky/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jnv-0.2.0/src/jnv.rs:77:36
   |
77 |             query_editor_renderer: text_editor::Renderer {
   |                                    ^^^^^^^^^^^^^^^^^^^^^ missing `word_break_chars`

For more information about this error, try `rustc --explain E0063`.
error: could not compile `jnv` (bin "jnv") due to 1 previous error
error: failed to compile `jnv v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installbemFBn`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

I'm on Ubuntu 22.04.

@EluvK
Copy link

EluvK commented Mar 29, 2024

@horseinthesky

missing word_break_chars

Use cargo install jnv --locked would fix it. The promkit::text_editor::Renderer field is changed.

@horseinthesky
Copy link

Use cargo install jnv --locked would fix it.

Thank you. Installs fine.

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

5 participants
@ynqa @horseinthesky @EluvK @gaschecher and others