Closed rizopus closed 1 year ago
Would it be possible for you to to try those commands again with the --debug
flag? That might show some more helpful information.
I tried reinstalling the bonnie++
package locally and that worked as expected so I'm wondering if this might possibly be API related somehow (just a wild guess).
Either way from the output it seems to be failing somewhere in the fetch stage for some reason. We know this because it never reached the Reinstalling <formula_name>...
part of the messaging.
The fetch code inside the installer fetches the formula source (the JSON formula representation doesn't contain the info necessary to build from source) and then reloads the formula using it. It seems to fail to load the formula the second time.
To sync with you I tried to install bonnie++
package.
First try of clean install with -s
flag
❯ brew install -s --debug bonnie++
==> Downloading https://formulae.brew.sh/api/formula.jws.json
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3.1\)\ curl/7.87.0 --header Accept-Language:\ en --fail --progress-bar --location --remote-time --output /Users/user/Library/Caches/Homebrew/api/formula.jws.json --time-cond /Users/user/Library/Caches/Homebrew/api/formula.jws.json --compressed --speed-limit 100 --speed-time 5 --progress-bar https://formulae.brew.sh/api/formula.jws.json
##O#-#
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading bonnie++ from API
==> Fetching bonnie++
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3.1\)\ curl/7.87.0 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie\+\+.rb
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3.1\)\ curl/7.87.0 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie\+\+.rb
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie++.rb
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3.1\)\ curl/7.87.0 --header Accept-Language:\ en --retry 3 --location --head https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie\+\+.rb
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3.1\)\ curl/7.87.0 --header Accept-Language:\ en --fail --progress-bar --retry 3 --location --remote-time --output /Users/user/Library/Caches/Homebrew/downloads/ffa98d77d1999b1a3f1788a7ff969a1aa18592a5b9eaf7cffd4232eb59cc1e81--bonnie\ \ .rb.incomplete https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie\+\+.rb
######################################################################## 100.0%
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /Users/user/Library/Caches/Homebrew/downloads/ffa98d77d1999b1a3f1788a7ff969a1aa18592a5b9eaf7cffd4232eb59cc1e81--bonnie .rb
Error: No available formula with the name "bonnie ". Did you mean bonnie++?
In formula file: /Users/user/Library/Caches/Homebrew/downloads/ffa98d77d1999b1a3f1788a7ff969a1aa18592a5b9eaf7cffd4232eb59cc1e81--bonnie .rb
Expected to find class Bonnie , but only found: Bonniexx.
Install as usual
❯ brew install bonnie++
==> Fetching bonnie++
==> Downloading https://ghcr.io/v2/homebrew/core/bonniexx/manifests/2.00a
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/bonniexx/blobs/sha256:bb48f4977b6fffe6260f6adf6a20b15d0e33ef6f0f70a3d5fe36f3d1cd708c3c
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:bb48f4977b6fffe6260f6adf6a20b15d0e33ef6f0f70a3d5fe36f3d1cd708c3c?se=2023-04-16T07%3A50%3A00Z&sig=Ck6NutNm3CgZFhHTGQzJsnbhv3Ug4gPUmUTuqhhSQsA%3D&sp=r&spr=https&s
######################################################################## 100.0%
==> Pouring bonnie++--2.00a.arm64_ventura.bottle.tar.gz
🍺 /opt/homebrew/Cellar/bonnie++/2.00a: 19 files, 309.4KB
==> Running `brew cleanup bonnie++`...
Reinstall with -s
❯ brew reinstall -s --debug bonnie++
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading bonnie++ from API
Warning: building from source is not supported!
You're on your own. Failures are expected so don't create any issues, please!
==> Fetching bonnie++
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie++.rb
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3.1\)\ curl/7.87.0 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie\+\+.rb
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.13\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.3.1\)\ curl/7.87.0 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://raw.githubusercontent.com/Homebrew/homebrew-core/9c4b39858369e1c02b618d1af5a75d3e943073be/Formula/bonnie\+\+.rb
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/ffa98d77d1999b1a3f1788a7ff969a1aa18592a5b9eaf7cffd4232eb59cc1e81--bonnie .rb
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /Users/user/Library/Caches/Homebrew/downloads/ffa98d77d1999b1a3f1788a7ff969a1aa18592a5b9eaf7cffd4232eb59cc1e81--bonnie .rb
Error: No available formula with the name "bonnie ". Did you mean bonnie++?
In formula file: /Users/user/Library/Caches/Homebrew/downloads/ffa98d77d1999b1a3f1788a7ff969a1aa18592a5b9eaf7cffd4232eb59cc1e81--bonnie .rb
Expected to find class Bonnie , but only found: Bonniexx.
/opt/homebrew/Library/Homebrew/formulary.rb:113:in `const_get'
/opt/homebrew/Library/Homebrew/formulary.rb:113:in `load_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:127:in `load_formula_from_path'
/opt/homebrew/Library/Homebrew/formulary.rb:414:in `load_file'
/opt/homebrew/Library/Homebrew/formulary.rb:404:in `klass'
/opt/homebrew/Library/Homebrew/formulary.rb:399:in `get_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:670:in `factory'
/opt/homebrew/Library/Homebrew/formula_installer.rb:1200:in `fetch'
/opt/homebrew/Library/Homebrew/reinstall.rb:60:in `reinstall_formula'
/opt/homebrew/Library/Homebrew/cmd/reinstall.rb:120:in `block in reinstall'
/opt/homebrew/Library/Homebrew/cmd/reinstall.rb:114:in `each'
/opt/homebrew/Library/Homebrew/cmd/reinstall.rb:114:in `reinstall'
/opt/homebrew/Library/Homebrew/brew.rb:94:in `<main>'
Why are you building these formulae from source? Does it work if you do
export HOMEBREW_NO_INSTALL_FROM_API=1
brew update
before attempting a source install?
@carlocab I needed debug symbols for some package. Using HOMEBREW_NO_INSTALL_FROM_API=1
works
What is different when using HOMEBREW_NO_INSTALL_FROM_API=1
and not?
Formulary.load_formula(name, path, ...)
gets name="bonnie++"
in the first case, and name="bonnie "
in the last.
That name
will lately be used to derive class name to lookup in formula: class_name = class_s(name)
.
name
, in turn, is somehow derived from a path. The formula path is ../Formula/bonnie++.rb
in the first case and ../Formula/bonnie .rb
in the second.
@Bo98 Can you pick this up please as you pushed for installing from source using the API? Thanks.
In download_strategy.rb
, parse_basename
, line 352:
uri_path: "/Homebrew/homebrew-core/9fa25e536710603c675fe187c564cbaac45fb7d5/Formula/bonnie++.rb", decode_form_component: /Homebrew/homebrew-core/9fa25e536710603c675fe187c564cbaac45fb7d5/Formula/bonnie .rb
Because https://ruby-doc.org/stdlib-2.6.10/libdoc/uri/rdoc/URI.html#method-c-decode_www_form_component.
This is fixed for 4.0.15.
brew doctor
outputVerification
brew doctor
output" above saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
twice and am still able to reproduce my issue.brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.brew config
outputWhat were you trying to do (and why)?
Reinstall gtk+3 with debug symbols
What happened (include all command output)?
What did you expect to happen?
I expected successful build but it turned out that any formula with "+" in its name cannot be built from source
Step-by-step reproduction instructions (by running
brew
commands)