Trying to cross-compile rsync 3.2.3 for an M1 Mac

Fred Fugate unclefreddie70 at gmail.com
Wed Jan 5 03:38:21 UTC 2022


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20220104/2447c634/attachment.htm>


More information about the rsync mailing list