Re: rsync static builds 1.6.5 -> 3.4.1 - anyone ?

2026-03-14 Thread RolandK via rsync
since the alpine issues have been fixed now - build receipe/instructions 
for static rsync below.


ok - why using alpine for the build ?

alpine uses musl libc instead of glibc, and musl is designed to support 
static linking cleanly and reliably — unlike glibc, which can make 
static linking difficult or unpredictable.


because of that, you can build truly portable, self‑contained binaries 
that don’t depend on specific shared libraries being present on the host*.*


you may have seen error messages like this for example when statically 
linking with glibc based distro:  "warning: Using 'getpwnam_r' in 
statically linked applications requires at runtime the shared libraries 
from the glibc version used for linking"

**
feedback welcome

regards **
Roland




1. install docker

2. run this script
-
# cat make_rsync.sh
#!/bin/sh

VER=3.4.1

docker run -d --name alpine-edge-container -it alpine:edge /bin/sh
docker exec -it -e VER="$VER" alpine-edge-container /bin/sh -c '
cd /root
apk update
apk upgrade

apk add bash build-base openssl-dev openssl-libs-static zstd-dev 
zstd-static clang  nghttp2-dev nghttp2-static libssh2-dev libssh2-static 
zlib-static acl-dev acl-static attr-dev openssl-libs-static openssl-dev 
lz4-dev lz4-static xxhash-dev xxhash-static py3-commonmark python3 
py3-commonmark attr-dev zlib-dev zlib-static popt-dev popt-static perl


rm rsync-$VER.tar.gz
wget https://download.samba.org/pub/rsync/src/rsync-$VER.tar.gz

tar xzvf rsync-$VER.tar.gz
cd rsync-$VER
./configure CFLAGS="-static"
make -j $(nproc)
strip rsync
'

docker cp alpine-edge-container:/root/rsync-$VER/rsync rsync-$VER-static
-

3.
if you need older versions, here is a list how to adjust CFLAGS and 
configure options. Mind that with 2.2.1 and below, sources need to be 
patched appropriately


3.4.1 CFLAGS="-static" ./configure
3.4.0 CFLAGS="-static" ./configure
3.3.0 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.7 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.6 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.5 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.4 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.3 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.2 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.1 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure
3.2.0 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu18" 
./configure --disable-simd
3.1.3 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.1.2 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.1.1 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.1.0 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.9 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.8 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.7 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.6 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.5 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.4 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.3 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.2 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.1 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
3.0.0 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.9 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.8 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.7 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.6 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.5 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.4 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.3 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.2 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.1 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.6.0 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.5.7 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.5.6 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.5.5 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.5.4 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.5.3 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.5.2 CFLAGS="-static -Wno-incompatible-pointer-types -std=gnu90" 
./configure
2.5.1 CFLAGS="-static

Re: rsync static builds 1.6.5 -> 3.4.1 - anyone ?

2026-03-08 Thread Roland privat via rsync
> do you have the patches to the Makefile?

the makefile didn‘t need any modification.

> memory to cheap and disk is cheaper

did I miss the bursting of the AI bubble? 

regards

> Am 08.03.2026 um 06:48 schrieb matthew patton :
> 
> do you have the patches to the Makefile?
> 
> IMO most 'base' utilities should be built static in the first place.
> memory to cheap and disk is cheaper. Shared-libs are just begging for 
> supply-chain attacks (nee garbage like NPM)


-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync static builds 1.6.5 -> 3.4.1 - anyone ?

2026-03-07 Thread matthew patton via rsync
do you have the patches to the Makefile?

IMO most 'base' utilities should be built static in the first place.
memory to cheap and disk is cheaper. Shared-libs are just begging for 
supply-chain attacks (nee garbage like NPM)

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


Re: rsync static builds 1.6.5 -> 3.4.1 - anyone ?

2026-03-07 Thread matthew patton via rsync
do you have the patches to the Makefile?

IMO most 'base' utilities should be built static in the first place.
memory to cheap and disk is cheaper. Shared-libs are just begging for 
supply-chain attacks (nee garbage like NPM)

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html