Nerves toolchain dep failing when attempting to run host mode

This repo: GitHub - lawik/nerves_cloud_kiosk: Prototype kiosk with Phoenix

Running MIX_TARGET=host mix deps.get gives an error about the nerves toolchains which I suppose I don’t need?

==> nerves_toolchain_aarch64_nerves_linux_gnu
could not compile dependency :nerves_toolchain_aarch64_nerves_linux_gnu, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile nerves_toolchain_aarch64_nerves_linux_gnu --force", update it with "mix deps.update nerves_toolchain_aarch64_nerves_linux_gnu" or clean it with "mix deps.clean nerves_toolchain_aarch64_nerves_linux_gnu"
** (exit) exited in: GenServer.call(Nerves.Env, {:get, #Function<4.5101718/1 in Nerves.Env.ensure_loaded/2>}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.15.4) lib/gen_server.ex:1063: GenServer.call/3
    (nerves 1.10.5) lib/nerves/env.ex:131: Nerves.Env.ensure_loaded/2
    (nerves 1.10.5) lib/mix/tasks/compile.nerves_package.ex:25: Mix.Tasks.Compile.NervesPackage.run/1
    (mix 1.15.4) lib/mix/task.ex:447: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:124: Mix.Tasks.Compile.All.run_compiler/2
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:104: Mix.Tasks.Compile.All.compile/4
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:93: Mix.Tasks.Compile.All.with_logger_app/2
    (mix 1.15.4) lib/mix/tasks/compile.all.ex:56: Mix.Tasks.Compile.All.run/1

The error message suggest mitigations but they don’t work :slight_smile:

Figured it out. I had not specified targets: :frio_rpi4 meaning it would attempt to pull deps for the nerves system even for the host target.

1 Like