asciinema / agg

asciinema gif generator
Apache License 2.0
1.12k stars 38 forks source link

Build: How to build (or just install pre-build) on latest Debian 11 #41

Closed buhtz closed 1 year ago

buhtz commented 1 year ago

As reported in #41 I'm not able to build agg on Debian 11 because the build system on Debian 11 (which is currently the latest stable) is to old for your repo.

For someone who is not familiar with rust eco system how can I build your software?

Or is there a pre-build deb-file for Debian 11?

Build and install rust/cargo from upstream is not recommended on any GNU/Linux distro. Hope there is a more elegant way. But if not maybe you should explain (or link) how to do this. e.g. https://doc.rust-lang.org/cargo/getting-started/installation.html ? Your README mention "rustup" which is unclear what it is. Looks like a Windows binary.

buhtz commented 1 year ago

The build with the current latest cargo seems to work. Now I have a binary in target/release. But how do I install it?

"Just copy to PATH" is not my job as a user. There should be a packaging system. Is there a way in rust universe?

ku1ik commented 1 year ago

I'm not really sure what you're expecting here, but the build instructions worked fine so far for anyone who tried to build from source. Also, there are prebuilt binaries for those who prefer that.

"Just copy to PATH" is not my job as a user.

It's not my job as a developer of this software to package it for Debian. Or for that matter to package it at all (: I provide the source code.

However, I agree that stating lowest supported version of rust/cargo in build instructions (which you raised in #40) would be useful, so let's take it from there).

buhtz commented 1 year ago

No need for a distro specific packaing of course.

I'm from Python and there you can create and install something like package directly from an upstream repo (if it is correct setuped').

Where can I find "prebuild binaries" for ARM GNU/Linux?

ku1ik commented 1 year ago

Indeed there's a way to build + install in $PATH:

cargo install --path .

This places binary in ~/.cargo/bin/ . As long as you have this dir in $PATH it would just work. I guess we can add that to the README.

Regarding ARM binaries, they're here https://github.com/asciinema/agg/releases/tag/v1.4.1 - agg-arm-unknown-linux-gnueabihf (32-bit), agg-aarch64-unknown-linux-gnu (64-bit).

ku1ik commented 1 year ago

Turns out with cargo one can install directly from git repo without cloning manually first.

This installs binary in ~/.cargo/bin:

cargo install --git https://github.com/asciinema/agg

This installs binary in /usr/local/bin:

cargo install --git https://github.com/asciinema/agg --root /usr/local
ku1ik commented 1 year ago

Just added above instructions to README in https://github.com/asciinema/agg/commit/f72a2a2d3c80ea9a8b478e6cbf32284a21352593

buhtz commented 1 year ago

Great. Thanks for fixing the README. Just remind yourself that your users are not all familiar with the R universe.