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

--bottle-arch=FOO broken #7597

Closed
3 tasks done
fredemmott opened this issue May 18, 2020 · 2 comments · Fixed by #7602
Closed
3 tasks done

--bottle-arch=FOO broken #7597

fredemmott opened this issue May 18, 2020 · 2 comments · Fixed by #7602
Labels
outdated PR was locked due to age

Comments

@fredemmott
Copy link
Contributor

fredemmott commented May 18, 2020

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

Additionally, pretty sure I've found the root cause

What you were trying to do (and why)

brew install --build-bottle --bottle-arch=nehalem Anything

e.g.

brew install --build-bottle --bottle-arch=nehalem gnu-sed

... from https://github.com/hhvm/homebrew-hhvm

What happened (include command output)

Error: Unrecognized architecture for --bottle-arch: nehalem

What you expected to happen

Package built with the nehalem CPU flags.

Step-by-step reproduction instructions (by running brew commands)

As above.

Output of brew config and brew doctor commands

fredemmott@fredemmott-fb Formula % brew config
HOMEBREW_VERSION: 2.2.17-dirty
ORIGIN: https://github.com/Homebrew/brew
HEAD: ca5eac845dc11e991d7d8f8c85aebb82dd454f37
Last commit: 6 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 2e959eb6b8180febfb283f24ee63083971c70132
Core tap last commit: 66 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_EDITOR: nvim
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 4
CPU: quad-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: 11.0 build 1103
Git: 2.13.5 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.4-x86_64
CLT: 1103.0.32.59
Xcode: 11.4.1
Brew doctor (spammy, probably not relevant given root cause below)
fredemmott@fredemmott-fb Formula % brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
./configure scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/opt/homebrew/bin/pkg-config
/opt/homebrew/bin/python2-config
/opt/homebrew/bin/python3.6m-config
/opt/homebrew/bin/python3.7-config
/opt/homebrew/bin/python2.7-config
/opt/homebrew/bin/python3.7m-config
/opt/homebrew/bin/ksba-config
/opt/homebrew/bin/python-config
/opt/homebrew/bin/libassuan-config
/opt/homebrew/bin/pcre2-config
/opt/homebrew/bin/gpg-error-config
/opt/homebrew/bin/python3.6-config
/opt/homebrew/bin/python3.8-config
/opt/homebrew/bin/libgcrypt-config
/opt/homebrew/bin/pth-config

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libiperf.0.dylib
/usr/local/lib/libjson-c.2.dylib
/usr/local/lib/libykpers-1.1.dylib
/usr/local/lib/libyubikey.0.dylib
/usr/local/lib/libyubikey.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
/usr/local/include/iperf_api.h

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libiperf.la

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libiperf.a
/usr/local/lib/libyubikey.a

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link on these:
hhvm-4.55
hhvm-4.52
hhvm-4.53
python
libyubikey
hhvm-local
ykpers
lz4
hhvm-4.25
hhvm-4.49
hhvm-4.47
hhvm-4.23
hhvm-4.1
hhvm-4.8
hhvm-4.15
hhvm-4.34
hhvm-4.51
hhvm-4.56
hhvm-4.35
hhvm-4.57
hhvm-4.50
hhvm-4.44
hhvm-4.10
hhvm-4.4
hhvm-4.3
hhvm-4.45
hhvm-4.42
hhvm-4.5
hhvm-4.20
hhvm-preview

Warning: Some installed formulae are not readable:
hhvm-preview: undefined method `undent' for #String:0x00007f81a83bd1d0

Warning: You have uncommitted modifications to Homebrew/brew.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
cd /usr/local/Homebrew && git stash && git clean -d -f

Uncommitted files:
M Library/Homebrew/formula_installer.rb

Warning: An outdated version (2.13.5) of Git was detected in your PATH.
Git 2.14.3 or newer is required for Homebrew.
Please upgrade:
brew install git

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

Warning: Broken symlinks were found. Remove them with brew cleanup:
/usr/local/bin/yapf

Root Cause

07b19cb

  • ARGV.bottle_arch was a symbol
  • Homebrew.args.bottle_arch is a string
  • so, lookup always fails.
  • if lookup is fixed, fails later - bottle_arch should probably return a symbol
@fredemmott
Copy link
Contributor Author

Thanks, really appreciate the quick fix :)

@MikeMcQuaid
Copy link
Member

Np, you're welcome @fredemmott!

@lock lock bot added the outdated PR was locked due to age label Jun 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants