-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Here is a compilation issue of RabbitMQ, it's related to Elixir and mix, so I'm also posting it here to look for some help.
=====================================================================
We are using RabbitMQ in a commercial product, which delivers the installation package(with RabbitMQ included) to customer.
So it requires all the binary files in the package are consistent between different compiles, under a given release of source code.
We are compiling RabbitMQ 3.8.14 with erlang 23.0 and Elixir 1.10.4. The compilation process is run inside a chroot environment, which was built by running "yum install basesystem erlang elixir ... ", the yum repos are fixed.
We have a tool for comparing 2 compilation results, and it complains about some binary files are inconsistent. Those are:
Elixir.Collectable.beam
Elixir.CSV.Encode.beam
Elixir.Enumerable.beam
Elixir.IEx.Info.beam
Elixir.Inspect.beam
Elixir.JSON.Decoder.beam
Elixir.JSON.Encoder.beam
Elixir.List.Chars.beam
Elixir.RabbitMQ.CLI.Core.DataCoercion.beam
Elixir.String.Chars.beam
The above files are extracted from "rabbitmqctl" file.
I've made some digging into the makefiles, it seems the make process compiles something from elixir into rabbitmqctl using the "mix" command. But what happens inside "mix" is just beyond my capability.
Another point is this inconsistency only happens when the two compiles are executed on different machines, which is weired because the chroot environment should block the difference of hostos. Also actually the different machines are installed with the same host images.
Acually we have some tools to fix some variables(timestamps, randoms, etc) through the compilation process, but I just don't know where to "fix". Could anyone help to figure it out?