5 ms·
This looks really cool and I can't wait to try it, tho... a bit of a PITA to get running. ;) Took a while to figure out how to build, and had to install 400MB
by loxias 5y ago
This looks really cool and I can't wait to try it, tho... a bit of a PITA to get running. ;) Took a while to figure out how to build, and had to install 400MB of dependencies first....
Edit: And after installing cargo, watching it fail to build, then determining I must need a newer version of cargo, so I built that from source... it fails. Apparently I need to install `rustc-mozilla` and not `rustc`. "obviously".
This is all a testament to how much I want to try this tool...
MOAR EDIT: even with rustc-mozilla cargo fails to build. running `cargo install difftastic` gives me an error about my version of cargo being too old ;.;
Dear author: Let us run your tool.
- YetAnotherNick 5y agoUsed `cargo install difftastic`? Finished in a minute for me.
- lopatin 5y agoBuild errors for me. Apparently I'm on some nightly build of cargo, but I need 2021 version. The pain begins... Edit: Reinstalling Cargo worked!
- skywal_l 5y agoWith rustup, it's pretty easy to update/change your cargo version.
- loxias 5y agoHow did you do it? When I tried to rebuild cargo I got build errors. I'm starting to suspect the only way to run this tool is make a chroot tracking sid or something....
- lopatin 5y agoI just followed the installation instructions here: https://doc.rust-lang.org/cargo/getting-started/installation.html https://doc.rust-lang.org/cargo/getting-started/installation... It'll confirm that you want to install it, because it's already installed I think, and I just selected 1. for Yes.
- loxias 5y ago> curl https://sh.rustup.rs https://sh.rustup.rs -sSf | sh hard pass :)
- adwn 5y ago> hard pass Why? You're willing to run some random open source project, but you're not willing to run the official Rust installation script?
- chlorion 5y agoI feel the same way, I am just not willing to pipe curl into a shell blindly. Even if this specific instance of curl'ing into sh is safe, or if I download and then run it, it's still extremely poor practice and gives me serious doubts about the developers and their security practices in general. I also do not like when every project decides to poorly reimplement the package manager. If every software used it's own package manager my system would be a complete mess with dozens of different package managers fighting each other and it would be a total nightmare to update the system or manage non-trivial dependency chains when installing something new. Rust is one of my favorite languages but this is definitely my least favorite aspect of it all. It really feels like the developers "optimized" for systems with no package manager.
- a_passable_dev 5y agoOut of curiosity, what would be an acceptable way for the developers to provide a quick way for users to get up and running? A get started guide with all the required commands easily copy-pastable? (A popular option these days) Something else? I don’t mean to be critical, I’m simply curious.
- DangitBobby 5y agoYou could always download it first and eyeball it before running it.
- loxias 5y agoSure, but first I had to figure out wtf "cargo" is. :P Also, `cargo install difftastic` AIUI pulls it from a central location, if I'm gonna poke at software for the first time, I enjoy building it myself first, so I can get my hands dirty in the source. :) EDIT: Also, the build fails. :( "error: unexpected token: `include_str` --> /home/loxias/.cargo/registry/src/github.com-1ecc6299db9ec823/radix-heap-0.4.2/src/lib.rs:2:10 | 2 | #![doc = include_str!("../README.md")] | ^^^^^^^^^^^ error: aborting due to previous error error: could not compile `radix-heap`. sad trombone
- Wilfred 5y agoThis looks like you're using a version of Rust older than the minimum required (1.56).
- gkfasdfasdf 5y agoUsing ubuntu 20.04, I first installed cargo: curl https://sh.rustup.rs -sSf | sh Restart shell to get $HOME/.cargo/bin in PATH, then did: cargo install difftastic And ~4 minutes later, difft executable is ready. Agree though that some pre-built binaries would be fantastic!
- loxias 5y agoAh, well, if you're willing to accept having a frankensystem with a mix of packaged and unpackaged software, sure. ;) I used to do that, back in Slackware days. It's considered really sloppy and unmaintainable to admin a system like that. Things quickly get out of hand. That strategy _does_ work if you isolate it to a chroot or a container, but littering /usr/local with all sorts of locally compiled upstream is just asking for future pain. Security updates, library incompatibilities, &c. Prebuilt binaries might be nice, but I don't expect them for random projects. (and I wouldn't have used them if offered) I do think it's a reasonable expectation to be able to build software w/o essentially setting up a new userland just for that tool though. :)
- jeremyjh 5y agoI agree it leads to problems but isn't the entire purpose of `/usr/local` to be a dumping ground for locally administered (unpackaged) programs?
- gkfasdfasdf 5y agoThe method I posted above doesn't write anything to /usr/local. Root isn't required. Everything is written under ~.
- Wilfred 5y agoThe getting started section of the manual should help: https://difftastic.wilfred.me.uk/getting_started.html https://difftastic.wilfred.me.uk/getting_started.html I've documented the minimum rust version required today, although I'm looking at lowering the minimum version.
- ducktective 5y agoSame here. Looked into repo -> no binary in release or Github actions spinned up a Ubuntu 18.04 instance -> git clone, git checkout 0.24.0 installed rust using curl | sh method build fails: https://termbin.com/29xy https://termbin.com/29xy removed the instance and gonna check it again 6 months later
- adwn 5y agoIn another comment you're asking about vim support. So let me get this straight: You're using vim, yet you're unable to resolve the error message = note: /usr/bin/ld: cannot find Scrt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory Have you tried googling for "ubuntu crti.o: No such file or directory" ?
- joemi 5y agoUsing vim has nothing to do with ones ability to troubleshoot compiler/ubuntu issues. Plus both compiler and ubuntu issues can be massive PITA to solve even if you're familiar with them. Personally, if I'm trying to install something on whim to try it out and I start getting "no such file or directory" errors I'd be upset that something is going wrong.
- ducktective 5y ago>Have you tried googling for "ubuntu crti.o: No such file or directory" ? Depending on the project, there is a certain threshold of trying-to-make-something-work which I'm willing to undertake in order to test an app. But you are right. I'm sorry if my OG comment may come arrogant to the devs who do stuff for free. (♥ to the devs) [edit]: ok, I tried again, `sudo apt update && sudo apt install build-essential` before installing rust and `cargo install`ing. Error again: https://dpaste.com/FTG7FSRQF https://dpaste.com/FTG7FSRQF
- estebank 5y agoFunnily enough, the error is in a C dependency providing Haskell support. vendor/tree-sitter-haskell-src/scanner.cc
- vlunkr 5y agoA huge part of the appeal of Rust and Go tools is that you can just ship a binary, it's frustrating that it's not available here.
- easrng 5y agoNot sure about Go, but Rust still links against glibc, so I sometimes have to recompile things to make them work on my Debian systems if they're built against newer glibc.
- pinsl 5y agoRust can statically link against musl. https://doc.rust-lang.org/reference/linkage.html#static-and-dynamic-c-runtimes https://doc.rust-lang.org/reference/linkage.html#static-and-...
- deleted 5y ago[deleted]
- unhammer 5y agoIf you have nix (package manager) installed, it takes like half a second. For tools I want to install through nixpkgs I make a starter like this: $ cat /usr/local/bin/difftastic #!/bin/sh source $HOME/.nix-profile/etc/profile.d/nix.sh nix run nixpkgs.difftastic -c difftastic "$@" and then it'll install on first run: $ difftastic these paths will be fetched (1.17 MiB download, 9.38 MiB unpacked): /nix/store/wn74xn0w60xcwsly6nqaibn205hh2qms-difftastic-0.8 copying path '/nix/store/wn74xn0w60xcwsly6nqaibn205hh2qms-difftastic-0.8' from 'https://cache.nixos.org'... Difftastic 0.8.0 Wilfred Hughes A syntax aware diff. USAGE: [etc.]
- estebank 5y agoHonest question: how did you arrive to the conclusion you needed rustc-mozilla? I would love to make sure whatever flow led you to that is made clearer for other newcomers, because that is definitely not something anyone that isn't working on Firefox should even try.
- Wilfred 5y agoI imagine it's a misunderstanding with the rustc-hash dependency used in difftastic for faster hashing.