<div dir="ltr">Note that even if you strip the date, and any other things depending on the environment where you compiled the code, like file paths on the local machine, the resulting file will still depend on the version of the compiler. Changes in optimizations made (and of course any new beam operations) between releases of OTP will make the generated beam code different, even if it's just for some functions here and there. If you're aiming for some more universal property of the code, a hash of the parse tree (after preprocessor expansions, n.b.) would be more suitable - but then of course, it's hard to prove that the beam code corresponds to that parse tree.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><br>        /Richard</div></div>
<br><div class="gmail_quote">2016-04-04 21:59 GMT+02:00 Joe Armstrong <span dir="ltr"><<a href="mailto:erlang@gmail.com" target="_blank">erlang@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I think I've asked this before but cannot find the answer:<br>
<br>
I want the beam file produced by<br>
<br>
  $ erl file.erl<br>
<br>
to always have the same sha1 checksum - there was, if I remember<br>
correctly, a hidden flag that removed the time of compilation etc from<br>
the beam code. Any ideas how to do this?<br>
<br>
/Joe<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div>