Mix firmware error on a RPI2

mix
nerves
troubleshooting

#1

Hello !

I am currently trying to start a new project with nerves. My target is a rpi2. I added nerves_uart as a dependency yesterday and mix started to complain about something bad in my rel/config.exs file. I replaced a section with “plugin Nerves” and mix deps.get was happy again.

But now, while doing mix firmware, this error keeps happening =>

You have included a version of ERTS which does not contain a required library
required: :wx
search path: /Users/xabi/.nerves/artifacts/nerves_system_rpi2-portable-1.3.0/staging/usr/lib/erlang/lib

Have you an idea of what the problem is ?

Thanks a lot !


#2

wx is a library for WixWidgets–it’s what provides the GUI library for things like observer

in general, there’s some debugging/dev stuff that gets left out of prod builds, and there’s a flag to include it, try adding :runtime_tools application to mix.exs

(I’m guessing here, since I know nothing about nerves nor RPi…)


#3

You should use Elixir 1.6.6 and OTP 21. This is a bug with Mix/Distillery.

Here is a chain of issues that describe the issue:
on Nerves
on Distillery
on Elixir

Basically there was a change in Elixir 1.7 the presented this due to Distillery using a private API.


#4

The issue with :wx trying to be included was fixed by updating the nerves_runtime dependency to only depend on dialixyr for dev and test. This prevents it from populating through the hex dependency. There is a remaining issue regarding elixir_make that can be followed through on the links above.


#5

Elixir v1.7.3 has been released which addresses the issue with runtime: false dependencies being made part of releases. Thanks everyone for the report!


#6

Thank you so much for pushing out the fix to this!


#7

1.7.3 works very well here ! thank you very much for the fix !