mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.09k stars 25 forks source link

Presenterm does not install using cargo or AUR helper #214

Closed squishram closed 3 days ago

squishram commented 5 months ago

presenterm-git in the AUR and cargo's presenterm cannot successfully install onto my system, seemingly due to the package's inability to locate oniguruma, the regex parser that powers bat. However, I have no problems installing oniguruma and bat on my system, so am a bit puzzled as to why presenterm is giving me so much trouble (in fairness, bat and oniguruma are installed using pacman). I've attached the error log from paru (which is identical to the one from cargo) - your software looks incredible and I'm dying to use it - any help massively appreciated!

mfontanini commented 5 months ago

I don't use arch so it's hard for me to debug this. I did try presenterm-git on an arch docker image a few weeks back and had no issues with it.

I'd suggest using a pre-compiled binary instead. presenterm-bin is outdated (@pwnwriter would you mind please updating it?) but you can get the binary from the release page.

pwnwriter commented 5 months ago

In bus 🚌,

Give me a few minutes.

squishram commented 5 months ago

I'll use the binary instead for now, thanks.

To clarify: I know that the AUR doesn't always work as expected, but from what I can tell the helper is simply calling cargo install presenterm and adding the compiled program to the list of packages it's managing. So I would imagine this is a problem with the way cargo is handling the dependencies, or with the way the dependencies are passed to cargo. Regardless, I'm sure the binary will do fine for now - cheers!

mfontanini commented 5 months ago

Tbh I'm not sure what's the point of the -git package as like you say it's basically a wrapper over git clone + cargo build. But yeah, there may be a problem in that regex crate not detecting something properly in your setup.

pwnwriter commented 5 months ago

Should be providing 0.6.1 version now !

Screenshot 2024-02-19 at 9 21 54 PM
zach-is-my-name commented 5 months ago

$ cargo install presenterm ubuntu 22.04

error: Unrecognized option: 'diagnostic-width'

error: could not compile jpeg-decoder (lib) warning: build failed, waiting for other jobs to finish... error: failed to compile presenterm v0.7.0, intermediate artifacts can be found at /tmp/cargo-install3VuCWU. To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path

pwnwriter commented 4 months ago

@zach-is-my-name I just tried compiling on a fresh ubuntu VPS. It does compile. Are you still facing the same issue?

zach-is-my-name commented 4 months ago

@zach-is-my-name I just tried compiling on a fresh ubuntu VPS. It does compile. Are you still facing the same issue?

Yes, still errors for me:

[~/Downloads]$ cargo install presenterm
    Updating crates.io index
  Installing presenterm v0.7.0
    Updating crates.io index
  Downloaded strum v0.26.2
  Downloaded serde_with_macros v3.7.0
  Downloaded heck v0.5.0
  Downloaded thiserror-impl v1.0.58
  Downloaded proc-macro2 v1.0.79
  Downloaded bytemuck v1.15.0
  Downloaded thiserror v1.0.58
  Downloaded strum_macros v0.26.2
  Downloaded clap_derive v4.5.3
  Downloaded clap v4.5.3
  Downloaded unsafe-libyaml v0.2.11
  Downloaded serde_yaml v0.9.33
  Downloaded cc v1.0.90
  Downloaded serde_with v3.7.0
  Downloaded clap_builder v4.5.2
  Downloaded chrono v0.4.35
  Downloaded syn v2.0.53
  Downloaded 17 crates (1.3 MB) in 0.82s
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.153
   Compiling serde v1.0.197
   Compiling cfg-if v1.0.0
   Compiling strsim v0.10.0
   Compiling fnv v1.0.7
   Compiling ident_case v1.0.1
   Compiling autocfg v1.1.0
   Compiling syn v1.0.109
   Compiling crossbeam-utils v0.8.19
   Compiling memchr v2.7.1
   Compiling crc32fast v1.4.0
   Compiling itoa v1.0.10
   Compiling simd-adler32 v0.3.7
   Compiling adler v1.0.2
   Compiling cc v1.0.90
   Compiling rayon-core v1.12.1
   Compiling pkg-config v0.3.30
   Compiling lock_api v0.4.11
   Compiling miniz_oxide v0.7.2
   Compiling parking_lot_core v0.9.9
   Compiling utf8parse v0.2.1
   Compiling hashbrown v0.14.3
   Compiling equivalent v1.0.1
   Compiling regex-syntax v0.8.2
   Compiling serde_json v1.0.114
   Compiling ryu v1.0.17
   Compiling signal-hook v0.3.17
   Compiling bitflags v1.3.2
   Compiling crossbeam-epoch v0.9.18
   Compiling quote v1.0.35
   Compiling rustversion v1.0.14
   Compiling powerfmt v0.2.0
   Compiling either v1.10.0
   Compiling syn v2.0.53
   Compiling crossbeam-deque v0.8.5
   Compiling deranged v0.3.11
   Compiling signal-hook-registry v1.4.1
   Compiling getrandom v0.2.12
   Compiling indexmap v2.2.5
   Compiling flate2 v1.0.28
   Compiling aho-corasick v1.1.2
   Compiling anstyle-parse v0.2.3
   Compiling num-traits v0.2.18
   Compiling onig_sys v69.8.1
   Compiling anstyle-query v1.0.2
   Compiling rustix v0.38.31
   Compiling anstyle v1.0.6
   Compiling colorchoice v1.0.0
   Compiling smallvec v1.13.1
   Compiling once_cell v1.19.0
   Compiling log v0.4.21
   Compiling num-conv v0.1.0
   Compiling time-core v0.1.2
   Compiling scopeguard v1.2.0
   Compiling safemem v0.3.3
   Compiling thiserror v1.0.58
   Compiling mio v0.8.11
   Compiling line-wrap v0.1.1
   Compiling time v0.3.34
   Compiling anstream v0.6.13
   Compiling rayon v1.9.0
   Compiling rand_core v0.6.4
   Compiling regex-automata v0.4.6
   Compiling quick-xml v0.31.0
   Compiling fdeflate v0.3.4
   Compiling deunicode v1.4.3
   Compiling semver v1.0.22
   Compiling darling_core v0.14.4
   Compiling darling_core v0.20.8
   Compiling ppv-lite86 v0.2.17
   Compiling base64 v0.21.7
   Compiling color_quant v1.1.0
   Compiling heck v0.4.1
   Compiling clap_lex v0.7.0
   Compiling strsim v0.11.0
   Compiling option-ext v0.2.0
   Compiling same-file v1.0.6
   Compiling linux-raw-sys v0.4.13
   Compiling heck v0.5.0
   Compiling weezl v0.1.8
   Compiling walkdir v2.5.0
   Compiling dirs-sys v0.4.1
   Compiling gif v0.13.1
   Compiling clap_builder v4.5.2
   Compiling regex v1.10.3
   Compiling jpeg-decoder v0.3.1
   Compiling rand_chacha v0.3.1
error: Unrecognized option: 'diagnostic-width'

error: could not compile `jpeg-decoder` (lib)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `presenterm v0.7.0`, intermediate artifacts can be found at `/tmp/cargo-installZMLxFl`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
[~/Downloads]$ cargo --version
cargo 1.75.0
[~/Downloads]$ rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.75.0 (82e1608df 2023-12-21)`
[~/Downloads]$
mfontanini commented 4 months ago

This is complaining about the jpeg-decoder crate, it's unrelated to presenterm. See this issue https://github.com/rust-lang/rust/issues/118385, something may be broken in your installation.

mfontanini commented 3 days ago

Closing this, let me know if it's still an issue and we can reopen.