Open donmstewart opened 2 years ago
Yup not ideal. I have been working on an m1 for a while and haven't needed to recompile porter to arm64. Was there a specific problem that prompted you to recompile vs using the mixins and porter binaries that the magefile downloads? On linux arm64, I understand the problem but on a mac m1, I'm seeing rosetta work just fine to run the amd64 binaries.
No Rosetta installed on my end.
I created these opportunities for myself with my conscious choice not to go the Rosetta route and take the pain now so if/when Apple decide to pull it from the OS I don't have a mad scramble.
That said ARM (Graviton2 etc.) is becoming a thing for us in the data centre too. So also working to support that.
A lot of the inertia around having porter, plugins and mixins support arm is that we need a design for how CNAB bundles should deal with targeting multiple environments, and how that will be supported during porter build
. I'll dig through our issue backlog (and CNAB's) to see what's been thought about so far and we can resurrect those conversations.
related porter issue: https://github.com/getporter/porter/issues/2021
@donmstewart Sorry this fell through the cracks! If you are still dealing with this problem, here's one workaround: make sure that the version you compiled of porter matches the version that porter's magefile is expecting. When they don't match, the magefile downloads the binary and overwrites it.
So when you compile porter, set the version in one of 3 ways (your pick):
-w -X get.porter.sh/porter/pkg.Version=VERSION
Then copy over both the porter client AND the porter-runtime into the bin (it goes to runtimes/porter-runtime).
As long as the magefile can run porter version
and get back what it expects, it won't overwrite them.
Recompiling the porter binary for arm on Apple M1 works fine but building the operator has an issue where it looks like it somehow overwrites the binary on each invocation with an
amd64
version.Example:
It also looks like it is doing this when installing the mixins from the repositories which I also do not want it to do as I have compiled arm versions locally which are in my
.porter/mixins
directory.I am trying to build the operator so I can debug #106