[erlang-questions] Reproducible Erlang builds - still some time stamps
Björn-Egil Dahlberg
wallentin.dahlberg@REDACTED
Thu Jun 9 21:04:57 CEST 2016
For beam and beam.smp there is a define, ERLANG_COMPILE_DATE, set that
holds the compile date for debugging purposes. It it used when generating
an erl_crash.dump or for etp when viewing core (it reads a global symbol)
files.
You can turn off ERLANG_COMPILE_DATE usage with configure option:
--disable-saved-compile-time
// Björn-Egil
2016-06-09 19:31 GMT+02:00 Pjotr Prins <pjotr.public12@REDACTED>:
> Hi all,
>
> We noticed the great improvement in the recent release of Erlang, but
> there are still some problems. Leo found the following:
>
>
> ----- Forwarded message from Leo Famulari <leo@REDACTED> -----
>
> Date: Tue, 24 May 2016 12:07:10 -0400
> From: Leo Famulari <leo@REDACTED>
> To: Pjotr Prins <pjotr2016@REDACTED>
> Subject: Re: [v3] Erlang
> User-Agent: Mutt/1.6.0 (2016-04-01)
>
> Sort of! The compiler does reproducibly build the attached
> helloworld.erl.
>
> But, the Erlang package itself does not build repeatedly. I've attached
> the diffoscope report (in HTML format) of two build iterations from my
> machine.
>
> Basically, there are still timestamps in 'lib/erlang/erts-8.0/bin/beam'
> and it's neighbour, 'beam.smp'.
>
> There are also a variety of files that include lines like:
>
> "%%%·This·file·was·automatically·generated·by·snmpc_mib_to_hrl·version·5.2.3
> %%%·Date:·24-May-2016::15:33:12"
>
> I remember finding the code that generates these lines and thinking it
> should not be too hard for us to patch. I could crudely replace the
> timestamp generator with "1", or an Erlang programmer could make it
> respect SOURCE_DATE_EPOCH.
>
> Or, should we contact Erlang to see if they can fix these issues before
> the final release?
>
> On Tue, May 24, 2016 at 03:44:08PM +0200, Pjotr Prins wrote:
> > Does it work?
> >
> > On Mon, May 23, 2016 at 02:59:14PM -0400, Leo Famulari wrote:
> > > On Mon, May 23, 2016 at 01:48:11PM +0200, Pjotr Prins wrote:
> > > > Good news. The changelog for
> > > >
> > > > http://erlang.org/download/OTP-19.0-rc1.README
> > > >
> > > > says that
> > > >
> > > > OTP-13504 Application(s): compiler
> > > >
> > > > The compiler will no longer put the compilation date
> > > > and time into BEAM files. That means that two BEAM
> > > > files compiled on the same computer from the same
> > > > source code and compilation options will be identical.
> > > >
> > > > Note: If you want to find out whether a BEAM file on
> > > > disk is different from the loaded code, compared the
> > > > MD5 value obtained from Mod:module_info(md5) with the
> > > > MD5 value obtained from beam_lib:md5(BeamFileForMod)`
> > > >
> > > > This means that Erlang and Elixir may go into GNU Guix :)
> > >
> > > Indeed, great news :) I will try building it with Guix today.
> > >
> >
> > --
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160609/617d0f40/attachment.htm>
More information about the erlang-questions
mailing list