zegervdv / homebrew-zathura

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

Problem with reinstalling zathura-pdf-poppler #19

Closed moozzz closed 7 years ago

moozzz commented 7 years ago

I got the following error message while trying to upgrade/reinstall zathura-pdf-poppler:

Reinstalling zegervdv/zathura/zathura-pdf-poppler 
==> Downloading https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-0.2.5.tar.gz
Already downloaded: /Users/maxim/Library/Caches/Homebrew/zathura-pdf-poppler-0.2.5.tar.gz
==> Downloading https://raw.githubusercontent.com/zegervdv/homebrew-zathura/master/zathura-pdf-poppler-config.mk.diff
Already downloaded: /Users/maxim/Library/Caches/Homebrew/zathura-pdf-poppler--patch-7acaaeeb5e75bf7cff864a850fc763d17a6a34dcbd3e11487d4d04a2904c8f49.diff
==> Downloading https://raw.githubusercontent.com/zegervdv/homebrew-zathura/master/zathura-pdf-poppler-Makefile.diff
Already downloaded: /Users/maxim/Library/Caches/Homebrew/zathura-pdf-poppler--patch-a3ee7155707028806e1abb9e4bdf88bfc7bd71cebd10e6ac741285b8e26b0e05.diff
==> Patching
==> Applying zathura-pdf-poppler-config.mk.diff
patching file config.mk
==> Applying zathura-pdf-poppler-Makefile.diff
patching file Makefile
==> make
==> make install
Last 15 lines from /Users/maxim/Library/Logs/Homebrew/zathura-pdf-poppler/02.make:
2017-08-13 22:18:46 +0200

make install

pdf build options:
CFLAGS  = -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length -I/usr/local/Cellar/pcre/8.41/include -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.12.4/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.10/include/cairo -D_REENTRANT -I/usr/local/Cellar/pcre/8.41/include -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.12.4/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.10/include/cairo -I/usr/local/Cellar/poppler/0.57.0_1/include/poppler/glib -I/usr/local/Cellar/poppler/0.57.0_1/include/poppler -D_REENTRANT -I/usr/local/Cellar/pcre/8.41/include -I/usr/local/Cellar/glib/2.52.3/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.12.4/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.10/include/cairo -I/usr/local/Cellar/gdk-pixbuf/2.36.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/atk/2.24.0/include/atk-1.0 -I/usr/local/Cellar/libepoxy/1.4.3/include -I/usr/local/Cellar/graphite2/1.3.10/include -I/usr/local/Cellar/harfbuzz/1.4.8_1/include/harfbuzz -I/usr/local/Cellar/pango/1.40.9/include/pango-1.0 -I/usr/local/Cellar/gtk+3/3.22.18/include/gtk-3.0 -I/usr/local/Cellar/girara/0.2.7/include -I/usr/local/Cellar/zathura/0.3.7/include -D_REENTRANT -I/usr/local/Cellar/pcre/8.41/include -I/usr/local/Cellar/glib/2.52.3/include/gio-unix-2.0/ -I/usr/local/Cellar/glib/2.52.3/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.3/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libpng/1.6.31/include/libpng16 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.12.4/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/cairo/1.14.10/include/cairo -I/usr/local/Cellar/gdk-pixbuf/2.36.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/atk/2.24.0/include/atk-1.0 -I/usr/local/Cellar/libepoxy/1.4.3/include -I/usr/local/Cellar/graphite2/1.3.10/include -I/usr/local/Cellar/harfbuzz/1.4.8_1/include/harfbuzz -I/usr/local/Cellar/pango/1.40.9/include/pango-1.0 -I/usr/local/Cellar/gtk+3/3.22.18/include/gtk-3.0 -I/usr/local/Cellar/girara/0.2.7/include
LDFLAGS = -fPIC -fno-common
DFLAGS  = -g
CC      = clang
installing pdf plugin
cp: /usr/local/Cellar/zathura/0.3.7/lib/zathura/pdf.dylib: Operation not permitted
make: *** [install] Error 1

Which is really weird since brew does have all the necessary permissions in /usr/local/...

zegervdv commented 7 years ago

I am seeing the same issue. It seems access is blocked while running inside brew. I have changed the zathura-pdf-poppler install to place the plugin in its own directory, but it needs to be symlinked to the zathura plugin directory manually like so:

$ mkdir -p $(brew --prefix zathura)/lib/zathura
$ ls -s $(brew --prefix zathura-pdf-poppler)/lib/pdf.dylib $(brew --prefix zathura)/lib/zathura/pdf.so

I'm trying to figure out if there is a way to do it automatically during the brew install.

zegervdv commented 7 years ago

Homebrew has turned on sandboxing for all installs: homebrew/brew#2986

So the manual linking seems to be the only way around it.