Unable to run demo on Macbook Air M2

33 views
Skip to first unread message

Ross G

unread,
Oct 3, 2022, 4:57:43 PM10/3/22
to go-cd
Hi, I was hoping to evaluate GoCD but am unable to run the Test Drive on a new M2 Macbook

Following the instructions I downloaded the MacOS version

However this error occurs

Cached gocd-22.2.0-14697-1779-osx.zip matches checksum; no need to freshen the download

Unpacking archive gocd-22.2.0-14697-1779-osx.zip

Entering directory gocd-22.2.0-14697-1779

Executing run-gocd

bash: line 53: ./run-gocd: Bad CPU type in executable

Is there a trick to getting it working on new Apple Silicon?


Thanks


Chad Wilson

unread,
Oct 4, 2022, 12:53:00 AM10/4/22
to go...@googlegroups.com
Hmm I don't have an Apple Silicon machine to validate with, but there is probably some magic required to make sure Rosetta 2 can kick in? The test drive binary is not compiled for arm64 (and not packahed with arm64 JVM) so it'd rely on Rosetta to run as x64 for now.

What if you prefix bash -s with `arch -x86_64` or create a separate terminal running under Rosetta? https://medium.com/swlh/run-x86-terminal-apps-like-homebrew-on-your-new-m1-mac-73bdc9b0f343

-Chad

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/668289a9-5e7c-494f-bfe6-442eb937acafn%40googlegroups.com.

Ross G

unread,
Oct 4, 2022, 1:57:02 AM10/4/22
to go-cd
Thanks! prefixing with arch -x86_64 did the trick

Also for anyone else facing this issue, my new Macbook was so new it did not even have rosetta installed. You can install it with
/usr/sbin/softwareupdate --install-rosetta

Chad Wilson

unread,
Oct 4, 2022, 2:14:49 AM10/4/22
to go...@googlegroups.com
Thanks for confirming!

I have some background work at https://github.com/gocd/gocd/pull/10888 going on to produce at least Mac arm64 builds/installers, but in the meantime, I can probably change the try.sh script to set the intended arch when launching to avoid the need for this workaround.

What's the behaviour/error you see if you try and switch the arch like suggested without Rosetta being installed/available?

-Chad


Ross G

unread,
Oct 4, 2022, 4:28:47 PM10/4/22
to go-cd
I've had a closer look now and apologies for the confusion, however the only thing that was needed was rosetta to be installed. 

Using `arch -x86_64` makes no difference either way.

Without rosetta, you see the error bash: line 53: ./run-gocd: Bad CPU type in executable

With rosetta installed, the test drive package is working just fine

Thanks
Reply all
Reply to author
Forward
0 new messages