uninitialized constant OS::Mac::CLT
scpeters opened this issue · 3 comments
Please fill out the issue checklist below and provide all the requested information.
- ran a
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Linuxbrew/homebrew-core: https://github.com/Linuxbrew/homebrew-core/issues/new/choose. If it's abrew 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. - ran
brew update
and can still reproduce the problem? - ran
brew doctor
, fixed all issues and can still reproduce the problem? - ran
brew config
andbrew doctor
and included their output with your issue?
$ brew config
HOMEBREW_VERSION: 1.8.0
ORIGIN: https://github.com/Homebrew/brew
HEAD: fdd8e9b7cf1e53322492e1e90f685c19bdfde506
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: 28a637313b565df784b2fb70ed7f372f8414ed72
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CACHE: /home/linuxbrew/.cache/Homebrew
CPU: octa-core 64-bit ivybridge
Homebrew Ruby: 2.3.7 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: N/A
Git: 2.19.1 => /usr/bin/git
Curl: 7.47.0 => /usr/bin/curl
Kernel: Linux 4.4.0-135-generic x86_64 GNU/Linux
OS: Ubuntu 16.04.5 LTS (xenial)
Host glibc: 2.23
/usr/bin/gcc: 5.4.0
glibc: N/A
gcc: N/A
xorg: N/A
$ brew doctor
Your system is ready to brew.
To help us debug your issue please explain:
- What you were trying to do (and why)
I was trying to install python@2
and python
because they are dependencies of other formulae that I wanted to test (dartsim
for example).
- What happened (include command output)
They both failed with an error Error: uninitialized constant OS::Mac::CLT
$ brew install python
Error: uninitialized constant OS::Mac::CLT
Please report this bug:
https://github.com/Linuxbrew/brew/wiki/troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb:23:in `block (2 levels) in <class:Python>'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:99:in `pour_bottle?'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:469:in `expand_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:381:in `compute_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:142:in `verify_deps_exist'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:135:in `prelude'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:324:in `install_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:256:in `block in install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:254:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:254:in `install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
$ brew install python@2
Error: uninitialized constant OS::Mac::CLT
Please report this bug:
https://github.com/Linuxbrew/brew/wiki/troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python@2.rb:25:in `block (2 levels) in <class:PythonAT2>'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:99:in `pour_bottle?'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:469:in `expand_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:381:in `compute_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:142:in `verify_deps_exist'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:135:in `prelude'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:324:in `install_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:256:in `block in install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:254:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:254:in `install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
- What you expected to happen
I expected macOS settings to be ignored on linux.
- Step-by-step reproduction instructions (by running
brew
commands)
$ docker run -it linuxbrew/brew bash
linuxbrew@31c9b78e5eb0:~$ brew install python
...
linuxbrew@31c9b78e5eb0:~$ brew install python@2
...
On Linuxbrew/brew MacOS::CLT.installed?
is set to true
.
brew/Library/Homebrew/os/linux.rb
Lines 22 to 28 in 8f5de98
That's a hack though, and not one that I'd like to commit to Homebrew/brew.
44 formulae in Linuxbrew/core use if MacOS::CLT.installed?
. I'd rather patch these formulae to instead use if !OS.mac? || MacOS::CLT.installed?
.
Here's a PR to fix this issue: https://github.com/Linuxbrew/homebrew-core/pull/10012
I merged PR #10012, which should fix this issue!