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

Can't install Zathura in Monterey 12.0.1 #83

Closed
idr4n opened this issue Oct 28, 2021 · 19 comments
Closed

Can't install Zathura in Monterey 12.0.1 #83

idr4n opened this issue Oct 28, 2021 · 19 comments

Comments

@idr4n
Copy link

idr4n commented Oct 28, 2021

After recently upgrading to Monterey, I was having the same issue as #81 (i.e., only the title bar was rendering). So I decided to uninstalled Zathura and install it again, however when trying to reinstall, I'm getting the following error:

==> Installing zathura from zegervdv/zathura
==> mkdir build
==> meson build --prefix /usr/local/Cellar/zathura/0.4.8
Last 15 lines from $HOME/Library/Logs/Homebrew/zathura/02.0.4.8:
Compiler for C supports arguments -fvisibility=hidden: YES
Run-time dependency sqlite3 found: YES 3.36.0
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency synctex found: NO (tried pkgconfig, framework and cmake)
Library magic found: YES
Run-time dependency libseccomp found: NO (tried pkgconfig, framework and cmake)
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-20211028-5259-uyljll/zathura-0.4.8/build/meson-logs/meson-log.txt

No logs are being created in the file mentioned in the last line.

Both brew install zathura and brew install zathura --HEAD gives me the same error.

I have updated cmake to the latest version using brew.

Any ideas on how to tackle this issue? Thanks in advance!

@phye
Copy link

phye commented Nov 1, 2021

Removing girara/zathura and reinstalling zathura will not hit the compile issue.

However, even if I can compile zathura correctly, it just does not work at all (except the title bar)

image

@flimofly
Copy link

flimofly commented Nov 1, 2021

I have the same issue but I do see these errors for the sandboxd process in Console:

  • System Policy: zathura(13394) deny(1) file-read-data /Users/username/Library/Autosave Information
  • System Policy: zathura(13394) deny(1) file-write-create /System/Library/Fonts/.uuid.TMP-3dquqq
  • System Policy: zathura(13394) deny(1) file-write-create /System/Library/AssetsV2/com_apple_MobileAsset_Font6/.uuid.TMP-TuFshE
  • deny(1) file-write-create /System/Library/Fonts/Supplemental/.uuid.TMP-GY0YOq

@idr4n
Copy link
Author

idr4n commented Nov 2, 2021

Removing girara/zathura and reinstalling zathura will not hit the compile issue.

However, even if I can compile zathura correctly, it just does not work at all (except the title bar)

image

I was able to install zathura (--HEAD) in a new Mac (M1) with zathura-pdf-poppler, but I'm getting issue as illustrated by @phye.

@flimofly
Copy link

flimofly commented Nov 2, 2021

@ivanddm Do you see the same errors in Console?

@idr4n
Copy link
Author

idr4n commented Nov 2, 2021

@flimofly You mean in Mac's Console app? If yes, then no, I don't see any errors being reported there. Let me know if I should look somewhere else.

@flimofly
Copy link

flimofly commented Nov 2, 2021

@ivanddm Yes, in the Mac Console app (first press Start in Console, then try to open a pdf using the zathura command in the Terminal, then search for zathura in Console).

@zegervdv Any ideas?
I have tried granting Full Disk Access to the zathura process but that didn't solve the problem.

@idr4n
Copy link
Author

idr4n commented Nov 2, 2021

@flimofly Yes, now I get what you meant. So I'm getting this error when launching zathura from the terminal:

System Policy: zathura(7623) deny(1) file-read-data /Users/username/Library/Autosave Information
Violation:       deny(1) file-read-data /Users/username/Library/Autosave Information
Process:         zathura [7623]
Path:            /opt/homebrew/Cellar/zathura/HEAD-c6ec504/bin/zathura
Load Address:    0x100cbc000
Identifier:      zathura
Version:         ??? (???)
Code Type:       arm64 (Native)
Parent Process:  zsh [7275]
Responsible:     /Applications/iTerm.app/Contents/MacOS/iTerm2

There is more reported in the same error, but not sure if it would be relevant...

@flimofly
Copy link

flimofly commented Nov 2, 2021

Thanks. I also get this error, which is macOS' Daemon for the Transparency, Consent, and Control Subsystem.

<TCCDProcess: identifier=<ID of InvalidCode>, pid=16248, auid=501, euid=0, binary_path=/usr/local/Cellar/zathura/HEAD-dcaf4c6/bin/zathura> attempted to call TCCAccessRequest for kTCCServiceAccessibility without the recommended com.apple.private.tcc.manager.check-by-audit-token entitlement

Looks like this has something to do with entitlements/permissions.
I've tried to run sudo zathura but that doesn't help.

@flimofly
Copy link

flimofly commented Nov 2, 2021

Running codesign -d --entitlements :- /usr/local/Cellar/zathura/HEAD-dcaf4c6/bin/zathura to check zathura's entitlements results in:

code object is not signed at all

@zegervdv
Copy link
Owner

zegervdv commented Nov 3, 2021

I've just updated to Monterey and I am seeing the same issue.
Even on the 0.4.8 release (after patching meson).

I'm not sure if the issue with the sandbox is related. Why would zathura even try to read from Autosave Information.
Was this sandboxing expanded with Monterey, or were those errors already there on Big Sur?

@flimofly
Copy link

flimofly commented Nov 3, 2021

I think you're right that the sandbox issue is not causing this problem, if only because zathura is allowed to run. It just can't display the pdf. But just to be sure it would be helpful if someone who is still on Big Sur could check Console.

If it's not this I have no idea.

@phye
Copy link

phye commented Nov 6, 2021

Not sure if there're any updates from upstream?
I have to that apple preview is not so keyboard friendly, even if I've applied some key remappings using karabiner:
j/k works well, but I do miss the f+num key sequences to follow pdf links

@zegervdv
Copy link
Owner

zegervdv commented Nov 6, 2021

If you install with --HEAD you should get the latest changes, but I don't think macOS compatibility is a priority for them.
I'm hoping this is a GTK issue which may be solved eventually.

@jvdoorn
Copy link

jvdoorn commented Nov 6, 2021

I found a related issue on the zathura git itself: https://git.pwmt.org/pwmt/zathura/-/issues/251

@jvdoorn
Copy link

jvdoorn commented Nov 10, 2021

I have found a (temporary) fix for the display issue. I'd like to refer people to https://gitlab.gnome.org/GNOME/gtk/-/issues/4395 for more information and again to the issue on the zathura repository itself https://git.pwmt.org/pwmt/zathura/-/issues/251. I'll describe the fix below.

The issue is caused by a problem in GTK. There is a fix available for it but it has not been released yet. To compile zathura against the GTK version that includes the fix install the unofficial release (special thanks to Tolga Tarhan (@ttarhan)):

brew uninstall gtk+3 --ignore-dependencies
brew install ttarhan/gtk-fix/gtk+3

After this, recompile zathura (for completeness I have included the steps to do so):

git clone https://git.pwmt.org/pwmt/zathura.git
cd zathura
meson build
cd build
ninja
ninja install

After this you should be able to run zathura again. Once the fix has been put on the official GTK release you should revert your homebrew packages back using:

brew uninstall gtk+3 --ignore-dependencies
brew untap ttarhan/gtk-fix/gtk+3
brew install gtk+3

Hope this helps!

@zegervdv
Copy link
Owner

@jvdoorn thanks for finding the fix.

Some remarks though:
You only need to install the gtk+3 tap manually, you can just recompile zathura via brew (you don't even seem to need the --HEAD version, 0.4.8 seems to work fine too. This will avoid you having to install zathura and plugins manually, which may be a pain to clean up later (which you also will need to do manually) if this eventually gets solved.

For me I got it to work with only these steps:

brew uninstall gtk+3 --ignore-dependencies
brew install ttarhan/gtk-fix/gtk+3

brew rm zathura-pdf-mupdf mathura
brew install zathura zathura-pdf-mupdf

I'm not even sure if reinstalling zathura is even needed, it might just be sufficient to update the gtk libraries.

@idr4n
Copy link
Author

idr4n commented Nov 12, 2021

@zegervdv Your solution works for me. I'm able to install Zathura in Monterrey now with the new meson update and installing ttarhan/gtk-fix/gtk+3 solves the displaying issue as well.

I'm closing this issue therefore. Thanks a lot for the help in sorting this out!

@idr4n idr4n closed this as completed Nov 12, 2021
@sbarrios93
Copy link

sbarrios93 commented Nov 17, 2021

Apparently the repo with the gtk fix does not exist anymore

> brew install ttarhan/gtk-fix/gtk+3

==> Tapping ttarhan/gtk-fix
Cloning into '/opt/homebrew/Library/Taps/ttarhan/homebrew-gtk-fix'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Error: Failure while executing; `git clone https://github.com/ttarhan/homebrew-gtk-fix /opt/homebrew/Library/Taps/ttarhan/homebrew-gtk-fix --origin=origin --template=` exited with 128.

Could someone help me out please?

@ttarhan
Copy link

ttarhan commented Nov 17, 2021

Hi! My temporarily fix repo is no longer needed as this patch is now in upstream Homebrew. Just “brew update” and “brew upgrade”, and you’ll be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants