Repository: Homebrew/homebrew-core

Issue #70594: Some formula still try to set LLVM/GCC optimization level (ENV.Ox)
Created: 2021-02-06T18:32:33Z
brew gist-logs <formula> link OR brew config AND brew doctor output
https://gist.github.com/danielnachun/078787151f7d3d33cb7d5c557195705e


 The brew doctor above contains no "Warning" lines.

What were you trying to do (and why)?
Install a formula which tries to set LLVM/GCC optimization level.  These formula should not be using this anymore but flew under the radar after it was disabled.
What happened (include all command output)?
Error: An exception occurred within a child process:
  MethodDeprecatedError: Calling ENV.O3 is disabled! There is no replacement.
Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/awk.rb:24

What did you expect to happen?
The formula to install correctly, by not trying to set the optimization level.
Step-by-step reproduction instructions (by running brew commands)
brew install -s awk
If you search for "ENV.O0", "ENV.O1", "ENV.O2", or "ENV.O3" in the repo you'll find the other formula with this issue.

Duplicate issue #70836: MethodDeprecatedError: Calling ENV.O0 is disabled!
Created: 2021-02-10T14:07:41Z
brew gist-logs <formula> link OR brew config AND brew doctor output
[jgazeley@hephaestos ~]$ brew config
HOMEBREW_VERSION: 3.0.0
ORIGIN: https://github.com/Homebrew/brew
HEAD: ebc7cc36a0e029d58fac8cebd1b5ff583b3fd95b
Last commit: 5 days ago
Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core
Core tap HEAD: dddb0361b051e2be874f33c7a2b57cf4b15ab01e
Core tap last commit: 7 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0
HOMEBREW_EDITOR: /usr/bin/vim
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: octa-core 64-bit skylake
Clang: 11.0 build (parse error)
Git: 2.29.2 => /bin/git
Curl: 7.71.1 => /usr/bin/curl
Kernel: Linux 5.10.10-200.fc33.x86_64 x86_64 GNU/Linux
OS: Fedora release 33 (Thirty Three)
Host glibc: 2.32
/usr/bin/gcc: 10.2.1
/usr/bin/ruby: 2.7.2
glibc: N/A
gcc: N/A
xorg: N/A

[jgazeley@hephaestos ~]$ 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: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  krb5



 The brew doctor above contains no "Warning" lines.

What were you trying to do (and why)?
Install openshift-cli on Linux.
What happened (include all command output)?
[jgazeley@hephaestos ~]$ brew install openshift-cli
==> Cloning https://github.com/openshift/oc.git
Updating /home/jgazeley/.cache/Homebrew/openshift-cli--git
==> Checking out tag openshift-clients-4.6.0-202006250705.p0
HEAD is now at 51011e484 Merge pull request #467 from csrwng/extract_credential_requests
HEAD is now at 51011e484 Merge pull request #467 from csrwng/extract_credential_requests
Error: An exception occurred within a child process:
  MethodDeprecatedError: Calling ENV.O0 is disabled! There is no replacement.
Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core):
  /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openshift-cli.rb:32

What did you expect to happen?
Expected openshift oc command to be installed
Step-by-step reproduction instructions (by running brew commands)
brew install openshift-cli

N.B. krb5 and heimdal seem to fight over some symlinks, but the MethodDeprecatedError occurs no matter which of the two packages is symlinked

Closing comment (2021-02-11T07:27:15Z): Closing, as this should be resolved by the next Homebrew release and is essentially a duplicate of #70594.