Closed xmyst closed 1 month ago
@xmyst I think if you change your :nerves
dependency to point to the fix-docker-build
branch from #996 that it should build.
I am going to check in ~6h and report back here. I am not at my machine now.
@fhunleth I am not sure how to solve this
Because every version of nerves_toolchain_aarch64_nerves_linux_gnu depends
on nerves ~> 1.4 which doesn't match any versions, no version of
nerves_toolchain_aarch64_nerves_linux_gnu is allowed.
So, because your app depends on nerves_toolchain_aarch64_nerves_linux_gnu ~> 13.2.0,
version solving failed.
** (Mix) Hex dependency resolution failed
Update: for the context, I have this line in my mix.exs
{:nerves, github: "nerves-project/nerves", branch: "fix-docker-build", runtime: false},
The dependency needs to be forced. Try this:
{:nerves, github: "nerves-project/nerves", branch: "fix-docker-build", override: true, runtime: false},
Building now. I will update this comment when my laptop is done heating the room 🤣
Update: @fhunleth completed successfully with the following complaint about Erlang version. Which, I assume, is not relevant to the issue at hand. I am not using asdf on my macOS, so I expected that when moving to a newer version.
I am concerned about MIX_TARGET: target
in the mix
's output though.
% echo $MIX_TARGET
xxx_rpi5
% echo $MIX_ENV
prod
% mix deps.get
Resolving Hex dependencies...
Resolution completed in 0.053s
Unchanged:
castore 1.0.8
earmark_parser 1.4.40
elixir_make 0.8.4
ex_doc 0.34.1
jason 1.4.4
makeup 1.1.2
makeup_elixir 0.16.2
makeup_erlang 1.0.0
nerves_system_br 1.28.1
nerves_system_linter 0.4.0
nerves_toolchain_aarch64_nerves_linux_gnu 13.2.0
nerves_toolchain_ctng 1.10.0
nimble_parsec 1.4.0
All dependencies are up to date
==> nerves
==> xxx_rpi5
Nerves environment
MIX_TARGET: target
MIX_ENV: prod
Checking for prebuilt Nerves artifacts...
Found xxx_rpi5 in cache
/Users/myst/.nerves/artifacts/xxx_rpi5-portable-0.3.0
Found nerves_toolchain_aarch64_nerves_linux_gnu in cache
/Users/myst/.nerves/artifacts/nerves_toolchain_aarch64_nerves_linux_gnu-darwin_x86_64-13.2.0
This looks good. The MIX_TARGET
setting is expected. The short story is that Mix targets are just mostly arbitrary words (the word host
is the only that means something since it's used when the target is unset). They are only mainly used to select among library dependencies. In Nerves, we name them things like rpi5
when pulling in Raspberry Pi 5 dependencies, but in places like here where there's only one way to build, we just call it target
for consistency.
Thank you for reporting that the build completed!
Environment
Elixir version (
elixir -v
):Nerves environment (
mix nerves.env --info
):Additional information about your host, target hardware or environment that may help:
I suspect it might be connected to the move away from root, i.e. https://github.com/nerves-project/nerves_system_br/blob/v1.28.1/support/docker/nerves_system_br/Dockerfile#L137 vs. https://github.com/nerves-project/nerves/blob/main/lib/nerves/artifact/build_runners/docker.ex#L279. My understanding is that
chown
needs itssudo
now.Current behaviour
Expected behaviour
It compiles.