=app-text/zathura-0.3.4 fails to build on my x86_64 system: * Package: app-text/zathura-0.3.4 * Repository: gentoo * Maintainer: ssuominen@gentoo.org xmw@gentoo.org * Upstream: mlq@pwmt.org sebastian+dev@ramacher.at http://bugs.pwmt.org/ * USE: abi_x86_64 amd64 elibc_glibc kernel_linux magic userland_GNU * FEATURES: compressdebug preserve-libs sandbox splitdebug userpriv usersandbox >>> Unpacking source... >>> Unpacking zathura-0.3.4.tar.gz to /var/tmp/portage/app-text/zathura-0.3.4/work >>> Source unpacked in /var/tmp/portage/app-text/zathura-0.3.4/work >>> Preparing source in /var/tmp/portage/app-text/zathura-0.3.4/work/zathura-0.3.4 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-text/zathura-0.3.4/work/zathura-0.3.4 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-text/zathura-0.3.4/work/zathura-0.3.4 ... make -j5 WITH_SYSTEM_SYNCTEX=0 WITH_MAGIC=1 WITH_SQLITE=0 PREFIX=/usr LIBDIR=${PREFIX}/lib64 CC=x86_64-pc-linux-gnu-gcc SFLAGS= VERBOSE=1 DESTDIR=/var/tmp/portage/app-text/zathura-0.3.4/image/ sed -e 's/ZVMAJOR/0/' \ -e 's/ZVMINOR/3/' \ -e 's/ZVREV/4/' \ -e 's/ZVAPI/2/' \ -e 's/ZVABI/2/' zathura/version.h.in > zathura/version.h.tmp zathura build options: CFLAGS = -march=native -O2 -pipe -g -std=c11 -pedantic -Wall -Wno-format-zero-length -Wextra -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-un ix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/in clude/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/json-c -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cai ro -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib6 4/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include LIBS = -lgirara-gtk3 -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 -lgthread-2.0 -pthread -lglib-2.0 -lgmodule-2.0 -pthread -lglib-2.0 -lglib-2.0 -lpthread -lm -lmagic DFLAGS = -g CC = x86_64-pc-linux-gnu-gcc [...] x86_64-pc-linux-gnu-gcc -c -D_FILE_OFFSET_BITS=64 -fdiagnostics-color=always -DWITH_MAGIC -DZATHURA_PLUGINDIR=\"/usr/lib64/zathura\" -DGETTEXT_PACKAGE=\"zathura\" -DLOCALEDIR=\"/usr/share/locale\" -march=native -O2 -pipe -g -std=c11 -pedantic -Wall -Wno-format-zero-length -Wextra -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/json-c -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -o build/release/zathura/main.o zathura/main.c -MMD -MF .depend/build/release/zathura/main.o.dep [...] zathura/main.c: In function ‘init_zathura’: zathura/main.c:89:11: warning: unused parameter ‘synctex_editor’ [-Wunused-parameter] char* synctex_editor, Window embed) ^ zathura/main.c: In function ‘main’: zathura/main.c:254:26: error: ‘synctex_editor’ undeclared (first use in this function) plugin_path, argv, synctex_editor, embed); ^ zathura/main.c:254:26: note: each undeclared identifier is reported only once for each function it appears in Makefile:103: recipe for target 'build/release/zathura/main.o' failed This is because the synctex_editor variable unconditionally used at line 254 is defined at line 139 only if WITH_SYNCTEX is defined: #ifdef WITH_SYNCTEX gchar* synctex_editor = NULL; gchar* synctex_fwd = NULL; #endif and WITH_SYNCTEX is not defined on my system because test in config.mk: # synctex # To disable support for synctex with libsynctex set WITH_SYNCTEX to 0. WITH_SYNCTEX ?= $(shell (${PKG_CONFIG} synctex && echo 1) || echo 0) does find synctex pkg-congfig module on my system because I have no synctex installed. The bug is at the zathura/main.c:254. The synctex_editor argument should be replaced with NULL, if WITH_SYNCTEX is not defined.
Created attachment 422348 [details, diff] Fix
Another possible fix would be to move the declaration of synctex_editor out of the "#ifdef WITH_SYNCTEX" block.
That would yield defined-but-not-used-variable warning.
(In reply to Petr Pisar from comment #1) Patch worked here. Thank you.
Many thanks for the patch! (BTW, I think it would be nice if this fix would be reported upstream.)
Ok, upstream report would be nice. I apply the patch for now, but the current situation is a 'automagic dependency' (I have /usr/lib64/pkgconfig/synctex.pc out of app-text/texlive-core), which should be fixed via a) unconditional dependency or b) buildsystem fix. a) would suck, 'cause texlive is rather big b) needs some minutes. i do b) later.
commit 49a9be262442a9b4abfcef47a81661d8a59478fb Author: Michael Weber <xmw@gentoo.org> Date: Tue Jan 12 22:24:30 2016 +0100 app-text/zathura: Add USE=synctex and update live euild (bug 571346). Package-Manager: portage-2.2.26 app-text/zathura/metadata.xml app-text/zathura/zathura-0.3.4.ebuild app-text/zathura/zathura-9999.ebuild commit 568fab566516a0c9a68ea9e8a290ffcbb9ef13de Author: Michael Weber <xmw@gentoo.org> Date: Tue Jan 12 18:28:11 2016 +0100 app-text/zathura: Fix for missing synctex (thanks Petr Pisar, bug 571346). Package-Manager: portage-2.2.26 app-text/zathura/files/zathura-0.3.4-synctex.patch app-text/zathura/zathura-0.3.4.ebuild