Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formulae errors on M1 Mac when running brew upgrade fogg #2

Open
damien opened this issue Apr 1, 2021 · 0 comments
Open

Formulae errors on M1 Mac when running brew upgrade fogg #2

damien opened this issue Apr 1, 2021 · 0 comments

Comments

@damien
Copy link

damien commented Apr 1, 2021

When attempting to upgrade fogg on an M1 Mac, I receive the following error:

» brew upgrade fogg
Error: formulae require at least a URL
/opt/homebrew/Library/Homebrew/formula.rb:271:in `determine_active_spec'
/opt/homebrew/Library/Homebrew/formula.rb:206:in `initialize'
/opt/homebrew/Library/Homebrew/formulary.rb:153:in `new'
/opt/homebrew/Library/Homebrew/formulary.rb:153:in `get_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:366:in `factory'
/opt/homebrew/Library/Homebrew/cli/parser.rb:663:in `block in formulae'
/opt/homebrew/Library/Homebrew/cli/parser.rb:659:in `map'
/opt/homebrew/Library/Homebrew/cli/parser.rb:659:in `formulae'
/opt/homebrew/Library/Homebrew/cli/parser.rb:302:in `parse'
/opt/homebrew/Library/Homebrew/cmd/upgrade.rb:97:in `upgrade'
/opt/homebrew/Library/Homebrew/brew.rb:122:in `<main>'

Digging into the problematic formulae, I believe the problem is here:

homebrew-tap/fogg.rb

Lines 11 to 18 in e24ff93

if OS.mac? && Hardware::CPU.intel?
url "https://github.com/chanzuckerberg/fogg/releases/download/v0.58.3/fogg_0.58.3_darwin_amd64.tar.gz"
sha256 "156fd95b81057f4297abead63b71bb80924a478758bc2c6bd5de1963397912d7"
end
if OS.linux? && Hardware::CPU.intel?
url "https://github.com/chanzuckerberg/fogg/releases/download/v0.58.3/fogg_0.58.3_linux_amd64.tar.gz"
sha256 "86284828c19de738e05545ebbe564169f9342c5ea3bc317d777eace108541213"
end

Note that the definition here has no catch-all case for handling unspecified architectures, nor does it have a case for ARM64 Macs (M1 Macs).

Installing fogg directly from it's source repository https://github.com/chanzuckerberg/fogg works without issue, so I'm confident the issue exists in the Homebrew formula for fogg.

We should probably change things up a bit. Using steampipe as an example, they build fat binaries and only check that the user is attempting to install on Mac:

https://github.com/turbot/homebrew-tap/blob/5bdaea1cbc1013e6af7c47bac92c03dad5fc7cc7/Formula/steampipe.rb#L10-L13

Another example is the OpenSSL formulae, which simply builds an ARM64 version of the package and specifies it as a bottle:

https://github.com/Homebrew/homebrew-core/blob/2b5155470ccc9bcb7813104476b6dbcad85799ab/Formula/ripgrep.rb#L14-L17

Using either approach should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant