Trying to cross-compile rsync 3.2.3 for an M1 Mac

2022-01-04 Thread Fred Fugate via rsync
Hi,

On an Intel Mac, I'm trying to cross-compile rsync 3.2.3 for an M1 Mac. I
configured like this:

./configure \
CFLAGS='-target arm64-apple-macos' \
--host=aarch64-apple-darwin \
--prefix=/opt/fred \
--with-rsyncd-conf=/opt/fred/etc/rsyncd.conf  \
--disable-openssl \
--disable-xxhash \
--disable-zstd \
--disable-lz4 \
--disable-simd



configure ran well enough, but unfortunately I'm running into the following
issue at the end of the compilation:

[SNIP...]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:56:9:
note: previous definition is here
#define snprintf(str, len, ...) \
^
1 warning generated.
gcc -I./zlib -I./popt -target arm64-apple-macos -DHAVE_CONFIG_H -Wall -W
 -o rsync flist.o rsync.o generator.o receiver.o cleanup.o sender.o
exclude.o util.o util2.o main.o checksum.o match.o syscall.o log.o backup.o
delete.o options.o io.o compat.o hlink.o token.o uidlist.o socket.o
hashtable.o usage.o fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
progress.o pipe.o lib/md5-asm-x86_64.o  params.o loadparm.o clientserver.o
access.o connection.o authenticate.o lib/wildmatch.o lib/compat.o
lib/snprintf.o lib/mdfour.o lib/md5.o lib/permstring.o lib/pool_alloc.o
lib/sysacls.o lib/sysxattrs.o  zlib/deflate.o zlib/inffast.o zlib/inflate.o
zlib/inftrees.o zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o
zlib/crc32.o popt/findme.o  popt/popt.o  popt/poptconfig.o popt/popthelp.o
popt/poptparse.o -liconv

ld: warning: ignoring file lib/md5-asm-x86_64.o, building for macOS-arm64
but attempting to link with file built for unknown-x86_64

Undefined symbols for architecture arm64:
  "_md5_process_asm", referenced from:
  _md5_update in md5.o

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see
invocation)

make: *** [rsync] Error 1




It seems that the rsync source tarfile includes lib/md5-asm-x86_64.S, but
for my compilation to work, I need a file called lib/md5-asm-aarch64.S ?

Where would I get this file? (or how would I build my
own lib/md5-asm-aarch64.S ?)


Thanks,
Fred
-- 
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: --copy-unsafe-links unexpected behavior with unsafe symlinks

2022-01-04 Thread Wayne Davison via rsync
To be extra clear (since I was overly terse in my hasty answer), here's
your last example fixed for you:

$ cd ~/dev
$ rsync --copy-unsafe-links -aivz --delete ~/tmp/TST/tree/
~/tmp/XXX/tree/

This is how rsync knows where the safe restriction lies -- at the top of
the transfer (the final slash). Thus, your statement about your desired
restriction not being possible is false.

..wayne..
-- 
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