-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
TypeError: no implicit conversion of false into String #15037
Comments
What does |
That'll probably be the formula generated from the API. I think API installs get tripped up by the |
Does the API generate a different formula than the file in the repo? That's going to make backtraces hard to use 😢 |
Yes, unfortunately. Would be good to find a way to map lines to the original formula. Or maybe dump the generated one somehow. CC @Rylan12 |
This will be the one included in the bottle, which should be the same except that the bottle block is missing. |
Following advice from Carlo, I now have a working gcc-12 (see below for what I did)
However, if this is vital, I can revert and try again?
As it stands at the moment (with a working gcc-12) brew info gcc reports
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################## 100.0%
==> gcc: stable 12.2.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
/home/linuxbrew/.linuxbrew/Cellar/gcc/12.2.0 (1,633 files, 306.6MB) *
Poured from bottle on 2023-02-28 at 16:10:26
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb
License: GPL-3.0-or-later with GCC-exception-3.1
==> Dependencies
Required: gmp ✔, isl ✔, libmpc ✔, mpfr ✔, zstd ✔, binutils ✔, zlib ✔, glibc ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 59,279 (30 days), 200,202 (90 days), 1,357,096 (365 days)
install-on-request: 29,671 (30 days), 99,314 (90 days), 655,648 (365 days)
build-error: 127 (30 days)
This is what Carlo told me to do, and has resulted in a working install
export HOMEBREW_NO_INSTALL_FROM_API=1
brew tap homebrew/core
brew update
brew reinstall gcc
—
Derek Morris
***@***.***
… On 28 Feb 2023, at 20:07, FX Coudert ***@***.***> wrote:
What does brew info gcc says? Your output says gcc.rb:151:in post_install but that line doesn't match what is currently in the formula.
—
Reply to this email directly, view it on GitHub <#15037>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABU4OWDAWJKJPTZIZXES67LWZZLIXANCNFSM6AAAAAAVK5RVHI>.
You are receiving this because you authored the thread.
|
I am now getting a similar error when installing php on the same machine:
==> Installing php dependency: ncurses
==> Pouring ncurses--6.4.x86_64_linux.bottle.tar.gz
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################## 100.0%
Error: no implicit conversion of false into String
Please report this issue:
https://docs.brew.sh/Troubleshooting
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:47:in `initialize'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:47:in `popen'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:47:in `popen'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:9:in `popen_read'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/elf.rb:134:in `initialize'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/elf.rb:180:in `new'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/elf.rb:180:in `metadata'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/os/linux/elf.rb:189:in `dynamically_linked_libraries'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/linkage_checker.rb:164:in `block in check_dylibs'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/pathname.rb:565:in `block in find'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/find.rb:49:in `block (2 levels) in find'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/find.rb:48:in `catch'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/find.rb:48:in `block in find'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/find.rb:43:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/find.rb:43:in `find'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/pathname.rb:565:in `find'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/lib/ruby/2.6.0/forwardable.rb:230:in `find'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/linkage_checker.rb:157:in `check_dylibs'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/os/linux/linkage_checker.rb:66:in `check_dylibs'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/linkage_checker.rb:37:in `initialize'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2413:in `new'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2413:in `block in undeclared_runtime_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cache_store.rb:26:in `use'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2412:in `undeclared_runtime_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2021:in `runtime_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:805:in `finish'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:738:in `install_dependency'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:657:in `block in install_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:657:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:657:in `install_dependencies'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:403:in `install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/upgrade.rb:203:in `install_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:350:in `install_formula'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:340:in `block in install_formulae'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:339:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/install.rb:339:in `install_formulae'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:230:in `install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:93:in `<main>'
—
Derek Morris
***@***.***
… On 28 Feb 2023, at 20:33, Bo Anderson ***@***.***> wrote:
Should be the same except that the bottle block is missing.
—
Reply to this email directly, view it on GitHub <#15037>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABU4OWBWWUABCRFPY2P56GDWZZOI7ANCNFSM6AAAAAAVK5RVHI>.
You are receiving this because you authored the thread.
|
This is a |
That error is really weird and I do not understand how it can happen. It's also at a very common callsite where installing anything would break with the same error, though we've not had any other reports of it happening. The fact that API affects it is even more baffling. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
There is no generated formula file. It's generating a formula dynamically from JSON. |
@derekPrivate Is this still a problem for you and can you still reproduce it? If so, can I get you to |
I uninstalled home-brew and started afresh..
The good news is that I have now successfully install gcc without error!
Thanks for your help
—
Derek
… On 23 Mar 2023, at 09:00, Mike McQuaid ***@***.***> wrote:
@derekPrivate <https://github.com/derekPrivate> Is this still a problem for you and can you still reproduce it? If so, can I get you to brew update and run a brew install --verbose --debug again and supply your latest brew config and brew doctor? Thanks again!
—
Reply to this email directly, view it on GitHub <#15037 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABU4OWESLAADD5V3VXZIIXDW5QGMVANCNFSM6AAAAAAWE3Q7EQ>.
You are receiving this because you were mentioned.
|
Great, thanks! |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output" saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Using Amazon Linux 1 (quite an old version of Linux)
installed brew without problems, then wanted to
brew install gcc
reports error
TypeError: no implicit conversion of false into String
What happened (include all command output)?
(switching on --verbose and --debug) shows this
==> Postinstalling gcc
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /home/linuxbrew/.linuxbrew/opt/gcc/.brew/gcc.rb
Warning: The post-install step did not complete successfully
You can try again using:
brew postinstall gcc
==> An exception occurred within a child process:
TypeError: no implicit conversion of false into String
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:47:in initialize' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:47:in popen'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:47:in popen' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:9:in popen_read'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:16:in safe_popen_read' /home/linuxbrew/.linuxbrew/opt/gcc/.brew/gcc.rb:151:in post_install'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1160:in block (2 levels) in run_post_install' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:968:in with_logging'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1159:in block in run_post_install' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils.rb:606:in with_env'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1148:in run_post_install' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/postinstall.rb:24:in
'
What did you expect to happen?
gcc to be installed!
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: