PodToBUILD icon indicating copy to clipboard operation
PodToBUILD copied to clipboard

"Bad CPU type in executable" error on M1 Mac?

Open HannahShiSFB opened this issue 2 years ago • 2 comments

Got the "Bad CPU type in executable" error when running RepoTools to download pods during build. Is it possible to put universal build of RepoTools (and Compiler as well) in release package?

Error message: /private/var/tmp/_bazel_hannahshi/937520e164843f0bd3aace18131f00d9/external/rules_pods/BazelExtensions/workspace.bzl:316:14: in new_pod_repository Repository rule pod_repo_ defined at: /private/var/tmp/_bazel_hannahshi/937520e164843f0bd3aace18131f00d9/external/rules_pods/BazelExtensions/workspace.bzl:198:28: in <toplevel> DEBUG: /private/var/tmp/_bazel_hannahshi/937520e164843f0bd3aace18131f00d9/external/rules_pods/BazelExtensions/workspace.bzl:6:14: __OUTPUT 1 src/main/tools/process-wrapper-legacy.cc:80: "execvp(/private/var/tmp/_bazel_hannahshi/937520e164843f0bd3aace18131f00d9/external/rules_pods/bin/RepoTools, ...)": Bad CPU type in executable

HannahShiSFB avatar Dec 11 '22 06:12 HannahShiSFB

I'm also unable to run update_pods on an intel mac. Is there an option to build from source instead of using the prebuilt binary?

joprice avatar Nov 10 '23 14:11 joprice

I tried building from source using git_repository, but the path handling in the update_pods script was tricky to get right and didn't end up writing the Vendor/rules_pods directory since it detects whether it's being run from external. I ended up building it locally and pushing a release to my fork https://github.com/joprice/PodToBUILD/releases/tag/6.3.2-370b622-x86_64.

joprice avatar Nov 10 '23 16:11 joprice