I'm trying to install
rabbitmq-server on Ubuntu 20.04 with FIPS enabled, and I saw that erlang DEB default packages doesn't have it compiled in them. I read this guide - https://www.erlang.org/doc/apps/crypto/fips.html and built erlang from source with the
--enable-fips flag, and it was successfully built and installed, with all the libs in
Now I tried to also build rabbitmq-server from source (Since the DEB package depends on the erlang packages which I don't want to install) and it seems like it fails to find a certain erlang package -
$ make make: Entering directory '/home/ubuntu/rabbitmq-server/deps/rabbit_common' make: Leaving directory '/home/ubuntu/rabbitmq-server/deps/rabbit_common' make: Entering directory '/home/ubuntu/rabbitmq-server/deps/rabbit' make: Entering directory '/home/ubuntu/rabbitmq-server/deps/rabbit/apps/rabbitmq_prelaunch' make: Leaving directory '/home/ubuntu/rabbitmq-server/deps/rabbit/apps/rabbitmq_prelaunch' make: Entering directory '/home/ubuntu/rabbitmq-server/deps/rabbitmq_cli' GEN escript/rabbitmqctl Resolving Hex dependencies... Resolution completed in 0.028s Unchanged: amqp 2.1.2 csv 2.4.1 dialyxir 0.5.1 json 1.4.1 observer_cli 1.7.4 parallel_stream 1.0.6 recon 2.5.3 stdout_formatter 0.2.4 temp 0.4.7 x509 0.8.7 ==> stdout_formatter Compiling 4 files (.erl) stdout_formatter_table.erl:12:14: can't find include lib "eunit/include/eunit.hrl" could not compile dependency :stdout_formatter, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile stdout_formatter --force", update it with "mix deps.update stdout_formatter" or clean it with "mix deps.clean stdout_formatter" make: *** [Makefile:95: escript/rabbitmqctl] Error 1 make: Leaving directory '/home/ubuntu/rabbitmq-server/deps/rabbitmq_cli' make: *** [../../erlang.mk:4512: deps] Error 2 make: Leaving directory '/home/ubuntu/rabbitmq-server/deps/rabbit' make: *** [erlang.mk:4512: deps] Error 2
I tried to add a different erlang library load just before
kernel/include/file.hrl and it successfully loaded that one.
Also tried strace to see where it look, all I found is that it loads either the
ERL_LIBS or the
DIST_ERL_LIBS variables, tried to set both of them, but the same error.
After a day of debugging, I found out it was because I was using elixir 15 and didn't use the latest rabbitmq-server, I was using 3.11.9 which is not compatible with it..
I have to use 3.11.9 for production reasons, so I downgraded elixir to 14 and it worked.