Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew install (or upgrade, reinstall) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a Linux problem please file this issue at https://github.com/Linuxbrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update and can still reproduce the problem?brew doctor, fixed all issues and can still reproduce the problem?brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?brew_doctor.txt
brew_config.txt
To help us debug your issue please explain:
brew install commands)What I was trying to do
Install imagemagick with support for image files in HEIF format. This is quite important since HEIF is now the default image format on iOS devices.
I've marked this as a regression, as this had previously been possible by providing the --with-libheif option when installing via Homebrew (this option was removed in a recent commit - this removal appears to be part of a new strategy regarding Homebrew options).
What happened (include command output)
$ brew install --with-libheif imagemagick
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.
-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-libheif
What you expected to happen
Homebrew installs imagemagick with HEIF support.
Step-by-step reproduction instructions (by running brew install commands)
$ brew install --with-libheif imagemagick
In looking at the output from brew info imagemagick, as well as the master imagemagick.rb file, I don't see any way to instruct Homebrew to install imagemagick with HEIF support.
While I'm by no means a Homebrew / ImageMagick expert, one possible solution might be to include libheif as a mandatory dependency. Most macOS users are going to increasingly have to deal with image files in HEIF format, so this seems to me to be a reasonable default.
As @pmonks pointed out you can submit a PR to have it included as part of the default installation. The removal of the options is normally based on statistics so if the user base wasn't large enough at the time of the removal then it got axed but that doesn't mean it can't be added back in. Post a PR and make an argument for it there.
@javian I am the creator of the issue. 😉
If I were more familiar with Homebrew and/or Ruby I probably would have submitted a PR, but given I'm not I chose an issue to avoid wasting everyone's time in an "education via rejected PRs" cycle. 😉
There's an open PR here: https://github.com/Homebrew/homebrew-core/pull/36336
It just needs to be merged.
@slhck great! Weird that my searches for “HEIC” didn’t turn anything up. Chalk it up to GitHub search, I guess...
@pmonks Sorry I was probably tired when I responded ^^ I don't think it takes too much knowledge to put it back in and you need to do something similar to https://github.com/Homebrew/homebrew-core/pull/36336/files . Looking at the old formula you might just need to readd the dependency to make it work since I can't see a configure option to turn it on.
Most helpful comment
@pmonks Sorry I was probably tired when I responded ^^ I don't think it takes too much knowledge to put it back in and you need to do something similar to https://github.com/Homebrew/homebrew-core/pull/36336/files . Looking at the old formula you might just need to readd the dependency to make it work since I can't see a configure option to turn it on.