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

error: failed to run custom build command for gitui v0.26.2 (/usr/src/RPM/BUILD/gitui-0.26.2) #2249

Closed
vt-alt opened this issue May 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@vt-alt
Copy link

vt-alt commented May 29, 2024

Describe the bug
Build failure on v0.26.2.

23:55:10      Running `/usr/src/RPM/BUILD/gitui-0.26.2/target/release/build/gitui-4e6f46c82522e156/build-script-build`
23:55:10 error: failed to run custom build command for `gitui v0.26.2 (/usr/src/RPM/BUILD/gitui-0.26.2)`
23:55:10
23:55:10 Caused by:
23:55:10   process didn't exit successfully: `/usr/src/RPM/BUILD/gitui-0.26.2/target/release/build/gitui-4e6f46c82522e156/build-script-build` (exit status: 101)
23:55:10   --- stderr
23:55:10   thread 'main' panicked at build.rs:19:5:
23:55:10   Can not get git commit: No such file or directory (os error 2)
23:55:10   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To Reproduce
Offline (no network access) build with a vendoring cargo build -j20 --offline --release.

Screenshots
If applicable, add screenshots to help explain your problem.

Context (please complete the following information):

  • OS/Distro: ALT Linux Sisyphus
  • GitUI Version: v0.26.2
  • Rust version: rustc 1.78.0 (9b00956e5 2024-04-29) (built from a source tarball)
  • cargo 1.78.0
@vt-alt vt-alt added the bug Something isn't working label May 29, 2024
@vt-alt
Copy link
Author

vt-alt commented May 29, 2024

And yes build is from .src.rpm (like a tarball), not from the git repo so there is no .git dir. I'd suggest you provide get_git_hash replacement with env var that we can set while building the package.

@extrawurst
Copy link
Owner

should be fixed via #2187 right?

@vt-alt
Copy link
Author

vt-alt commented May 30, 2024

should be fixed via #2187 right?

Looks good.

JFYI. When building RPM package from src.rpm (from RPM spec) there is still no commit id by default, so for downstream distributions it would be more handy to add rpm release into it to identify the source. Currently I put %release rpm tag there so it looks like this (for gitui-0.26.2-alt1):

builder@x86_64:~$ gitui --version
gitui 0.26.2 2024-05-29 (alt1)

@hemedani
Copy link

hemedani commented Sep 23, 2024

I have the same error in v0.26.3

error: failed to run custom build command for `gitui v0.26.3`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installteGXIB/release/build/gitui-a0d8ba9ca5b9f760/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /home/syd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.26.3/build.rs:24:5:
  Can not get git commit: No such file or directory (os error 2)
  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 `gitui v0.26.3`, intermediate artifacts can be found at `/tmp/cargo-installteGXIB`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants