brew icon indicating copy to clipboard operation
brew copied to clipboard

`--bottle-arch=` giving "invalid option" error

Open justinclift opened this issue 7 years ago • 6 comments

  • [x] are reporting a bug others will be able to reproduce and not asking a question.
  • [x] ran a brew command and reproduced the problem with multiple formulae?
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

Trying to build a bottle of node, for Penryn. Literally cutting-n-pasting the instructions from the brew.sh Bottle page. :smile:

What happened (include command output)

Instead of brew proceeding with creating the bottle, compiled for Penryn... it instead displays an error message which seems to mean --bottle-arch= isn't valid. Subsequently tried it with another formula (python). Same error given, so doesn't appear to be specific to the node formula.

Command output
$ brew update
Updated Homebrew from 058bd4bf7 to 2ca56f673.
Updated 2 taps (homebrew/core and sqlitebrowser/sqlite3).
==> New Formulae
protoc-gen-go
==> Updated Formulae
node ✔                   davmail                  helmfile                 [email protected]             solr
bazel                    dnsviz                   juju                     nkf                      ungit
$ brew install --build-bottle --bottle-arch=penryn node
Usage: brew install [options] formula

Install formula.

formula is usually the name of the formula to install, but it can be specified in several different ways.

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will be run for the installed formulae or, every 30 days, for all formulae.

-d, --debug                      If brewing fails, open an interactive
                                 debugging session with access to IRB or a
                                 shell inside the temporary build directory
    --env                        If std is passed, use the standard build
                                 environment instead of superenv.If super
                                 is passed, use superenv even if the formula
                                 specifies the standard build environment.
    --ignore-dependencies        Skip installing any dependencies of any
                                 kind. If they are not already present, the
                                 formula will probably fail to install.
    --only-dependencies          Install the dependencies with specified
                                 options but do not install the specified
                                 formula.
    --cc                         Attempt to compile using provided
                                 compiler. compiler should be the name
                                 of the compiler's executable, for instance
                                 gcc-7 for GCC 7. In order to use LLVM's
                                 clang, use llvm_clang. To specify the
                                 Apple-provided clang, use clang. This
                                 parameter will only accept compilers that
                                 are provided by Homebrew or bundled with
                                 macOS. Please do not file issues if you
                                 encounter errors while using this flag.
-s, --build-from-source          Compile the specified formula from source
                                 even if a bottle is provided. Dependencies
                                 will still be installed from bottles if
                                 they are available.
    --force-bottle               Install from a bottle if it exists for the
                                 current or newest version of macOS, even if
                                 it would not normally be used for
                                 installation.
    --include-test               Install testing dependencies required to
                                 run brew test.
    --devel                      If formula defines it, install the
                                 development version.
    --HEAD                       If formula defines it, install the HEAD
                                 version, aka. master, trunk, unstable.
    --fetch-HEAD                 Fetch the upstream repository to detect if
                                 the HEAD installation of the formula is
                                 outdated. Otherwise, the repository's HEAD
                                 will be checked for updates when a new
                                 stable or development version has been
                                 released.
    --keep-tmp                   Don't delete the temporary files created
                                 during installation.
    --build-bottle               Prepare the formula for eventual bottling
                                 during installation.
-f, --force                      Install without checking for previously
                                 installed keg-only or non-migrated
                                 versions.
-v, --verbose                    Print the verification and postinstall
                                 steps.
    --display-times              Print install times for each formula at the
                                 end of the run.
-i, --interactive                Download and patch formula, then open a
                                 shell. This allows the user to run
                                 ./configure --help and otherwise
                                 determine how to turn the software package
                                 into a Homebrew package.
-g, --git                        Create a Git repository, useful for
                                 creating patches to the software.
-h, --help                       Show this message.

Error: invalid option: --bottle-arch=penryn $

What you expected to happen

Node to be installed, ready for turning into a bottle.

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

As above.


brew config output

Note - this problem occurs with 2 (out of 2) different macOS installs tested. The brew config below is from one of them, but I'm thinking it probably doesn't make a difference. :smile:

$ brew config
HOMEBREW_VERSION: 2.0.1-57-g2ca56f6
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2ca56f6731c2eb793ba28972c9a6688f9cff7f33
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 4387d427d3394d7952653642f1da3e25f7b9be39
Core tap last commit: 85 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_LOGS: /Users/jc/Library/Logs/Homebrew
CPU: dual-core 64-bit penryn
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.2 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.3-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1

brew doctor output

$ brew doctor
Your system is ready to brew.

justinclift avatar Feb 15 '19 12:02 justinclift

I am seeing the same error when trying to install Vim on a new Macbook. I'll likely try to downgrade brew and see if it fixes anything. I also reproduced the above bug with the same error.

brew commands

$ brew update
Already up-to-date.

$ brew doctor
Your system is ready to brew.

$ brew config
HOMEBREW_VERSION: 2.0.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: e32c1515432a938093d5ef1d8c4b4408991873df
Last commit: 9 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a807e991cdf337c40947a6f5a873f10d2ec03c34
Core tap last commit: 53 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_LOGS: /Users/rylan/Library/Logs/Homebrew
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.20.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.3-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1

Command output

$ brew install vim --with-lua --with-python3
Usage: brew install [options] formula

Install formula.

formula is usually the name of the formula to install, but it can be specified
in several different ways.

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will be run for the installed formulae or, every 30 days, for all formulae.

    -d, --debug                      If brewing fails, open an interactive
                                     debugging session with access to IRB or a
                                     shell inside the temporary build directory
        --env                        If std is passed, use the standard build
                                     environment instead of superenv.If super
                                     is passed, use superenv even if the formula
                                     specifies the standard build environment.
        --ignore-dependencies        Skip installing any dependencies of any
                                     kind. If they are not already present, the
                                     formula will probably fail to install.
        --only-dependencies          Install the dependencies with specified
                                     options but do not install the specified
                                     formula.
        --cc                         Attempt to compile using provided
                                     compiler. compiler should be the name
                                     of the compiler's executable, for instance
                                     gcc-7 for GCC 7. In order to use LLVM's
                                     clang, use llvm_clang. To specify the
                                     Apple-provided clang, use clang. This
                                     parameter will only accept compilers that
                                     are provided by Homebrew or bundled with
                                     macOS. Please do not file issues if you
                                     encounter errors while using this flag.
    -s, --build-from-source          Compile the specified formula from source
                                     even if a bottle is provided. Dependencies
                                     will still be installed from bottles if
                                     they are available.
        --force-bottle               Install from a bottle if it exists for the
                                     current or newest version of macOS, even if
                                     it would not normally be used for
                                     installation.
        --include-test               Install testing dependencies required to
                                     run brew test.
        --devel                      If formula defines it, install the
                                     development version.
        --HEAD                       If formula defines it, install the HEAD
                                     version, aka. master, trunk, unstable.
        --fetch-HEAD                 Fetch the upstream repository to detect if
                                     the HEAD installation of the formula is
                                     outdated. Otherwise, the repository's HEAD
                                     will be checked for updates when a new
                                     stable or development version has been
                                     released.
        --keep-tmp                   Don't delete the temporary files created
                                     during installation.
        --build-bottle               Prepare the formula for eventual bottling
                                     during installation.
    -f, --force                      Install without checking for previously
                                     installed keg-only or non-migrated
                                     versions.
    -v, --verbose                    Print the verification and postinstall
                                     steps.
        --display-times              Print install times for each formula at the
                                     end of the run.
    -i, --interactive                Download and patch formula, then open a
                                     shell. This allows the user to run
                                     ./configure --help and otherwise
                                     determine how to turn the software package
                                     into a Homebrew package.
    -g, --git                        Create a Git repository, useful for
                                     creating patches to the software.
    -h, --help                       Show this message.
Error: invalid option: --with-lua

rylanhalteman avatar Feb 15 '19 14:02 rylanhalteman

@rylanhalteman Are you sure --with-lua --with-python3 are valid brew options?

Those look more like old style options for individual formulas, which have been completely deprecated.

This issue is about the bottle-arch= option, which isn't formula specific (AFAIK). :smile:

justinclift avatar Feb 15 '19 14:02 justinclift

@rylanhalteman Are you sure --with-lua --with-python3 are valid brew options?

Those look more like old style options for individual formulas, which have been completely deprecated.

From what I can tell, it seems to be a supported option. It's showing up on the brew formula https://formulae.brew.sh/formula/vim, though not frequently; I can't tell if that's because it's not a popular option or because it's only old versions of brew using it.

It used to be a supported option (it's in many online blogs, StackOverflow posts) and it worked for me previously as well, but that's anecdotal. I'll see if I can find any depreciation information.

rylanhalteman avatar Feb 15 '19 19:02 rylanhalteman

From what I can tell, it seems to be a supported option

It's not. All options were removed from Homebrew/homebrew-core.

This issue is about the bottle-arch= option, which isn't formula specific (AFAIK). 😄

Indeed. This was omitted and needs added to cmd/install.rb.

MikeMcQuaid avatar Feb 15 '19 20:02 MikeMcQuaid

It's not. All options were removed from Homebrew/homebrew-core.

All right. I thought it was related since I had the exact same error. Ignore my ramblings while I continue my adventure.

rylanhalteman avatar Feb 15 '19 20:02 rylanhalteman

@rylanhalteman The general approach these days - when a formula you need no longer has the option you want - is to make a GitHub repo with your version of the formula + tell Homebrew to use that.

For anyone already reasonably familiar with GitHub, it's turned out to be (for me) fairly easy. eg: this is a copy of the SQLite formula, but with the now-missing FTS5 option added:

    https://github.com/sqlitebrowser/homebrew-sqlite3

It shouldn't be too hard to make a copy of the vim formula in your own repo, and add the various pieces to it you want. Probably grab the formula from before the options you want were removed, and just hard code them in. :smile:

justinclift avatar Feb 15 '19 23:02 justinclift