gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Installing with cargo takes forever

Open R-Goc opened this issue 1 year ago • 6 comments

Describe the bug Installing with cargo takes forever. Both with current stable and nightly, from crates.io, from git, locked or not. The build always gets stuck at: Compiling git2-hooks v0.3.1 Building [=======================> ] 295/299: openssl-sys(build)
It gets stuck there, cpu usage falls. Everything before this is done in around a minute, to finish this took 14 minutes.

To Reproduce The ones I tried: cargo install gitui cargo install gitui --locked cargo install --git https://github.com/extrawurst/gitui.git cargo install --git https://github.com/extrawurst/gitui.git --locked and all of the above with nightly.

Expected behavior Gitui builds in a timely manner.

Screenshots image

Context (please complete the following information):

  • OS/Distro + Version: Windows 11 Beta
  • GitUI Version: master, crates.io (0.26.3)
  • Rust version: 1.79.0 1.82.0

Additional context I did build a previous version of gitui on my machine some time ago, don't recall any trouble with it. There's nothing in my config.toml

R-Goc avatar Jul 23 '24 23:07 R-Goc

probaably worth reporting upstream: https://github.com/alexcrichton/openssl-sys

extrawurst avatar Jul 25 '24 03:07 extrawurst

cargo install on ubuntu failed to compile gitui (not openssl)

pm100 avatar Jul 26 '24 03:07 pm100

I have this error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `libc` (build script) due to 1 previous error
error: failed to compile `gitui v0.26.3`, intermediate artifacts can be found at `/tmp/cargo-install9jvsXr`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

hemedani avatar Sep 08 '24 07:09 hemedani

fixed with

sudo apt install build-essential

hemedani avatar Sep 08 '24 07:09 hemedani

Not fully related to the topic but if you're dealing with long build times, sccache is worth setting up. It caches parts of a compilation when possible. Takes 2 mins to set up!

van-sprundel avatar Oct 15 '24 21:10 van-sprundel

I already use it. The issue is that one step.

R-Goc avatar Oct 16 '24 08:10 R-Goc