Skip to content
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

Closed
3 tasks done
derekPrivate opened this issue Feb 28, 2023 · 14 comments
Closed
3 tasks done

TypeError: no implicit conversion of false into String #15037

derekPrivate opened this issue Feb 28, 2023 · 14 comments
Labels
bug Reproducible Homebrew/brew bug install from api Relates to API installs outdated PR was locked due to age

Comments

@derekPrivate
Copy link

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.0.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: 4d0154fa7926e8a7b06e9b074dd45957e820407c
Last commit: 26 hours ago
Core tap JSON: 28 Feb 15:05 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 1
Homebrew Ruby: 2.6.8 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8_1/bin/ruby
CPU: single-core 64-bit haswell
Clang: N/A
Git: 2.38.3 => /usr/bin/git
Curl: 7.61.1 => /usr/bin/curl
Kernel: Linux 4.14.281-144.502.amzn1.x86_64 x86_64 GNU/Linux
OS: Unknown
Host glibc: 2.17
/usr/bin/gcc: 4.8.5
/usr/bin/ruby: 2.0.0
glibc: N/A
gcc@11: N/A
gcc: N/A
xorg: N/A

Your system is ready to brew.

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from 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)

brew install gcc
@derekPrivate derekPrivate added the bug Reproducible Homebrew/brew bug label Feb 28, 2023
@fxcoudert
Copy link
Member

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.

@carlocab
Copy link
Member

That'll probably be the formula generated from the API. I think API installs get tripped up by the glibc check in the post_install method.

@fxcoudert
Copy link
Member

Does the API generate a different formula than the file in the repo? That's going to make backtraces hard to use 😢

@carlocab
Copy link
Member

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

@Bo98
Copy link
Member

Bo98 commented Feb 28, 2023

This will be the one included in the bottle, which should be the same except that the bottle block is missing.

@derekPrivate
Copy link
Author

derekPrivate commented Feb 28, 2023 via email

@derekPrivate
Copy link
Author

derekPrivate commented Mar 1, 2023 via email

@fxcoudert
Copy link
Member

This is a brew bug. I cannot transfer it there, for some reason…

@Bo98
Copy link
Member

Bo98 commented Mar 1, 2023

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.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Mar 23, 2023
@fxcoudert fxcoudert removed the stale No recent activity label Mar 23, 2023
@carlocab carlocab transferred this issue from Homebrew/homebrew-core Mar 23, 2023
@carlocab carlocab added the install from api Relates to API installs label Mar 23, 2023
@MikeMcQuaid
Copy link
Member

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

There is no generated formula file. It's generating a formula dynamically from JSON.

@MikeMcQuaid
Copy link
Member

@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!

@derekPrivate
Copy link
Author

derekPrivate commented Mar 24, 2023 via email

@MikeMcQuaid
Copy link
Member

Great, thanks!

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug install from api Relates to API installs outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

5 participants