[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reproducible builds and GHC interface and profiling files



Joachim Breitner:
> Am Freitag, den 14.02.2014, 13:39 +0100 schrieb Jérémy Bobbio:
> > > Do you have the files somewhere? It would be most useful to compare the
> > > outputs of
> > > $ ghc --show-iface .....hi
> > > and see where exactly the difference comes from. If there is low hanging
> > > fruit, I can probably fix the compiler in that direction.
> > 
> > ----- ./usr/lib/haskell-packages/ghc/lib/setenv-0.1.0/ghc-7.6.3/System/SetEnv.p_hi
> > Binary file ./usr/lib/haskell-packages/ghc/lib/setenv-0.1.0/ghc-7.6.3/System/SetEnv.p_hi differ
> > -  interface hash: 1db1fab02627c0f77aa952b9554052b7
> > +  interface hash: 33614db8aba45095e66e4b1635e54661
> > 
> > These last two lines are the only difference when comparing the output
> > of `ghc --show-iface` on these files. Is it possible for the interface
> > hash computation to capture the path of the build or the current time?
> 
> I don’t think the current time affects it, otherwise we would never have
> any reproducibility. Same for the path: I sometimes built a library
> locally that was sitting in NEW (uploaded by someone else), built my
> package against that, uploaded them, and when NEW got processed it fits.
> Unlikely that anyone elses’ build path starts with /home/jojo.
> 
> It is even more surprising when only profiling data hashes change.

In the case of haskell-setenv, I can see the very same difference in
both the interface and the profiling data.

----- ./usr/lib/haskell-packages/ghc/lib/setenv-0.1.0/ghc-7.6.3/System/SetEnv.hi
Binary file ./usr/lib/haskell-packages/ghc/lib/setenv-0.1.0/ghc-7.6.3/System/SetEnv.hi differ
-  interface hash: 1db1fab02627c0f77aa952b9554052b7
+  interface hash: e814604673f979374f05f7e493f006bf
----- ./usr/lib/haskell-packages/ghc/lib/setenv-0.1.0/ghc-7.6.3/System/SetEnv.p_hi
Binary file ./usr/lib/haskell-packages/ghc/lib/setenv-0.1.0/ghc-7.6.3/System/SetEnv.p_hi differ
-  interface hash: 1db1fab02627c0f77aa952b9554052b7
+  interface hash: e814604673f979374f05f7e493f006bf

> Also, I would somehow expect that if no other information in `ghc
> --show-iface` changes, that then the hash should be the same. You did
> rebuild against identical dependencies, did you? In what respect did the
> environments differ?

I have posted a small howto on the reproducible-builds mailing list:
https://lists.alioth.debian.org/pipermail/reproducible-builds/Week-of-Mon-20140210/000045.html

To the best of my knowledge, done like described in that email, the only
variations are build path and system clock. Maybe readdir() file
ordering.

I won't have the time to investigate this matter further until a couple
of weeks. I will still probably be reachable on IRC or through email if
you want to look at it and have any follow-up questions.

-- 
Lunar                                .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   

Attachment: signature.asc
Description: Digital signature


Reply to: