Update to Erlang 24 causing a startup crash - Failed to load NIF library

After updating from Erlang 23 to Erlang 24, I’m seeing a crash on server start-up on my EC2 instance. The error message I’m seeing looks like this.

Apr 28 17:41:20 ip-10-0-1-97.ec2.internal chalcal_metaweb[24056]: "Failed to load NIF library: '/opt/app/lib/wx-2.1.3/priv/erl_gl.so: cannot open shared object file: No such file or directory'"}}}

I know that version 24 of erlang is based on version 3 of wx, but I don’t know how that should change my release process. I wonder if just upping the ERL_VERSION without addressing the change to version 3 of wx in my build environment is causing this issue? Any thoughts/ideas would be helpful.

I am building the release using Distillery on Centos:7 with this environment:


echo "==> Installing wxGTK-devel (erlang dep)"; 
yum install -y -q wxGTK-devel || exit 1;

echo "==> Installing unixODBC-devel (erlang dep)"; 
yum install -y -q unixODBC-devel || exit 1;

echo "==> Installing Erlang ${ERL_VERSION}.."; 
wget --no-verbose -P /tmp/ "https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_64/esl-erlang_${ERL_VERSION}-1~centos~7_amd64.rpm"; 
rpm -Uvh "/tmp/esl-erlang_${ERL_VERSION}-1~centos~7_amd64.rpm";

echo "==> Installing Elixir ${ELIXIR_VERSION}"; 
wget --no-verbose -P /tmp/ "https://github.com/elixir lang/elixir/releases/download/v${ELIXIR_VERSION}/Precompiled.zip";
unzip /tmp/Precompiled.zip -d /usr/local;

Got this issue today when upgrading a project. Did you find out what went wrong?

Update: Looks like it was because I had :wx in the extra_applications in my mix.exs. Having inherited this project, it took some time to figure out. This project ran inside a docker environment, and we definitely weren’t doing any GUI stuff with it. After removing it (along with some other unused dependencies), the project compiled and started fine.