Skip to content

bootstrap is not reproducible wrt -j value #9507

@bmwiedemann

Description

@bmwiedemann

While working on reproducible builds for openSUSE, I found that our ocaml-dune 3.12.1 package varies depending on the amount of parallelism.

Expected Behavior

Build output should be deterministic - as it still was in the previous version 3.11.1

Actual Behavior

Binaries produced by -j 1 and -j 4 vary even in length.
A diff of strings output looks thus:

 camlDune_rules__Package_db__fun_2964                                           
-camlOpamSystem__303
 camlDune_engine__Action_exec__fun_5160
 camlDune_engine__Action_builder0__code_begin
+camlStdune__Signal__3410
 camlDune_re__Core__witness_2586
 camlDune_rules__Modules__fun_4126
+camlNotty_uucp_data__16639
 camlDune_rpc_impl__fun_970
[...snipped...]

one created a _boot/compiled_ml_files and the other a _boot/mods_list. Build logs also differ a lot.

Reproduction

  • PR with a reproducing test:
  1. on openSUSE or Debian
#!/bin/sh
osc co openSUSE:Factory/ocaml-dune && cd $_ || exit 1
for N in 1 2 ; do
    osc build -j $N --vm-type=kvm --noservice --no-preinstallimage --keep-pkg=RPMS.$N
    unrpm RPMS.$N/ocaml-dune-*.x86_64.rpm
    strings usr/bin/dune > $N.strings
done
diff -u {1,2}.strings

Specifications

  • Version of dune (output of dune --version): 3.12.1
  • Version of ocaml (output of ocamlc --version): 4.14.1
  • Operating system (distribution and version): openSUSE Tumbleweed 20231213

Additional information

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions