#20172·mono

mono builds are nondeterministic

Author: bmwiedemannCreated Jul 28, 2020Updated Aug 1, 2026

While working on reproducible builds for openSUSE, I found that .exe and .dll files produced by mono differ in every build, even when reducing environmental differences to a minimum.

Originally filed at https://bugzilla.suse.com/show_bug.cgi?id=1141502

Steps to Reproduce

  1. on openSUSE, install required packages zypper in osc build build-compare mono-devel
  2. build an openSUSE C# package with mono twice osc checkout openSUSE:Factory/smuxi && cd $_ && for n in 1 2 ; do osc build --noservice --keep-pkgs=rpms-$n ; done
  3. compare results /usr/lib/build/pkg-diff.sh rpms-[12]/smuxi-engine-1*noarch.rpm

Current Behavior

.exe and .dll files differ for every build

diff
--- old /usr/lib/smuxi/smuxi-engine.dll (monodis)
+++ new /usr/lib/smuxi/smuxi-engine.dll (monodis)
@@ -52,7 +52,7 @@
 }
 .assembly extern ServiceStack.Text
 {
-  .ver 3:5:7:21894
+  .ver 3:5:7:21932
 }
 .assembly extern System.Xml
 {

Expected Behavior

It should be possible to get bit-identical build results later on another machine. See https://reproducible-builds.org/ for why this matters.

On which platforms did you notice this

[ ] macOS [X] Linux [ ] Windows

Version Used:

mono-devel-6.8.0

The only thing I could find on the topic was https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851809 and that is probably unrelated.