gitui-org / gitui-org/gitui

building on Pinebook Pro running Manjaro ARM

Aperta
#2,283 7 commenti 2 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Rust
Stelle
22.5k
Fork
773
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Describe the bug**
The latest version of gitui available as a binary on Manjaro ARM is 0.21.0-2, which is too old for me, given the latest release is v0.26.3. So I want to compile the latest version from source.

I have had trouble building gitui on my Pinebook Pro running Manjaro ARM, which is the default Linux distro the laptops ship with (and therefore I assume the best-supported distro, the Pine64 wiki says "The Pinebook Pro is officially supported by the Manjaro ARM project").

I managed to install `aur/gitui-git` with `yay gitui-git`, which of course installs the latest VCS version rather than a stable release. In order to make it compile however, I have to run `export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=gcc` first. I don't know how/why this helps. If I skip that step and run it normally, I get the error:

```
error: linker `aarch64-linux-gnu-gcc` 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: could not compile `typenum` (build script) due to 1 previous error
==> ERROR: A failure occurred in build().
Aborting...
-> error making: gitui-git-exit status 4
-> Failed to install the following packages. Manual intervention is required:
gitui-git - exit status 4
```

If I run `cargo install gitui` to compile the latest stable release, it fails with the error:

```
error[E0308]: mismatched types
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.26.3/src/components/textinput.rs:157:28
|
157 | .set_cursor_line_style(self.theme.text(true, false));
| --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
| |
| arguments to this method are incorrect
|
= note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/style.rs:227:1
|
227 | pub struct Style {
| ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.27.0/src/style.rs:228:1
|
228 | pub struct Style {
| ^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1770:12
|
1770 | pub fn set_cursor_line_style(&mut self, style: Style) {
| ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.26.3/src/components/textinput.rs:160:5
|
159 | text_area.set_placeholder_style(
| --------------------- arguments to this method are incorrect
160 | / self.theme
161 | | .text(self.selected.unwrap_or_default(), false),
| |___________________________________________________________________^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
|
= note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/style.rs:227:1
|
227 | pub struct Style {
| ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.27.0/src/style.rs:228:1
|
228 | pub struct Style {
| ^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1850:12
|
1850 | pub fn set_placeholder_style(&mut self, style: Style) {
| ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.26.3/src/components/textinput.rs:164:5
|
163 | text_area.set_style(
| --------- arguments to this method are incorrect
164 | self.theme.text(self.selected.unwrap_or(true), false),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
|
= note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/style.rs:227:1
|
227 | pub struct Style {
| ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.27.0/src/style.rs:228:1
|
228 | pub struct Style {
| ^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1629:12
|
1629 | pub fn set_style(&mut self, style: Style) {
| ^^^^^^^^^

error[E0308]: mismatched types
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.26.3/src/components/textinput.rs:169:6
|
168 | text_area.set_block(
| --------- arguments to this method are incorrect
169 | / Block::default()
170 | | .borders(Borders::ALL)
171 | | .border_style(
172 | | ratatui::style::Style::default()
... |
176 | | )
177 | | .title(self.title.clone()),
| |__________________________________________________^ expected `ratatui::widgets::block::Block<'_>`, found `ratatui::widgets::Block<'_>`
|
= note: `ratatui::widgets::Block<'_>` and `ratatui::widgets::block::Block<'_>` have similar names, but are actually distinct types
note: `ratatui::widgets::Block<'_>` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/widgets/block.rs:64:1
|
64 | pub struct Block<'a> {
| ^^^^^^^^^^^^^^^^^^^^
note: `ratatui::widgets::block::Block<'_>` is defined in crate `ratatui`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.27.0/src/widgets/block.rs:67:1
|
67 | pub struct Block<'a> {
| ^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1648:12
|
1648 | pub fn set_block(&mut self, block: Block<'a>) {
| ^^^^^^^^^

error[E0277]: the trait bound `impl ratatui::widgets::Widget + '_: Widget` is not satisfied
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.26.3/src/components/textinput.rs:644:20
|
644 | f.render_widget(ta.widget(), area);
| ------------- ^^^^^^^^^^^ the trait `Widget` is not implemented for `impl ratatui::widgets::Widget + '_`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `Widget`:
ratatui::text::Line<'_>
Span<'_>
ratatui::text::Text<'_>
BarChart<'_>
ratatui::widgets::Block<'_>
Canvas<'_, F>
Chart<'_>
ratatui::widgets::Clear
and 10 others
note: required by a bound in `ratatui::Frame::<'_>::render_widget`
--> /home/nelson/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/terminal/frame.rs:74:29
|
74 | pub fn render_widget(&mut self, widget: W, area: Rect) {
| ^^^^^^ required by this bound in `Frame::<'_>::render_widget`

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
The following warnings were emitted during compilation:

warning: gitui@0.26.3: buildname 'nightly 2024-06-30 ()'

error: could not compile `gitui` (bin "gitui") due to 5 previous errors
error: failed to compile `gitui v0.26.3`, intermediate artifacts can be found at `/tmp/cargo-installVPKyKO`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

```

**Context (please complete the following information):**
- OS/Distro + Version: Manjaro ARM Linux DISTRIB_RELEASE=24.03
- GitUI Version: gitui nightly 2024-06-30 (3229c5d)
- Rust version: rustc 1.76.0 (07dca489a 2024-02-04) (Arch Linux rust 1:1.76.0-1)
- Cargo version: cargo 1.76.0

> neofetch --off
OS: Manjaro ARM Linux aarch64
Host: Pine64 Pinebook Pro
Kernel: 6.7.9-1-MANJARO-ARM
Uptime: 7 mins
Packages: 1169 (pacman)
Shell: fish 3.7.0
Resolution: 1920x1080
WM: sway
Theme: Breath-Dark [GTK2/3]
Icons: breath2 [GTK2/3]
Terminal: alacritty
Terminal Font: Ubuntu Mono
CPU: (6) @ 1.416GHz
Memory: 974MiB / 3862MiB

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.