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

Please provide precompiled binaries #72

Open
Richie765 opened this issue Jul 19, 2020 · 11 comments
Open

Please provide precompiled binaries #72

Richie765 opened this issue Jul 19, 2020 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@Richie765
Copy link

Compiling from source isn't trivial and build instructions are underdocumented and requires root access to install required dev packages. Updating such a basic utility doesn't justify the amount of work involved.

The latest of the major distro's ship with older versions of rsync that contain trivial bugs.

  • ubuntu 20.04 - v3.1.3
  • centos - v3.1.2
  • Debian 10 - 3.1.3

It would help a lot if latest precompiled static binary and/or rpm/deb packages were made available.

@WayneD WayneD added the enhancement New feature or request label Jul 21, 2020
@WayneD WayneD self-assigned this Jul 21, 2020
@WayneD
Copy link
Member

WayneD commented Jul 21, 2020

I won't be making any statically linked binaries available in order to make sure that we are on the right side of any license issues distributing openssl crypto & xxhash in a GPL app. Someone is free to produce their own (non redistributed) statically linked version though (or to leave out xxhash & libcrypto).

I did make the CI builds save off their (dynamically linked) rsync builds in github Artifacts. You can click on the Actions tab and look at the most recent build to see them.

I also made a few builds from the testing build farm available here: https://download.samba.org/pub/rsync/binaries/

I don't have control over the configuration of most of those hosts, though, so a lot of them are sadly lacking xxhash, zstd, etc.

@Richie765
Copy link
Author

I did not know about those binaries, that is helpful.

@nPHYN1T3
Copy link

I came across this because lately rsync has been just hanging and never finishes a backup. So I tried to double check args to ensure nothing was conflicting...nope all should be good...hell let's just build from source, package is very old, perhaps this is fixed in a newer. ./configure just spits out missing dependency warnings but never actually says what it needs. So I do best guessing trying to find what it's actually after...to no avail.

I guess the best middle ground to avoid said licensing issues is just update/improve the build instructions. I've got a VM I'm ruining with "kitchen sink" style installs trying to find the stupid libs it wants rather than --disable-EVERYTHING! heh.

@Richie765
Copy link
Author

After some hairpulling I got it working like this. It can be used as a starting point for the docs. Not sure if it is the complete story though.

# centos
sudo yum install libcrypto
sudo yum install openssl-devel
sudo yum install xxhash-devel
sudo yum install lz4-devel
sudo yum install libzstd-devel

# ubuntu
sudo apt install libssl-dev
sudo apt install libxxhash-dev
sudo apt install libzstd-dev
sudo apt install liblz4-dev

# both
./configure
make
sudo make install

@nPHYN1T3
Copy link

nPHYN1T3 commented Jul 23, 2020

No need to pull your hair out but I appreciate the heads up. Part of what makes this a suck fest is what you've illustrated. One distro calls is libXXX the other calls it XXX-del-lib. The lack of consistency in packages can make tracking this down a PITA unless you're already in the know. I can see why I couldn't find the ssl, because I was looking for OPENssl but the package is just libssl. This is one of those times I want to say "Can't we just agree on a naming convention?!" but then a obnoxious voice comes from behind "Similarity breeds in weakness." It would be nice if the build process had some interface to track the dependencies down on a specific platform to give the user a better picture to complete the build. Alternately package maintainers for distros could just leave build dependencies and flags in the package description. Might not be perfect if something changes between the old distro binary and a new source version but every breadcrumb helps.

Sadly tried sudo apt install libssl-dev libxxhash-dev liblz4-dev libzstd-dev and much like when I was hunting there is no xxhash in 18.04.04.

@WayneD
Copy link
Member

WayneD commented Jul 24, 2020

I wrote up some package details in the latest INSTALL.md file. You can see the html version here: https://download.samba.org/pub/rsync/INSTALL

If folks have hints for other OSes, let me know.

@Richie765
Copy link
Author

Oh wow, the install instructions look very clear now! 👍

@nPHYN1T3
Copy link

nPHYN1T3 commented Aug 25, 2020

So I just tried to build again, no dice. I suspect this is an issue because I'm building on 18.04.5 and despite the packages being installed there is no aclocal in path. I tried to add the full path to prepare-source.mak but still no dice...

I noticed on the https://download.samba.org/pub/rsync/INSTALL page the commands are wrong for debian. I suspect the syntax is again for a newer build as the -y flag does not work with apt in 18.04 only apt-get.

acl is already the newest version (2.2.52-3build1).
libacl1-dev is already the newest version (2.2.52-3build1).

aclocal -I m4
make: aclocal: Command not found
prepare-source.mak:7: recipe for target 'aclocal.m4' failed
make: *** [aclocal.m4] Error 127
Failed to build configure.sh and/or config.h.in -- giving up.

Looks like my knowledge is too limited to build for 18.XX.XX period. Which is frustrating as I have been testing and it's always the same. (v3.1.2) rsync -vvv --progress --stats --update --delete-after --info=progress2 --debug=ALL either hangs for insanely long times (think days) and/or just completely stops giving me any output to judge things by. I'd expect with all those flags the thing should be flooding me with more info than I can fathom but it just outputs for a while...then goes silent with no error/warning.

As a note I'm not sending huge files where the hang might be checksums being calculated over a slow network or something. Network is all internal 1gb and we're talking mp3's, pictures, odt's, svg's. Where there are a few larger files when it syncs say my raw DAW files these hangs happen long before it gets there on small crap. Files that at most might be 20mb a pop. It rockets through a few hundred...then stops dead...or seems to. Sorry if this is off topic from compiled bins. However the need for current bins is because of problems like this and the inability to build. Catch 22...Catch 22!

As a secondary note there was a bug (it's been a while and I don't have the # or link) that looked like I was getting that should have been fixed in the newer binary hence why I've been fishing to build or find a newer compiled version. However I also found another note somewhere that seems to be why my "ultra verbose" settings were actually working against me. Some interim memory used can become overwhelmed with logs and I think that was triggering the deaths. Things would work fine until that memory or buffer filled, then it died/hung leaving me with no output as to why. I sure hope this is fixed in future versions because it's ironic that debug output to debug can kill the debug process. Never mind with my workstation having a meager 64gigs of RAM it's insane to think the application doesn't have enough "memory" to continue logging or outputting.

@dr-who
Copy link

dr-who commented Sep 28, 2021

I know this is an old issue, but I just posted an issue where we tracked the same thing down to the third v. If we just have one or two v it works fine.

@nh2
Copy link

nh2 commented Dec 27, 2021

You can use the nix package manager with its nixpkgs package repository to get static rsync executables.

I've done this here for 64-bit Linux: rsync-v3.2.3-static download

Nixpkgs makes it easy to override declared packages programmatically, which enables switching from the default linkage (dynamic, glibc) to other modes (static, musl libc). In nixpkgs, pkgsStatic is a sub package tree that does this for lots of software.

Some examples:

  • nix-shell -p pkgsStatic.rsync - drops you into a shell where a statically linked rsync is available.
    Click to expand rsync version info ``` $ rsync --version rsync version 3.2.3 protocol version 31 Copyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others. Web site: https://rsync.samba.org/ Capabilities: 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, no socketpairs, hardlinks, no hardlink-specials, symlinks, no IPv6, atimes, batchfiles, inplace, append, ACLs, xattrs, optional protect-args, iconv, symtimes, prealloc, stop-at, no crtimes Optimizations: no SIMD, asm, openssl-crypto Checksum list: xxh128 xxh3 xxh64 (xxhash) md5 md4 none Compress list: zstd lz4 zlibx zlib none ```
  • nix-build --no-out-link '<nixpkgs>' -A pkgsStatic.rsync - Just builds a statically linked rsync, and prints is path to stdout. The binary is in the bin/rsync subdir.

The nix package for rsync is defined here (stable link). It has options at the top for easy overriding. You can use this to disable enableOpenSSL and enableXXHash to address licensing concerns as expressed in #72 (comment). I've done that for my download above.

Example:

  • nix-build --no-out-link --expr 'with import <nixpkgs> {}; pkgsStatic.rsync.overrideAttrs (old: { configureFlags = (old.configureFlags or []) ++ [ "--disable-openssl" "--disable-xxhash" ]; })'
    Click to expand rsync version info ``` rsync version 3.2.3 protocol version 31 Copyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others. Web site: https://rsync.samba.org/ Capabilities: 64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints, no socketpairs, hardlinks, no hardlink-specials, symlinks, no IPv6, atimes, batchfiles, inplace, append, ACLs, xattrs, optional protect-args, iconv, symtimes, prealloc, stop-at, no crtimes Optimizations: no SIMD, asm, no openssl-crypto Checksum list: md5 md4 none Compress list: zstd lz4 zlibx zlib none ```
  • Soon you can also use this simpler expression: nix-build --no-out-link --expr 'with import <nixpkgs> {}; pkgsStatic.rsync.override (old: { enableOpenSSL = false; enableXXHash = false; })'

After you have built a static binary with nix, you can of course copy it off-system, and it will run standalone on all Linux distributions by nature of being a static binary.

@kkocdko
Copy link

kkocdko commented May 21, 2024

Today is 2024 May 21. For newer version, we provided this:

asset_rsync_3.3.0_9173891612

linux-x64/linux-arm64 (Static link with MUSL libc), win-x64 (with msys2), mac-arm64.

Features enabled: xxhash, zstd . Features disabled: openssl, lz4 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants
@WayneD @nh2 @Richie765 @dr-who @kkocdko @nPHYN1T3 and others