Linuxbrew-core: Updating ripgrep 11.0.2 to 12.0.0 failed in homebrew Ubuntu due to asciidoc

Created on 18 Mar 2020  ·  20Comments  ·  Source: Homebrew/linuxbrew-core

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [x] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

Update ripgrep to the latest version. I always make it a habit to update all my homebrew-based tools to their latest versions.

What happened (include command output)

The ripgrep update process failed.


Command output

$ brew upgrade -v ripgrep
==> Upgrading 1 outdated package:
ripgrep 11.0.2 -> 12.0.0
==> Upgrading ripgrep 11.0.2 -> 12.0.0
rm /home/linuxbrew/.linuxbrew/bin/rg
rm /home/linuxbrew/.linuxbrew/etc/bash_completion.d/rg.bash
rm /home/linuxbrew/.linuxbrew/share/fish/vendor_completions.d/rg.fish
rm /home/linuxbrew/.linuxbrew/share/zsh/site-functions/_rg
==> Installing dependencies for ripgrep: asciidoc and docbook-xsl
asciidoc: macOS is required.
ln -s ../../Cellar/ripgrep/11.0.2/etc/bash_completion.d/rg.bash rg.bash
ln -s ../Cellar/ripgrep/11.0.2/bin/rg rg
ln -s ../../../Cellar/ripgrep/11.0.2/share/fish/vendor_completions.d/rg.fish rg.fish
ln -s ../../../Cellar/ripgrep/11.0.2/share/zsh/site-functions/_rg _rg
Error: ripgrep: An unsatisfied requirement failed this build.
==> Checking for dependents of upgraded formulae...
==> No dependents found!

What you expected to happen

Update doesn't fail.

Step-by-step reproduction instructions (by running brew install commands)

  • Attempt to update ripgrep
$ brew install ripgrep
Error: ripgrep 11.0.2 is already installed
To upgrade to 12.0.0, run `brew upgrade ripgrep`.
==> `brew cleanup` has not been run in 30 days, running now...


$ brew upgrade -v ripgrep
==> Upgrading 1 outdated package:
ripgrep 11.0.2 -> 12.0.0
==> Upgrading ripgrep 11.0.2 -> 12.0.0 
rm /home/linuxbrew/.linuxbrew/bin/rg
rm /home/linuxbrew/.linuxbrew/etc/bash_completion.d/rg.bash
rm /home/linuxbrew/.linuxbrew/share/fish/vendor_completions.d/rg.fish
rm /home/linuxbrew/.linuxbrew/share/zsh/site-functions/_rg
==> Installing dependencies for ripgrep: asciidoc and docbook-xsl
asciidoc: macOS is required.
ln -s ../../Cellar/ripgrep/11.0.2/etc/bash_completion.d/rg.bash rg.bash
ln -s ../Cellar/ripgrep/11.0.2/bin/rg rg
ln -s ../../../Cellar/ripgrep/11.0.2/share/fish/vendor_completions.d/rg.fish rg.fish
ln -s ../../../Cellar/ripgrep/11.0.2/share/zsh/site-functions/_rg _rg
Error: ripgrep: An unsatisfied requirement failed this build.
==> Checking for dependents of upgraded formulae...
==> No dependents found!
  • Additional commands to provide more information
$ brew info ripgrep
ripgrep: stable 12.0.0, HEAD
Search tool like grep and The Silver Searcher
https://github.com/BurntSushi/ripgrep
/home/linuxbrew/.linuxbrew/Cellar/ripgrep/11.0.2 (11 files, 30MB) *
  Poured from bottle on 2020-02-23 at 12:45:42
From: https://github.com/Homebrew/linuxbrew-core/blob/master/Formula/ripgrep.rb
==> Dependencies
Build: asciidoc ✘, docbook-xsl ✘, pkg-config ✔, rust ✔
Required: pcre2 ✔
==> Options
--HEAD
        Install HEAD version
==> Caveats
Bash completion has been installed to:
  /home/linuxbrew/.linuxbrew/etc/bash_completion.d

zsh completions have been installed to:
  /home/linuxbrew/.linuxbrew/share/zsh/site-functions

fish completions have been installed to:
  /home/linuxbrew/.linuxbrew/share/fish/vendor_completions.d
==> Analytics
install: 388 (30 days), 1,147 (90 days), 3,913 (365 days)
install-on-request: 386 (30 days), 1,138 (90 days), 3,899 (365 days)
build-error: 0 (30 days)


$ brew gist-logs ripgrep
Error: No logs.


$ brew config
HOMEBREW_VERSION: 2.2.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: 48a1637b24a0c329905a981f4cff547c7fa47943
Last commit: 9 days ago
Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core
Core tap HEAD: afd92217bab3fa3cb13a348dc1618122160e58a5
Core tap last commit: 13 hours ago
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CACHE: /home/flower/.cache/Homebrew
HOMEBREW_LOGS: /home/flower/.cache/Homebrew/Logs
HOMEBREW_AWS_ACCESS_KEY_ID: set
HOMEBREW_AWS_SECRET_ACCESS_KEY: set
CPU: octa-core 64-bit sandybridge
Homebrew Ruby: 2.6.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: N/A
Git: 2.20.1 => /bin/git
Curl: 7.65.3 => /usr/bin/curl
Kernel: Linux 5.3.0-7642-generic x86_64 GNU/Linux
OS: Pop!_OS 19.10 (eoan)
Host glibc: 2.30
/usr/bin/gcc: 9.2.1
glibc: N/A
gcc: 5.5.0_7
xorg: 20170115_1


$ 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: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /sbin/update-texmf-config
  /bin/pkg-config
  /bin/x86_64-pc-linux-gnu-pkg-config
  /bin/i686-linux-gnu-pkg-config
  /bin/python3.7m-config
  /bin/python3.7-config
  /bin/python3m-config
  /bin/python3-config
  /bin/x86_64-linux-gnu-python3m-config
  /bin/im-config
  /bin/ncursesw5-config
  /bin/ncursesw6-config
  /bin/x86_64-linux-gnu-python3.7m-config
  /bin/x86_64-linux-gnu-python3-config
  /bin/x86_64-linux-gnu-python3.7-config
  /bin/ncurses5-config
  /bin/ncurses6-config
  /bin/x86_64-linux-gnu-pkg-config
  /bin/apt-config


$ uname -a
Linux local 5.3.0-7642-generic #34~1584408018~19.10~21df4b1-Ubuntu SMP Tue Mar 17 13:38:51 UTC  x86_64 x86_64 x86_64 GNU/Linux
outdated

Most helpful comment

Once https://github.com/asciidoc/asciidoc-py3/issues/83 is addressed and asciidoc cuts a 9.0.0 release this will be fixed. See also https://github.com/Homebrew/homebrew-core/pull/47602

All 20 comments

Once https://github.com/asciidoc/asciidoc-py3/issues/83 is addressed and asciidoc cuts a 9.0.0 release this will be fixed. See also https://github.com/Homebrew/homebrew-core/pull/47602

Got the same error installing ripgrep in the first place.

Installing dependencies for ripgrep: asciidoc, docbook-xsl, pkg-config, libssh2, binutils, curl, rust and pcre2
asciidoc: macOS is required.
Error: An unsatisfied requirement failed this build.

Thanks for the links @jonchang, they don't seem to have an estimate of when asciidoc 9.0.0 will be released. That's unfortunate. But at least we can install ripgrep from the provided binary on the meantime.

We could also try to disable the doc part from ripgrep? I did not find a way to do so though.

Could the version be reverted until this is sorted out?
I feel the compatibility with all supported platforms should have been a priority over a version bump.

It's also complaining of boost now

==> Installing dependencies for ripgrep: boost, asciidoc and docbook-xsl                                                                                                                                                                                                                                                       
==> Installing ripgrep dependency: boost                                                                                                                                                                                                                                                                                       
==> Downloading https://linuxbrew.bintray.com/bottles/boost-1.72.0_1.x86_64_linux.bottle.tar.gz                                                                                                                                                                                                                                
==> Downloading from https://akamai.bintray.com/8c/8c2ad1259e29b7b0b1a2b78e7f53446b36e26ffe0d8374e6fd44653da415708b?__gda__=exp=1585731353~hmac=ea2c32ae2b869b232a38dbbc0f67f337501869c9e99ff33771574348ffd01ab9&response-content-disposition=attachment%3Bfilename%3D%22boost-1.72.0_1.x86_64_linux.bottle.tar.gz%22&response-
######################################################################## 100.0%                                                                                                                                                                                                                                                
==> Pouring boost-1.72.0_1.x86_64_linux.bottle.tar.gz                                                                                                                                                                                                                                                                          
🍺  /home/linuxbrew/.linuxbrew/Cellar/boost/1.72.0_1: 14,677 files, 239.7MB                                                                                                                                                                                                                                                    
asciidoc: macOS is required.                                                                                                                                                                                                                                                                                                   
Error: An unsatisfied requirement failed this build.        

boost should be fine. You can brew install boost and it should work.

There is nothing to revert. All this is due to Python 2 being marked as EOL since 11 years. It is now gone, and some libraries like asciidoc and ripgrep did not update. We can't do anything about this, and we can't revert it.

Let me be clear: we can't do anything for you. This needs to be fixed by the ripgrep developers.

I actually reported this there first: https://github.com/BurntSushi/ripgrep/issues/1522
It looks like they're not gonna fix it either.

I think you have not been clear in your upstream error description.

The problem is that ripgrep depends on asciidoc, and asciidoc depends on Python 2. Python 2 is dead and does not exist anymore. This is the real issue that needs to be filled upstream.

@flowerinthenight @iMichka I'm a bit confused. The ripgrep author said the project doesn't have a dependency on asciidoc, so what is there to fix? Digging through the ripgrep code, there appears to be an optional dependency on asciidoc for man page generation, but if asciidoc isn't installed it just generates the docs a different way. If we can't use Python 2.7 for policy reasons, can't we just drop the asciidoc dependency and build ripgrep without it?

I think the last time I tried to build ripgrep without asciidoc, it complained it needed it. Or somebody had asciidoc on their system, and ripgrep picked it up and it messed up stuff. But that might be a long time ago, I do not remember the details.

You could just try to open a pull request that drops the dependency, and see what happens. As said above, if there is a flag that disables the need for asciidoc; let's go for it, just open a pull request.

I am also doing this to get more help from our users to fix things, as we already struggle with massive amounts of code review and packaging issues :)

I've just made BurntSushi/ripgrep#1544 replacing asciidoc with asciidoctor, which doesn't depend on Python 2. This would be useful for future releases.

Cool. FWIW, I don't have asciidoc installed locally and was able to build ripgrep fine (outside of Homebrew). Their CI does install asciidoc, but the only "link" I can find to it is a dynamic look-up of the a2x binary. If a2x can't be found on the PATH, then it just gets ignored.

Yes, it seems that asciidoc is used only for generating its man page, rg.1.

Please open a pull request. I'll review it. If it works, I'll backport the change to our mac repo in a second step.

I've just opened #20025.

Merged.

https://github.com/BurntSushi/ripgrep/pull/1544 is merged, so the next release of ripgrep (possibly 12.1.0) will use asciidoctor by default. https://github.com/BurntSushi/ripgrep/commit/e02bb6b99af117b3fb78e8e0b912fc9288e71a20

Cool. As I can't keep track of everything, please let us know when the next release is out. You can also open a pull request at https://github.com/Homebrew/homebrew-core when the version is out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lday0321 picture lday0321  ·  7Comments

slhck picture slhck  ·  7Comments

vkyt picture vkyt  ·  4Comments

baranyildirim picture baranyildirim  ·  6Comments

iMichka picture iMichka  ·  6Comments