zegervdv / homebrew-zathura

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

Unable to install due to pthread-stubs and gtk+-3.0 missing #100

Closed nouun closed 1 year ago

nouun commented 1 year ago

When trying to install through brew install zathura --HEAD I get the following error:

==> Fetching dependencies for zegervdv/zathura/zathura: girara
==> Fetching zegervdv/zathura/girara
==> Downloading https://github.com/pwmt/girara/archive/0.3.7.tar.gz
Already downloaded: /Users/nouun/Library/Caches/Homebrew/downloads/b41665f8aac659b07a8a0e1c7e0d72910eb06de9041ec9ec913349e74f7bc87f--girara-0.3.7.tar.gz
==> Fetching zegervdv/zathura/zathura
==> Downloading https://github.com/pwmt/zathura/archive/0.4.9.tar.gz
Already downloaded: /Users/nouun/Library/Caches/Homebrew/downloads/5e57874b5510a7b358d5e6978ec03b54711515bfd3ac67946efce81f85979a66--zathura-0.4.9.tar.gz
==> Installing zathura from zegervdv/zathura
==> Installing dependencies for zegervdv/zathura/zathura: girara
==> Installing zegervdv/zathura/zathura dependency: girara
==> meson --prefix=/opt/homebrew/Cellar/girara/0.3.7 --libdir=/opt/homebrew/Cellar/girara/0.3.7/lib --buildtype=release --wrap-mode=nofallback ..
Last 15 lines from /Users/nouun/Library/Logs/Homebrew/girara/01.meson:
Library m found: YES
Found pkg-config: /opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config (0.29.2)
Run-time dependency glib-2.0 found: YES 2.74.4
Found CMake: /opt/homebrew/opt/cmake/bin/cmake (3.25.1)
Run-time dependency gtk+-3.0 found: NO (tried framework and cmake)

../meson.build:35:0: ERROR: Dependency lookup for gtk+-3.0 with method 'pkgconfig' failed: Could not generate cargs for gtk+-3.0:
Package pthread-stubs was not found in the pkg-config search path.
Perhaps you should add the directory containing `pthread-stubs.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pthread-stubs', required by 'xcb', not found

A full log can be found at /private/tmp/girara-20230105-31416-1dpb0k6/girara-0.3.7/build/meson-logs/meson-log.txt
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
mrrms commented 1 year ago

Me too. Run-time dependency girara-gtk3 found: NO (tried pkgconfig, framework and cmake)

EphraimSiegfried commented 1 year ago

Same situation on my Mac. A week ago I was able to install it without any problems. I deleted it and tried to reinstall it with the command brew install zathura --with-synctex but it failed. I tried many other ways to install Zathura with homebrew, but I got the same problem. I followed this thread https://github.com/zegervdv/homebrew-zathura/issues/35 but that didn`t help either.

zegervdv commented 1 year ago

Seems like the package was renamed: homebrew change.

Try brew edit girara and update gtk+ to gtk+3. If this fixes it I'll update the Formulae.

jowodo commented 1 year ago

I tried to edit the girara package, but it was already updated to gtk+3. when i did brew install zathura I get:

==> Installing zathura from zegervdv/zathura
==> Installing dependencies for zegervdv/zathura/zathura: girara
==> Installing zegervdv/zathura/zathura dependency: girara
==> meson --prefix=/opt/homebrew/Cellar/girara/0.3.7 --libdir=/opt/homebrew/Cellar/girara/0.3.7/liLast 15 lines from /Users/brew/Library/Logs/Homebrew/girara/01.meson:
Library m found: YES
Found pkg-config: /opt/homebrew/Library/Homebrew/shims/mac/super/pkg-config (0.29.2)
Run-time dependency glib-2.0 found: YES 2.74.4
Found CMake: /opt/homebrew/opt/cmake/bin/cmake (3.25.1)
Run-time dependency gtk+-3.0 found: NO (tried framework and cmake)

../meson.build:35:0: ERROR: Dependency lookup for gtk+-©h3.0 with method 'pkgconfig' failed: Could not generate cargs for gtk+-3.0:
Package pthread-stubs was not found in the pkg-config search path.
Perhaps you should add the directory containing `pthread-stubs.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pthread-stubs', required by 'xcb', not found

I tried to include PKG_CONFIG_PATH to the command but got the same error. I tried to edit xcb in the same way as advised above brew edit libxcb but in the code it says that on macos pthread-stubs is dropped but at the end of the editable file I see:


__END__
diff --git a/configure b/configure
index 2503d4b..0c36685 100755
--- a/configure
+++ b/configure
@@ -20662,7 +20662,7 @@ printf "%s\n" "yes" >&6; }
 fi
 NEEDED="xau >= 0.99.2"
 case $host_os in
-linux*) ;;
+linux*|darwin*) ;;
      *) NEEDED="$NEEDED pthread-stubs" ;;
 esac

I don't really know what to do with this info but I hope it may be useful

mrrms commented 1 year ago

I also found that the girara package was already updated to gtk+3.

After trying brew install zathura --HEAD, the following emerged:

Not looking for a fallback subproject for the dependency girara-gtk3 because:
Use of fallback dependencies is disabled.

../meson.build:40:0: ERROR: Dependency 'girara-gtk3' is required but not found.

Not sure of this additional error message is useful... The following happens when attempting to open a pdf with zathura ---.pdf:

error: could not open plugin directory: /usr/local/lib/zathura
error: Found no plugins. Please install at least one plugin.
2023-01-10 15:24:00.160 zathura[19683:83933] apply_selection_policy_once: prefer use of removable GPUs (via (null):GPUSelectionPolicy->preferRemovable)
error: Could not determine file type.
Screen Shot 2023-01-10 at 15 35 11
clanktron commented 1 year ago

I'm also experiencing this issue. Currently on Monterey 12.6.2.

eiiot commented 1 year ago

Same issue here. Ventura 13.0.1

DennisFeldbusch commented 1 year ago

Same issue for Ventura 13.1

zegervdv commented 1 year ago

Okay, I was a bit too fast to jump to conclusions.

Can you try adding depends_on "libpthread-stubs" to the girara Formula?

jowodo commented 1 year ago

try adding depends_on "libpthread-stubs" to the girara Formula?

Wow this did the trick! Thanks for the fast feedback!

brew edit girara 
# add `depends_on "libpthread-stubs"` to dependencies
brew install zathura-pdf-mupdf
# follow instructions on the screen
mkdir -p $(brew --prefix zathura)/lib/zathura
ln -s $(brew --prefix zathura-pdf-mupdf)/libpdf-mupdf.dylib $(brew --prefix zathura)/lib/zathura/libpdf-mupdf.dylib
DennisFeldbusch commented 1 year ago

Okay, I was a bit too fast to jump to conclusions.

Can you try adding depends_on "libpthread-stubs" to the girara Formula?

It's working 🥳

zegervdv commented 1 year ago

Thanks for confirming. I'll push the fix tomorrow.

McFrappe commented 1 year ago

Adding the line depends_on "libpthread-stubs" solved the issue for me when it comes to girara. However, once i am trying to brew install zathura-pdf-mupdf, i get the following error in the last installation of the zathura package:

Installing zegervdv/zathura/zathura-pdf-mupdf dependency: zathura
==> meson  --prefix=/opt/homebrew/Cellar/zathura/0.4.9 --libdir=/opt/homebrew/Cellar/zathura/0.4.9/lib --buildtype=relea
Last 15 lines from /Users/fadde/Library/Logs/Homebrew/zathura/01.meson:
2023-01-13 11:15:12 +0000

meson
--prefix=/opt/homebrew/Cellar/zathura/0.4.9
--libdir=/opt/homebrew/Cellar/zathura/0.4.9/lib
--buildtype=release
--wrap-mode=nofallback
..

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
brew install zathura-pdf-mupdf fails https://github.com/zegervdv/homebrew-zathura/issues/66
Zathura crashing on segmentation fault https://github.com/zegervdv/homebrew-zathura/issues/47
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
zathura not showing up on MacOS https://github.com/zegervdv/homebrew-zathura/issues/74
Can't install Zathura in MacOS 12.2 Beta https://github.com/zegervdv/homebrew-zathura/issues/87
Cannot install zathura on Big Sur 11.5.2 https://github.com/zegervdv/homebrew-zathura/issues/80
Method to run zathura as default pdf viewer https://github.com/zegervdv/homebrew-zathura/issues/78
zathura isn't launched from ViM without --with-synctex https://github.com/zegervdv/homebrew-zathura/issues/50

I have tried uninstalling meson and installing it again seperately, and then running the zathura install again, no success unfortunately. Have you come across this @zegervdv? Maybe im not noticing something trivial about this...

zegervdv commented 1 year ago

@McFrappe I'm not seeing an error here. Can you try brew rm zathura && brew install zathura?

McFrappe commented 1 year ago

@McFrappe I'm not seeing an error here. Can you try brew rm zathura && brew install zathura?

doing rm gives:

~ brew rm zathura
Error: No such keg: /opt/homebrew/Cellar/zathura

Most certainly because i cannot install it in the first place...

And installing zathura results in the same error as stated above...

zegervdv commented 1 year ago

Can you check /Users/fadde/Library/Logs/Homebrew/zathura/01.meson for any errors? Because that output above isn't saying much

McFrappe commented 1 year ago

Can you check /Users/fadde/Library/Logs/Homebrew/zathura/01.meson for any errors? Because that output above isn't saying much

Yes, sorry about that, heres the output of the file 01.meson

2023-01-14 22:03:34 +0000

meson 
--prefix=/opt/homebrew/Cellar/zathura/0.4.9
--libdir=/opt/homebrew/Cellar/zathura/0.4.9/lib
--buildtype=release
--wrap-mode=nofallback
..

HOMEBREW_VERSION: 3.6.18-54-g3e25789
ORIGIN: https://github.com/Homebrew/brew
HEAD: 3e257890da96b4cc44f5933e3a54aee2b47549de
Last commit: 25 hours ago
Branch: master
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 03aad98e7700a6a9fa6f4892fb2dfeeb08eb7423
Core tap last commit: 34 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vi
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_NO_BOOTSNAP: set
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.37.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.85.0 => /usr/bin/curl
macOS: 13.1-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: 14.2
Rosetta 2: false

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j10
CMAKE_PREFIX_PATH: /opt/homebrew/opt/icu4c:/opt/homebrew/opt/openssl@1.1:/opt/homebrew/opt/readline:/opt/homebrew/opt/sqlite:/opt/homebrew/opt/sphinx-doc:/opt/homebrew
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
CMAKE_FRAMEWORK_PATH: /opt/homebrew/opt/python@3.11/Frameworks
PKG_CONFIG_PATH: /opt/homebrew/opt/libpng/lib/pkgconfig:/opt/homebrew/opt/freetype/lib/pkgconfig:/opt/homebrew/opt/fontconfig/lib/pkgconfig:/opt/homebrew/opt/pcre2/lib/pkgconfig:/opt/homebrew/opt/glib/lib/pkgconfig:/opt/homebrew/opt/libxau/lib/pkgconfig:/opt/homebrew/opt/libxdmcp/lib/pkgconfig:/opt/homebrew/opt/libxcb/lib/pkgconfig:/opt/homebrew/opt/libx11/lib/pkgconfig:/opt/homebrew/opt/libxext/lib/pkgconfig:/opt/homebrew/opt/libxrender/lib/pkgconfig:/opt/homebrew/opt/lzo/lib/pkgconfig:/opt/homebrew/opt/pixman/lib/pkgconfig:/opt/homebrew/opt/cairo/lib/pkgconfig:/opt/homebrew/opt/jpeg-turbo/lib/pkgconfig:/opt/homebrew/opt/lz4/lib/pkgconfig:/opt/homebrew/opt/xz/lib/pkgconfig:/opt/homebrew/opt/zstd/lib/pkgconfig:/opt/homebrew/opt/libtiff/lib/pkgconfig:/opt/homebrew/opt/gdk-pixbuf/lib/pkgconfig:/opt/homebrew/opt/fribidi/lib/pkgconfig:/opt/homebrew/opt/graphite2/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/harfbuzz/lib/pkgconfig:/opt/homebrew/opt/pango/lib/pkgconfig:/opt/homebrew/opt/librsvg/lib/pkgconfig:/opt/homebrew/opt/atk/lib/pkgconfig:/opt/homebrew/opt/libepoxy/lib/pkgconfig:/opt/homebrew/opt/gtk+3/lib/pkgconfig:/opt/homebrew/opt/json-c/lib/pkgconfig:/opt/homebrew/opt/libnotify/lib/pkgconfig:/opt/homebrew/opt/libpthread-stubs/lib/pkgconfig:/opt/homebrew/opt/girara/lib/pkgconfig:/opt/homebrew/opt/libmagic/lib/pkgconfig:/opt/homebrew/opt/openssl@1.1/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/sqlite/lib/pkgconfig:/opt/homebrew/opt/python@3.11/lib/pkgconfig:/opt/homebrew/opt/gtk+/lib/pkgconfig:/opt/homebrew/opt/gtk-mac-integration/lib/pkgconfig:/opt/homebrew/opt/xorgproto/share/pkgconfig:/opt/homebrew/opt/adwaita-icon-theme/share/pkgconfig:/opt/homebrew/opt/gsettings-desktop-schemas/share/pkgconfig:/opt/homebrew/opt/girara/lib/x86_64-linux-gnu/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk
ACLOCAL_PATH: /opt/homebrew/share/aclocal
PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/opt/homebrew/opt/cmake/bin:/opt/homebrew/opt/meson/bin:/opt/homebrew/opt/ninja/bin:/opt/homebrew/opt/pkg-config/bin:/opt/homebrew/opt/libpng/bin:/opt/homebrew/opt/freetype/bin:/opt/homebrew/opt/fontconfig/bin:/opt/homebrew/opt/pcre2/bin:/opt/homebrew/opt/gettext/bin:/opt/homebrew/opt/glib/bin:/opt/homebrew/opt/cairo/bin:/opt/homebrew/opt/jpeg-turbo/bin:/opt/homebrew/opt/lz4/bin:/opt/homebrew/opt/xz/bin:/opt/homebrew/opt/zstd/bin:/opt/homebrew/opt/libtiff/bin:/opt/homebrew/opt/gdk-pixbuf/bin:/opt/homebrew/opt/fribidi/bin:/opt/homebrew/opt/graphite2/bin:/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/harfbuzz/bin:/opt/homebrew/opt/pango/bin:/opt/homebrew/opt/librsvg/bin:/opt/homebrew/opt/desktop-file-utils/bin:/opt/homebrew/opt/gtk+3/bin:/opt/homebrew/opt/libnotify/bin:/opt/homebrew/opt/intltool/bin:/opt/homebrew/opt/openssl@1.1/bin:/opt/homebrew/opt/sqlite/bin:/opt/homebrew/opt/python@3.11/bin:/opt/homebrew/opt/docutils/bin:/opt/homebrew/opt/pygments/bin:/opt/homebrew/opt/sphinx-doc/bin:/opt/homebrew/opt/gtk+/bin:/opt/homebrew/opt/python@3.11/libexec/bin:/usr/bin:/bin:/usr/sbin:/sbin
McFrappe commented 1 year ago

oh, uh ok this was weird. I solved it by untapping and autoremoving packages. Then tapping again and installing solved it... Thanks anyway @zegervdv!

zegervdv commented 1 year ago

I guess the old 'turning it off and on again' always works. Great to hear it's fixed.