zegervdv / homebrew-zathura

Homebrew formulae to build Zathura on Mac OS X
548 stars 43 forks source link

ld: library not found for -lmagic #13

Closed Skyfold closed 7 years ago

Skyfold commented 8 years ago

Here is the Homebrew log of the build. It fails when trying to link -lmagic

2016-08-01 14:19:18 +1000

make

zathura build options:
CFLAGS  = -std=c11 -pedantic -Wall -Wno-format-zero-length -Wextra -D_REENTRANT -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/glib/2.48.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.48.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.48.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.23/include/libpng16 -I/usr/local/Cellar/freetype/2.6.5/include/freetype2 -I/usr/local/Cellar/fontconfig/2.11.1_4/include -I/usr/local/Cellar/freetype/2.6.5/include/freetype2 -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.6_1/include/cairo -I/usr/local/Cellar/gdk-pixbuf/2.34.0/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/atk/2.20.0/include/atk-1.0 -I/usr/local/Cellar/libepoxy/1.3.1/include -I/usr/local/Cellar/harfbuzz/1.2.7/include/harfbuzz -I/usr/local/Cellar/pango/1.40.1/include/pango-1.0 -I/usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0 -I/usr/local/Cellar/girara/0.2.6/include -D_REENTRANT -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/glib/2.48.1/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.48.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.48.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.23/include/libpng16 -I/usr/local/Cellar/freetype/2.6.5/include/freetype2 -I/usr/local/Cellar/fontconfig/2.11.1_4/include -I/usr/local/Cellar/freetype/2.6.5/include/freetype2 -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.6_1/include/cairo -I/usr/local/Cellar/gdk-pixbuf/2.34.0/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/atk/2.20.0/include/atk-1.0 -I/usr/local/Cellar/libepoxy/1.3.1/include -I/usr/local/Cellar/harfbuzz/1.2.7/include/harfbuzz -I/usr/local/Cellar/pango/1.40.1/include/pango-1.0 -I/usr/local/Cellar/gtk+3/3.20.6/include/gtk-3.0 -D_REENTRANT -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/glib/2.48.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.48.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -D_REENTRANT -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/glib/2.48.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.48.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include -I/usr/local/Cellar/glib/2.48.1/include/glib-2.0 -I/usr/local/Cellar/glib/2.48.1/lib/glib-2.0/include -I/usr/local/opt/gettext/include  
LIBS    = -L/usr/local/Cellar/girara/0.2.6/lib -lgirara-gtk3 -L/usr/local/Cellar/glib/2.48.1/lib -L/usr/local/opt/gettext/lib -L/usr/local/Cellar/cairo/1.14.6_1/lib -L/usr/local/Cellar/gdk-pixbuf/2.34.0/lib -L/usr/local/Cellar/atk/2.20.0/lib -L/usr/local/Cellar/pango/1.40.1/lib -L/usr/local/Cellar/gtk+3/3.20.6/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -L/usr/local/Cellar/glib/2.48.1/lib -L/usr/local/opt/gettext/lib -lgthread-2.0 -lglib-2.0 -lintl -L/usr/local/Cellar/glib/2.48.1/lib -L/usr/local/opt/gettext/lib -lgmodule-2.0 -lglib-2.0 -lintl -L/usr/local/Cellar/glib/2.48.1/lib -L/usr/local/opt/gettext/lib -lglib-2.0 -lintl -lpthread -lm -lsqlite3 -lmagic
DFLAGS  = -g
CC      = clang
make[1]: Nothing to be done for `man'.
 [CC] zathura/adjustment.c (B
 [MSGFMT] ca (B
 [MSGFMT] cs (B
 [CC] zathura/bookmarks.c (B
 [MSGFMT] de (B
 [MSGFMT] el (B
 [MSGFMT] eo (B
 [MSGFMT] es (B
 [MSGFMT] es_CL (B
 [MSGFMT] et (B
 [MSGFMT] fr (B
 [CC] zathura/callbacks.c (B
 [MSGFMT] he (B
 [MSGFMT] hr (B
 [MSGFMT] id_ID (B
 [MSGFMT] it (B
 [MSGFMT] lt (B
 [MSGFMT] no (B
 [CC] zathura/commands.c (B
 [MSGFMT] pl (B
 [MSGFMT] pt_BR (B
 [MSGFMT] ru (B
 [MSGFMT] ta_IN (B
 [MSGFMT] tr (B
 [MSGFMT] uk_UA (B
 [CC] zathura/completion.c (B
 [CC] zathura/config.c (B
 [CC] zathura/content-type.c (B
 [CC] zathura/database-plain.c (B
 [CC] zathura/database-sqlite.c (B
 [CC] zathura/database.c (B
 [CC] zathura/dbus-interface.c (B
 [CC] zathura/document.c (B
 [CC] zathura/jumplist.c (B
 [CC] zathura/links.c (B
 [CC] zathura/main.c (B
 [CC] zathura/marks.c (B
 [CC] zathura/page-widget.c (B
 [CC] zathura/page.c (B
 [CC] zathura/plugin.c (B
 [CC] zathura/print.c (B
 [CC] zathura/render.c (B
 [CC] zathura/shortcuts.c (B
 [CC] zathura/synctex.c (B
 [CC] zathura/types.c (B
 [CC] zathura/utils.c (B
 [CC] zathura/zathura.c (B
 [CC] zathura/css-definitions.c (B
 [CC] zathura/dbus-interface-definitions.c (B
 [CC] build/release/bin/zathura (B
ld: library not found for -lmagic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/release/bin/zathura] Error 1

HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: cdf4f42ab951214fb7fac0781091783552415944
Last commit: 3 weeks ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 8d95ccdd5168d89e500d49222af001f13cf5430c
Core tap last commit: 3 weeks ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p481
GCC-4.2: build 5666
Clang: 7.0 build 700
Git: 2.5.4 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_60, 1.8.0_11
OS X: 10.10.5-x86_64
Xcode: 7.2.1
CLT: 7.2.0.0.1.1447826929
X11: 2.7.8 => /opt/X11

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local/opt/gettext:/usr/local/opt/libffi:/usr/local/opt/icu4c:/usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/opt/X11/include:/opt/X11/include/freetype2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /opt/X11/lib:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
MACOSX_DEPLOYMENT_TARGET: 10.10
PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/pcre/lib/pkgconfig:/usr/local/opt/glib/lib/pkgconfig:/usr/local/opt/libtiff/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig:/usr/local/opt/freetype/lib/pkgconfig:/usr/local/opt/fontconfig/lib/pkgconfig:/usr/local/opt/pixman/lib/pkgconfig:/usr/local/opt/cairo/lib/pkgconfig:/usr/local/opt/gobject-introspection/lib/pkgconfig:/usr/local/opt/gdk-pixbuf/lib/pkgconfig:/usr/local/opt/atk/lib/pkgconfig:/usr/local/opt/libepoxy/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/harfbuzz/lib/pkgconfig:/usr/local/opt/pango/lib/pkgconfig:/usr/local/opt/gtk+3/lib/pkgconfig:/usr/local/opt/girara/lib/pkgconfig:/usr/local/opt/gsettings-desktop-schemas/share/pkgconfig:/usr/local/opt/gnome-icon-theme/share/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10:/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig
ACLOCAL_PATH: /usr/local/opt/gettext/share/aclocal:/usr/local/share/aclocal:/opt/X11/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/pkg-config/bin:/usr/local/opt/gettext/bin:/usr/local/opt/pcre/bin:/usr/local/opt/glib/bin:/usr/local/opt/jpeg/bin:/usr/local/opt/libtiff/bin:/usr/local/opt/libpng/bin:/usr/local/opt/freetype/bin:/usr/local/opt/fontconfig/bin:/usr/local/opt/cairo/bin:/usr/local/opt/gobject-introspection/bin:/usr/local/opt/gdk-pixbuf/bin:/usr/local/opt/icu4c/bin:/usr/local/opt/harfbuzz/bin:/usr/local/opt/pango/bin:/usr/local/opt/gtk+3/bin:/opt/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin
zegervdv commented 8 years ago

Can you do a brew update and see if it still happens? Zathura has a dependency set on libmagic, I would not expect to see these kind of issues.

Can you also check if libmagic was installed correctly? And maybe run a brew doctor just to see if no pointers pop up in there.

Skyfold commented 8 years ago

I ran brew update and then brew install zathura. Zathura installs, but I get these warnings:

Warning: Calling Resource#sha1 is deprecated! Use Resource#sha256 instead. /usr/local/Library/Taps/zegervdv/homebrew-zathura/zathura.rb:9:in `class:Zathura' Please report this to the zegervdv/zathura tap!

Warning: Calling Formula.sha1 is deprecated! Use Formula.sha256 instead. /usr/local/Library/Taps/zegervdv/homebrew-zathura/zathura.rb:9:in `class:Zathura' Please report this to the zegervdv/zathura tap!

Warning: Calling SoftwareSpec#sha1 is deprecated! Use SoftwareSpec#sha256 instead. /usr/local/Library/Taps/zegervdv/homebrew-zathura/zathura.rb:9:in `class:Zathura' Please report this to the zegervdv/zathura tap!

Warning: Calling Pathname#sha1 is deprecated! Use Pathname#sha256 instead. /usr/local/Library/Homebrew/extend/pathname.rb:320:in `verify_checksum'

When I try to run Zathura I get these errors: 2016-08-22 19:59:07.683 zathura[43948:5714517] *\ WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. error: could not open plugin directory: /usr/local/Cellar/zathura/0.3.6/lib/zathura error: Unknown file type: 'application/pdf'

The path /usr/local/Cellar/zathura/0.3.6/lib/zathura is not created by the formula. I think the other errors are from zathura itself.

zegervdv commented 8 years ago

Ok, the deprecation warnings are nothing to worry about (yet). Did you install the poppler-pdf plugin? Zathura on its own is just a viewer, it needs a specific implementation to decode pdfs in this case.