zegervdv / homebrew-zathura

Homebrew formulae to build Zathura on Mac OS X
538 stars 41 forks source link

Cannot install zathura on Big Sur 11.5.2 #80

Open Stevenchaosz opened 2 years ago

Stevenchaosz commented 2 years ago

The last time I tried to install it, the following error message was shown.

Last 15 lines from /Users/steven/Library/Logs/Homebrew/girara/03.cd:
[19/19] Linking target libgirara-gtk3.3.dylib
[0/1] Installing files.
Traceback (most recent call last):
  File "/usr/local/Cellar/meson/0.59.1/libexec/bin/meson", line 33, in <module>
    sys.exit(load_entry_point('meson==0.59.1', 'console_scripts', 'meson')())
  File "/usr/local/Cellar/meson/0.59.1/libexec/bin/meson", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: meson
FAILED: meson-install
/usr/local/Cellar/meson/0.59.1/libexec/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/zegervdv/homebrew-zathura/issue

after the step of cd build && ninja && ninja install

I had tried a couple times before, the error message had been: (I had this message right before I installed xcode-select)

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3
Target /usr/local/bin/2to3
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3'

To force the link and overwrite all conflicting files:
  brew link --overwrite python@3.9

To list all files that would be deleted:
  brew link --overwrite --dry-run python@3.9

Possible conflicting files are:
/usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/2to3
/usr/local/bin/2to3-3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/2to3-3.9
/usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/idle3
/usr/local/bin/idle3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/idle3.9
/usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/pydoc3
/usr/local/bin/pydoc3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/pydoc3.9
/usr/local/bin/python3 -> /usr/local/Cellar/python@3.9/3.9.1_6/bin/python3.9
/usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3-config
/usr/local/bin/python3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
/usr/local/bin/python3.9-config -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9-config
/usr/local/share/man/man1/python3.1 -> /usr/local/Cellar/python@3.9/3.9.0_2/share/man/man1/python3.1
/usr/local/share/man/man1/python3.9.1 -> /usr/local/Cellar/python@3.9/3.9.0_2/share/man/man1/python3.9.1
/usr/local/lib/pkgconfig/python-3.9-embed.pc -> /usr/local/Cellar/python@3.9/3.9.0_2/lib/pkgconfig/python-3.9-embed.pc
/usr/local/lib/pkgconfig/python-3.9.pc -> /usr/local/Cellar/python@3.9/3.9.0_2/lib/pkgconfig/python-3.9.pc
/usr/local/lib/pkgconfig/python3-embed.pc -> /usr/local/Cellar/python@3.9/3.9.0_2/lib/pkgconfig/python3-embed.pc
/usr/local/lib/pkgconfig/python3.pc -> /usr/local/Cellar/python@3.9/3.9.0_2/lib/pkgconfig/python3.pc
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
zegervdv commented 2 years ago

It seems like an issue with one of the build dependencies: meson. Meson is a python tool which is installed in your homebrew’s python environment. I suspect your python version was upgraded and for some reason the meson package was removed or is not in the right location. You can see from the trace back that the binary (or rather the entry point) is still there, but the python library cannot be found.

I suggest trying to brew uninstall meson and try to install zathura again.

Stevenchaosz commented 2 years ago

Thanks for your help! But after I tried uninstalling meson, it still shows the same error message. Do I need to work on the ninja part? The last command it runs is the following statement: cd build && ninja && ninja install

zegervdv commented 2 years ago

Can you try brew rm zathura and brew rm girara and repeat until no more versions are found? Same for brew rm meson. Then try to install again?

idr4n commented 2 years ago

I'm having a similar issue but with MacOS 12.0.1 (issue #83). Uninstalled zathura, girara and meson as suggested and tried installing zathura again. girara and meson are installed successfully as dependencies but getting the same error when the it comes to installing zathura.

zegervdv commented 2 years ago

The meson build system made a change without giving deprecation warnings in version 0.60. They reverted that in 0.60.1, which was released 12 hours ago, so once the brew pkg is updated this issue should go away for the time being.

zegervdv commented 2 years ago

@ivanddm As far as I can tell the updated meson is available and the builds seem to work

hosilva commented 2 years ago

I'm having a similar issue on MacOS 10.15.7. I first uninstalled (doing brew rm --force) girara, meson and zathura. Then, I tried to install zathura doing:

brew tap zegervdv/zathura
brew install zathura --with-synctex

and got the following,

==> Downloading https://ghcr.io/v2/homebrew/core/meson/manifests/0.61.1
Already downloaded: /Users/hectorokadadasilva/Library/Caches/Homebrew/downloads/e465d55c480cfc0a798372075800d2a9fc6aadb55b808d904d8d1351c3be2426--meson-0.61.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/meson/blobs/sha256:4e7a608cbefd
Already downloaded: /Users/hectorokadadasilva/Library/Caches/Homebrew/downloads/81dc8ae00539af6dc6b11cab5d20ffc8d6ca30e8ccc3660504a25e8bf4c5109a--meson--0.61.1.all.bottle.tar.gz
==> Downloading https://github.com/pwmt/girara/archive/0.3.6.tar.gz
Already downloaded: /Users/hectorokadadasilva/Library/Caches/Homebrew/downloads/2656186a6c3e1cf9379e7e76614194f1d8145e5a06e3102936467116f78efcd1--girara-0.3.6.tar.gz
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/manifests/2.52.5
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/librsvg/blobs/sha256:9c6702f2d5
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Downloading https://github.com/pwmt/zathura/archive/0.4.8.tar.gz
Already downloaded: /Users/hectorokadadasilva/Library/Caches/Homebrew/downloads/03451fbb4a9fd788239c7c1a3554e340750b4953cf39e5fde1bb306cde16fdde--zathura-0.4.8.tar.gz
==> Installing zathura from zegervdv/zathura
==> Installing dependencies for zegervdv/zathura/zathura: meson, girara and librsvg
==> Installing zegervdv/zathura/zathura dependency: meson
==> Pouring meson--0.61.1.all.bottle.tar.gz
🍺  /usr/local/Cellar/meson/0.61.1: 219 files, 3.2MB
==> Installing zegervdv/zathura/zathura dependency: girara
==> mkdir build
==> meson build --prefix /usr/local/Cellar/girara/0.3.6
==> cd build && ninja && ninja install
🍺  /usr/local/Cellar/girara/0.3.6: 42 files, 336.3KB, built in 9 seconds
==> Installing zegervdv/zathura/zathura dependency: librsvg
==> Pouring librsvg--2.52.5.catalina.bottle.tar.gz
==> /usr/local/opt/gdk-pixbuf/bin/gdk-pixbuf-query-loaders --update-cache
🍺  /usr/local/Cellar/librsvg/2.52.5: 53 files, 57.6MB
==> Installing zegervdv/zathura/zathura --with-synctex
==> mkdir build
==> meson build --prefix /usr/local/Cellar/zathura/0.4.8
Last 15 lines from /Users/hectorokadadasilva/Library/Logs/Homebrew/zathura/02.0.4.8:
Run-time dependency sqlite3 found: YES 3.37.2
Run-time dependency synctex found: YES 1.21.0
Library magic found: YES
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libseccomp found: NO (tried pkgconfig, framework and cmake)
meson.build:93: WARNING: You are using a synctex version pre-SONAME bump, but post-ABI-break. Please make sure to always run zathura using the correct synctex version.
Configuring zathura-version.h using configuration
Found pkg-config: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/pkg-config (0.29.2)
Program glib-compile-resources found: YES (/usr/local/opt/glib/bin/glib-compile-resources)
Program rsvg-convert found: YES (/usr/local/opt/librsvg/bin/rsvg-convert)

data/meson.build:22:0: ERROR: Function does not take positional arguments.

A full log can be found at /private/tmp/zathura-20220118-56389-1txxpj3/zathura-0.4.8/build/meson-logs/meson-log.txt

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/zegervdv/homebrew-zathura/issues

These open issues may also help:
Zathura crashing on segmentation fault https://github.com/zegervdv/homebrew-zathura/issues/47
Cannot install zathura on Big Sur 11.5.2 https://github.com/zegervdv/homebrew-zathura/issues/80
Zathura auto focus on open https://github.com/zegervdv/homebrew-zathura/issues/62
Zathura not recognized by tiling window manager chunkwm. https://github.com/zegervdv/homebrew-zathura/issues/38
Method to run zathura as default pdf viewer https://github.com/zegervdv/homebrew-zathura/issues/78
zathura not showing up on MacOS https://github.com/zegervdv/homebrew-zathura/issues/74
brew install zathura-pdf-mupdf fails https://github.com/zegervdv/homebrew-zathura/issues/66
zathura isn't launched from ViM without --with-synctex https://github.com/zegervdv/homebrew-zathura/issues/50

where the critical point seems to be data/meson.build:22:0: ERROR: Function does not take positional arguments., happening with meson version 0.61.1. Does anyone have any suggestions on how to fix this?

eli-schwartz commented 2 years ago

The meson build system made a change without giving deprecation warnings in version 0.60.

This is technically incorrect, no "change" was made.

"ERROR: Function does not take positional arguments." -- these functions have never, ever taken positional arguments, but older versions of meson silently did nothing when given junk data. It is true, that this was downgraded to a warning in meson 0.60.1 because it turned out a lot of projects had broken meson.build which provided junk data to functions, but the warning clearly indicated that only one development cycle of meson would be provided as a grace period.

Meson is constantly improving its support for "catch erroneous junk data provided to functions" and this has never been considered to be a breaking change, even if in one or two cases it has been changed to a warning in the interest of easing adoption.

@hosilva

Does anyone have any suggestions on how to fix this?

The fix was committed upstream 2 months ago: https://git.pwmt.org/pwmt/zathura/-/commit/c6ec5044c5ff843979050bfb81742d14740bb656

However I guess it was not tagged in a release.

zegervdv commented 2 years ago

@hosilva you can try installing with the --HEAD flag to build with the latest changes.

hosilva commented 2 years ago

Thanks, @eli-schwartz & @zegervdv: this solved my installation problem.