corelocationcli
corelocationcli copied to clipboard
bad CPU type in executable: /usr/local/bin/CoreLocationCLI
Did a brew upgrade CoreLocationCLI
and received the error. I removed and did a brew install cask corelocationcli
with same results.
MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports) 2.3 GHz Quad-Core Intel Core i5
Thanks
I have the same issue. This did work on my M1 MacBook Pro, but it failed on my Intel-based Mac
MacBook Pro (16-inch, 2019) 2.4 GHz 8-Core Intel Core i9
~ > brew ls corelocationcli
==> Binary
/usr/local/bin/CoreLocationCLI -> /usr/local/Caskroom/corelocationcli/4.0.0/CoreLocationCLI (98.9KB)
~ > file /usr/local/bin/CoreLocationCLI
/usr/local/bin/CoreLocationCLI: Mach-O 64-bit executable arm64
~ > uname -rsm
Darwin 21.5.0 x86_64
Easiest workaround: compile it for your current machine. Download the repo, unzip, and then run swift build -c release
from the root folder. The binary will be available in the hidden folder ./.build/<arch>/release
. You can optionally move the binary to a location in your PATH
. It requires XCode, obviously.
Wondering why the official package is not build as a universal binary for both architectures. I ran into the same issue and setup as a workaround my own homebrew tap and compiled it with swift build -c release --arch arm64 --arch x86_64
. Hope the upstream homebrew cask will be universal at one point. Intel Macs are not going away anytime soon.
I just ran this and got this executable. Any good?
Also I can't find any documentation for these --arch
flags. But it seems straightforward enough. Happy to support universal builds if this works.
Looks like still a arm64
binary only.
marco@loop ~/Downloads> ./CoreLocationCLI
exec: Failed to execute process '/Users/marco/Downloads/CoreLocationCLI': Bad CPU type in executable.
marco@loop ~/Downloads> lipo -info CoreLocationCLI
Non-fat file: CoreLocationCLI is architecture: arm64
When I run it on the one I compiled.
◆ corelocationcli git:(main) ❯❯❯ lipo -info .build/apple/Products/Release/CoreLocationCLI
Architectures in the fat file: .build/apple/Products/Release/CoreLocationCLI are: x86_64 arm64
I don't know where the options are in the official documentation. I found it here. https://developer.apple.com/forums/thread/667440 https://liamnichols.eu/2020/08/01/building-swift-packages-as-a-universal-binary.html
Also read somewhere that you can change something in Xcode, but could not figure out what to do in Xcode that it spits out a universal binary.
Also really looking forward to this working on Intel Macs! Very sad that its not been working since April :(. p.s. @mschirrmeister Could you explain the hosting your own homebrew tap briefly? I would love this temporary fix!
Trying a new approach. Please see
https://github.com/fulldecent/corelocationcli/releases/tag/4.0.2
https://github.com/Homebrew/homebrew-cask/pull/136269
@fulldecent, version 4.0.2 works perfect. :-)
@mayurankv, not sure what you exactly mean. My repo is here and it has some description. Does that answer your question? https://github.com/mschirrmeister/homebrew-corelocationcli
I was just wondering how to replicate the same self-maintained tap but 4.0.2 works great for me (up to the location privacy issues mentioned in another issue) so no need anymore. Thanks so much for the speedy responses!
On that note, this thread can be closed no?