astarte
astarte copied to clipboard
Make on ARM
Hey, I was trying to build the docker container with docker compose on a apple silicon Mac-Book and discovered that a wrong parameter was passed to the cpp compiler.
`85 28.36 * Getting db_connection (Hex package)
#85 28.36 * Getting connection (Hex package)
#85 30.12 ===> Fetching pc v1.13.0
#85 30.48 ===> Analyzing applications...
#85 30.52 ===> Compiling pc
#85 31.14 Cloning into 're2'...
#85 33.91 Fetching origin
#85 35.14 Note: checking out '2020-06-01'.
#85 35.14
#85 35.14 You are in 'detached HEAD' state. You can look around, make experimental
#85 35.14 changes and commit them, and you can discard any commits you make in this
#85 35.14 state without impacting any branches by performing another checkout.
#85 35.14
#85 35.14 If you want to create a new branch to retain commits you create, you may
#85 35.14 do so (now or later) by using -b with the checkout command again. Example:
#85 35.14
#85 35.14 git checkout -b
#85 35.14
#85 35.14 HEAD is now at aecba11 Refuse to rewrite when MaxSubmatch() is too large.
#85 35.15 make: Entering directory '/app/deps/re2/c_src/re2'
#85 35.16 c++ -m64 -c -o obj/util/strutil.o -std=c++11 -pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. -Wall -O3 -fPIC -pthread -std=c++11 -m64 -DNDEBUG util/strutil.cc
#85 35.17 c++ -m64 -c -o obj/util/rune.o -std=c++11 -pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. -Wall -O3 -fPIC -pthread -std=c++11 -m64 -DNDEBUG util/rune.cc
#85 35.18 c++: error: unrecognized command line option ‘-m64’
#85 35.18 c++: error: unrecognized command line option ‘-m64’
#85 35.18 c++: error: unrecognized command line option ‘-m64’
#85 35.18 make: *** [Makefile:183: obj/util/strutil.o] Error 1
#85 35.18 make: *** Waiting for unfinished jobs....
#85 35.18 c++: error: unrecognized command line option ‘-m64’
#85 35.18 make: *** [Makefile:183: obj/util/rune.o] Error 1
#85 35.18 make: Leaving directory '/app/deps/re2/c_src/re2'
#85 35.19 ===> Hook for {pc,compile} failed!
#85 35.19
#85 35.28 ** (Mix) Could not compile dependency :re2, "/root/.mix/rebar3 bare compile --paths="/app/_build/prod/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile re2", update it with "mix deps.update re2" or clean it with "mix deps.clean re2"
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c mix do deps.get, deps.compile]: exit code: 1`
Thank you for reporting this bug.
We are already working into making ARM docker builds for Astarte 1.0 available to everyone. We'll update this bug as soon as they are published on dockerhub.
We'll run a new round of checks for ARM compatibility soon, with new VerneMQ version in Astarte v1.1.
In the context of https://github.com/astarte-platform/astarte_vmq_plugin/pull/67, the base VerneMQ was bumped to 1.12.6.1 (see https://github.com/astarte-platform/astarte_vmq_plugin/pull/67/commits/08f8caf5088323716376d15f35b16c54445f9c4c). This allows to build the astarte_vmq_plugin component on ARM, too, provided that buildkit is disabled (i.e. the DOCKER_BUILDKIT
env is set to 0
).
From the 1.1 release of Astarte, all Astarte components can be built on ARM.