Hi,

On 2025-08-14 18:34, Antoine Le Gonidec wrote:
> > Please extend mono's Architecture list with riscv64 and loong64 which
> > should will be in the release architectures shortly. Upstream seems to
> > support both architectures.
> 
> I added both architectures, they should be included in the next release
> I send to either unstable or experimental:
> https://salsa.debian.org/dotnet-team/mono/-/commit/5a7287d0b

Thanks,

> Please consider testing that mono packages actually build and run on
> these architectures, and report any problem you might find.

Indeed, upstream support is not enough, at least for riscv64 some tweaks 
are needed for debian/rules and debian/mono-archs.make. In that regard 
riscv64 is quite similar to arm64, with no boehm support. The attached patch 
makes the build to got a bit further, it now fails with:

| *** The runtime 'mono' doesn't appear to be usable.
| *** Trying the 'monolite-linux/1A5E0066-58DC-428A-B21C-0AD6CDAE2789' 
directory.
| * Assertion: should not be reached at mini-riscv.c:448
| 
| 
| =================================================================
|         Native Crash Reporting
| =================================================================
| Got a SIGABRT while executing native code. This usually indicates
| a fatal error in the mono runtime or one of the native libraries 
| used by your application. 
| =================================================================

I'll try to debug that, but that's already a first step.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                     http://aurel32.net
--- mono-6.14.1+ds/debian/mono-archs.make
+++ mono-6.14.1+ds/debian/mono-archs.make
@@ -1,4 +1,4 @@
 DEB_MONO_BOEHM_ARCHS = amd64 armel armhf i386 mipsel kfreebsd-amd64 kfreebsd-i386 powerpc ppc64 ppc64el s390x
-DEB_MONO_ARCHS = $(DEB_MONO_BOEHM_ARCHS) arm64
+DEB_MONO_ARCHS = $(DEB_MONO_BOEHM_ARCHS) arm64 riscv64
 DEB_MONO_SGEN_ARCHS = $(DEB_MONO_ARCHS)
 
--- mono-6.14.1+ds/debian/rules
+++ mono-6.14.1+ds/debian/rules
@@ -40,6 +40,9 @@
 else ifeq ($(DEB_HOST_ARCH), ppc64el)
 	CONF_FLAGS += --with-tls=pthread
 	BTLS_ARCH = true
+else ifeq ($(DEB_HOST_ARCH), riscv64)
+	SKIP_LIBGC = true
+	BTLS_ARCH = true
 else ifeq ($(DEB_HOST_ARCH), s390x)
 	BTLS_ARCH = true
 endif
@@ -51,7 +54,7 @@
 endif
 
 # Skip building Boehm's gargabe collector on unsupported architectures.
-ifeq ($(DEB_HOST_ARCH), arm64)
+ifeq (,$(findstring $(DEBHOST_ARCH),$(DEB_MONO_BOEHM_ARCHS)))
 	DISABLE_BOEHM = true
 endif
 ifdef DISABLE_BOEHM

Attachment: signature.asc
Description: PGP signature

Reply via email to