Thanks for the advices, but I believed that because the simulator is a guix 
package, guix would automatically compile it in a container or am I wrong? I am 
not sure that I understand Guix building process enough to understand what is 
going on. Anyway, it is still not reproducible: I tried to rebuild in a shell 
with guix shell -CW, I also tried with a shell done through time machine with 

guix time-machine --channels=channels_file --  shell -CW

and then doing guix build and executing the script, but this was without 
success, still not reproducible. 

I also checked the hash of the packages going into 
/gnu/store/pbhnqd7hw0wgyra8dyzm0z53cbfsvwa2-mujoco-3.3.1 (this is the package I 
am interested in) and with =guix hash -x --serializer=nar .= I got the same 
hash for both Arch and Ubuntu systems so it seems that the compiled packages 
are the same.

There is indeed nothing particularly different in terms of architectures 
between the Arch and Ubuntu Laptop. As mentioned, I also tried on a server 
which runs on Ubuntu and the Ubuntu server (with more powerful CPU) is 
reproducible with Ubuntu Laptop, but not with Arch.

Finally, today I checked the reproducibility on a French testbed server 
(grid5000) which runs on Debian and have a very different architecture from my 
laptop. It gave me the same result as Arch! Which is strange because Debian 
should be closer to Ubuntu than to Arch. Maybe this is not really about the OS, 
could this be due to how guix was installed ? On Arch I installed via the 
script whereas on Ubuntu guix was initially installed through apt.

Thanks,
Timothée

----- Mail original -----
> De: "Steve George" <st...@futurile.net>
> À: "Timothee Mathieu" <timothee.math...@inria.fr>
> Cc: "Ludovic Courtès" <ludovic.cour...@inria.fr>, "Cayetano Santos" 
> <csant...@inventati.org>, "help-guix"
> <help-guix@gnu.org>
> Envoyé: Mercredi 30 Avril 2025 10:41:15
> Objet: Re: Reproducibility of guix shell container across different host OS

> Hi Timothee,
> 
> Did you try building the package in a guix shell container (e.g. --container).
> That way you're assured that nothing from the users main environment is
> impacting the build.
> 
> You mention a C++ code-base, so the most likely thing is some discrepancy in 
> the
> libs that are being used right. So somehow it' using some lib at a different
> version between the Arch and the Ubuntu based systems. If you build inside a
> container there's no chance it's doing so.
> 
> And, I assume we're on the same CPU architecture etc, nothing particularly
> different between the Arch and Ubuntu systems.
> 
> 
> Steve / Futurile
> 
> 
> On 29 Apr, Timothee Mathieu wrote:
>> Thanks. I checked and there is no extra channels.
>> 
>> I also tried to use a system container instead of a shell container and 
>> still,
>> there is a discrepancy.
>> I am a bit baffled because I have no idea what can cause this that would not 
>> be
>> handled by Guix.
>> From what I understand all the low-level maths libraries should be fixed by 
>> Guix
>> so there is not really a lot that should depend on the host OS.
>> Moreover, I tried with different kernels for the host OS and Arch based is 
>> still
>> reproducible with the other Arch Laptop even with very different kernels, but
>> still not reproducible with Ubuntu.
>> I don't know if this is relevant but the code I am testing depend on  a 
>> fairly
>> complex physics simulator that is compiled from C++, in fact this is the
>> package I am trying to have reproducible results on, and we did manage to
>> implement it as a Guix package so it should be reproducible (?).
>> 
>> Timothée
>> 
>> ----- Mail original -----
>> > De: "Ludovic Courtès" <ludovic.cour...@inria.fr>
>> > À: "Timothee Mathieu" <timothee.math...@inria.fr>
>> > Cc: "Cayetano Santos" <csant...@inventati.org>, "help-guix" 
>> > <help-guix@gnu.org>
>> > Envoyé: Jeudi 24 Avril 2025 18:01:38
>> > Objet: Re: Reproducibility of guix shell container across different host OS
>> 
>> > Hello,
>> > 
>> > Timothee Mathieu <timothee.math...@inria.fr> writes:
>> > 
>> >> An oversight, I just now fixed it and reran the experiment, fixing the
>> >> guix-science commit still gives the same discrepancy (I suspect that
>> >> even before we had the same commit because I did a guix pull recently
>> >> for all of these computers).
>> > 
>> > Note that, as a rule of thumb, you should not write ‘channels.scm’ by
>> > hand.  Instead, once you have a satisfying environment, take the output
>> > of:
>> > 
>> >  guix describe -f channels
>> > 
>> > It’s important to do it this way because it may include channels pulled
>> > by the channels you’re interested in, and these dependencies need to be
>> > pinned as well.
>> > 
>> > Ludo’.

Reply via email to