From 51f8285f93fbc96aaa81b1fd9fc39ba0bcbc4820 Mon Sep 17 00:00:00 2001 From: wenjie Date: Wed, 25 Mar 2026 16:59:11 +0800 Subject: [PATCH] fix(build): disable Matrix gateway import on freebsd/arm Exclude the Matrix gateway shim from freebsd/arm builds because modernc.org/libc currently fails to compile on that target. Document the upstream 32-bit FreeBSD codegen mismatch as well. --- pkg/gateway/channel_matrix.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/gateway/channel_matrix.go b/pkg/gateway/channel_matrix.go index f753c60e2..a46addae1 100644 --- a/pkg/gateway/channel_matrix.go +++ b/pkg/gateway/channel_matrix.go @@ -1,4 +1,4 @@ -//go:build !mipsle && !netbsd +//go:build !mipsle && !netbsd && !(freebsd && arm) package gateway @@ -12,6 +12,9 @@ import ( // - netbsd/*: modernc.org/sqlite v1.46.1 fails to compile due to broken // generated mutex code on NetBSD (for example sqlite_netbsd_amd64.go calls // mu.enter/mu.leave, but the generated mutex type does not define them). + // - freebsd/arm: modernc.org/libc v1.67.6 fails to compile due to broken + // generated 32-bit FreeBSD code (size_t/uint64 and int32/int64 mismatches + // in libc_freebsd.go). // // This means Matrix is currently unavailable on those targets. The proper // long-term fix is to split Matrix basic support from its E2EE/sqlite-backed