amd64 asm/SIMD build failure

Christian Weisgerber naddy at mips.inka.de
Tue Aug 25 13:59:13 UTC 2026


Building rsync with --enable-md5-asm, --enable-roll-simd, or
--enable-roll-asm fails on FreeBSD/amd64.

ld.lld: error: undefined symbol: md5_process_asm
ld.lld: error: undefined symbol: get_checksum1

The configure script accepts both "x86_64" and "amd64" as valid CPU
architectures for this purpose, and substitutes the name into the
Makefile ...

OBJS3=progress.o pipe.o $(MD5_ASM_amd64) $(ROLL_SIMD_amd64) $(ROLL_ASM_amd64)

... but only the *_x86_64 variables are defined in Makefile.in:

ROLL_SIMD_x86_64=simd-checksum-x86_64.o
ROLL_ASM_x86_64=simd-checksum-avx2.o
MD5_ASM_x86_64=lib/md5-asm-x86_64.o

This can be fixed any number of ways; the following diff is just an
example:

--- configure.ac.orig	2026-08-25 13:45:30 UTC
+++ configure.ac
@@ -292,7 +292,11 @@ if test x"$enable_roll_simd" != x"no"; then
 	AC_LANG(C)
 	if test x"$CXX_OK" = x"yes"; then
 	    # AC_MSG_RESULT() is called below.
-	    ROLL_SIMD="$host_cpu"
+	    if test x"$host_cpu" = x"amd64"; then
+		ROLL_SIMD="x86_64"
+	    else
+		ROLL_SIMD="$host_cpu"
+	    fi
 	elif test x"$enable_roll_simd" = x"yes"; then
 	    AC_MSG_RESULT(error)
 	    AC_MSG_ERROR(The rolling-checksum SIMD compilation test failed.
@@ -506,7 +510,11 @@ if test x"$enable_md5_asm" != x"no"; then
 
 if test x"$enable_md5_asm" != x"no"; then
     if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then
-	MD5_ASM="$host_cpu"
+	if test x"$host_cpu" = x"amd64"; then
+	    MD5_ASM="x86_64"
+	else
+	    MD5_ASM="$host_cpu"
+	fi
     elif test x"$enable_md5_asm" = x"yes"; then
         AC_MSG_RESULT(unavailable)
         AC_MSG_ERROR(The ASM optimizations are currently x86_64|amd64 only.
@@ -535,7 +543,11 @@ if test x"$enable_roll_asm" = x"yes"; then
 fi
 
 if test x"$enable_roll_asm" = x"yes"; then
-    ROLL_ASM="$host_cpu"
+    if test x"$host_cpu" = x"amd64"; then
+	ROLL_ASM="x86_64"
+    else
+	ROLL_ASM="$host_cpu"
+    fi
     AC_MSG_RESULT([yes ($ROLL_ASM)])
     AC_DEFINE(USE_ROLL_ASM, 1, [Define to 1 to enable rolling-checksum ASM optimizations (requires --enable-roll-simd)])
     ROLL_ASM='$(ROLL_ASM_'"$ROLL_ASM)"

-- 
Christian "naddy" Weisgerber                          naddy at mips.inka.de



More information about the rsync mailing list