Nixpkgs: zathura doesn't build if synctexSupport is set

Created on 29 Jul 2019  路  12Comments  路  Source: NixOS/nixpkgs

Trying to build zathura on unstable, I get:

Did not find CMake 'cmake'
Found CMake: NO
Dependency synctex found: NO (tried pkgconfig)

meson.build:72:0: ERROR: Dependency "synctex" not found, tried pkgconfig

Additional context
I can't really see what might have changed recently (I think it started happening about 2 weeks ago....) for it to no longer find synctex. The texlive package is being included as a build input, which should have synctex

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.2.3, NixOS, 19.09.git.ddbf83c58f8 (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(root): "nixos-19.03pre153097.06df7c9a332"
  • nixpkgs: /home/rembo10/code/nixpkgs/run
bug

Most helpful comment

Oh my god, you're totally right. I had an overlay in my ~/.config/nixpkgs, which I think I had to add to disable synctex at one point when it wasn't working. Removing that and it builds fine. So sorry for wasting your guys' time but thanks for the help! (Although I wonder why it says it can't find synctex when it should have been disabled with the overlay?) Anyways, I'll close this issue, thanks again, it was driving me crazy!

All 12 comments

I can build zathura on master and the hydra job has been doing ok.
Am I missing something?

Hm, I'm not sure. I can't seem to get it to build.... "nix-build -A zathura" on master gives me the same error

This also builds for me on master. Only thing i can think of is your branch isn't up to date.
git checkout master && git pull origin master

What do you think could be wrong? My sources are up to date:

$ git rev-parse HEAD
3e17fe45223a3734971c8da5a68e4dbe3ebc2c2e`
$ nix-build -A zathura
these derivations will be built:
  /nix/store/xhw65cjxj1my4xh1npzg539n1c26fzvv-zathura-core-0.4.3.drv
  /nix/store/40w50blmkjqaakybsij8qcxww8galvqb-zathura-pdf-mupdf-0.3.4.drv
  /nix/store/9ml2qcwh7lpnb4k4422kjkr1y23k9jmk-zathura-cb-0.1.8.drv
  /nix/store/dww281b32nfrfx7bvh6a52n4izm973dj-zathura-djvu-0.2.8.drv
  /nix/store/sjg8allnz21safggqq9pzz3v669vxyw4-zathura-ps-0.2.6.drv
  /nix/store/avcs1gyl5ymlbs0jhdjgfciww4x7j747-zathura-with-plugins-0.4.3.drv
building '/nix/store/xhw65cjxj1my4xh1npzg539n1c26fzvv-zathura-core-0.4.3.drv'...
unpacking sources
unpacking source archive /nix/store/n0h6ayib72i0n6rp23llh9d7yc45lwcn-zathura-0.4.3.tar.xz
source root is zathura-0.4.3
setting SOURCE_DATE_EPOCH to timestamp 1545492803 of file zathura-0.4.3/zathura/zathura.h
patching sources
configuring
meson flags: --buildtype=plain         --libdir=/nix/store/jln4hb15xwfb8gd58p4qdvih2jwyv4iv-zathura-core-0.4.3/lib --libexecdir=/nix/store/jln4hb15xwfb8gd58p4qdvih2jwyv4iv-zathura-core-0.4.3/libexec         --bindir=/nix/store/8i519ira8ql7crcpxfp18v49cqjvn01m-zathura-core-0.4.3-bin/bin --sbindir=/nix/store/8i519ira8ql7crcpxfp18v49cqjvn01m-zathura-core-0.4.3-bin/sbin         --includedir=/nix/store/vk36kjglxq979knf41dr6h0rknyrc1s2-zathura-core-0.4.3-dev/include         --mandir=/nix/store/smqfi6jw021yshbrwb5ipqgip5b88f62-zathura-core-0.4.3-man/share/man --infodir=/nix/store/8i519ira8ql7crcpxfp18v49cqjvn01m-zathura-core-0.4.3-bin/share/info         --localedir=/nix/store/jln4hb15xwfb8gd58p4qdvih2jwyv4iv-zathura-core-0.4.3/share/locale         -Dauto_features=enabled         -Dwrap_mode=nodownload         --prefix=/nix/store/jln4hb15xwfb8gd58p4qdvih2jwyv4iv-zathura-core-0.4.3 -Dsqlite=enabled -Dmagic=enabled -Dmanpages=enabled -Dconvert-icon=enabled
The Meson build system
Version: 0.50.1
Source dir: /build/zathura-0.4.3
Build dir: /build/zathura-0.4.3/build
Build type: native build
Project name: zathura
Project version: 0.4.3
Native C compiler: /nix/store/hpzj855nkgjvg58nrhq4910sb9q3kss1-gcc-wrapper-7.4.0/bin/cc (gcc 7.4.0 "gcc (GCC) 7.4.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Library m found: YES
Found pkg-config: /nix/store/01a3dppfi3rv03m8yx2nwxbkklggyzf9-pkg-config-0.29.2/bin/pkg-config (0.29.2)
Dependency girara-gtk3 found: YES 0.3.2
Dependency glib-2.0 found: YES 2.60.4
Dependency gio-unix-2.0 found: YES 2.60.4
Dependency gthread-2.0 found: YES 2.60.4
Dependency gmodule-no-export-2.0 found: YES 2.60.4
Dependency gtk+-3.0 found: YES 3.24.10
Dependency cairo found: YES 1.16.0
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -pedantic: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Dependency sqlite3 found: YES 3.28.0
Did not find CMake 'cmake'
Found CMake: NO
Dependency synctex found: NO (tried pkgconfig)

meson.build:72:0: ERROR: Dependency "synctex" not found, tried pkgconfig

A full log can be found at /build/zathura-0.4.3/build/meson-logs/meson-log.txt
builder for '/nix/store/xhw65cjxj1my4xh1npzg539n1c26fzvv-zathura-core-0.4.3.drv' failed with exit code 1
cannot build derivation '/nix/store/avcs1gyl5ymlbs0jhdjgfciww4x7j747-zathura-with-plugins-0.4.3.drv': 1 dependencies couldn't be built
error: build of '/nix/store/avcs1gyl5ymlbs0jhdjgfciww4x7j747-zathura-with-plugins-0.4.3.drv' failed

3e17fe45223a3734971c8da5a68e4dbe3ebc2c2e
nix-build -A zathura
error: build of '/nix/store/avcs1gyl5ymlbs0jhdjgfciww4x7j747-zathura-with-plugins-0.4.3.drv' failed

I notice that I get a different drv on my system (/nix/store/m2gs7y1m7jj58h837lz7vi2cmqwxs4ji-zathura-with-plugins-0.4.3.drv), I think you may not be building from the master. IIRC when you run nix-build -A zathura it will build from <nixpkgs> which may not point to your git checkout. If you want to build expressions from the current directory you need to do

nix-build . -A zathura

nix also can download a tarball with expressions, for example like this:

nix-build https://github.com/NixOS/nixpkgs/archive/3e17fe45223a3734971c8da5a68e4dbe3ebc2c2e.tar.gz -A zathura

IIRC when you run nix-build -A zathura it will build from which may not point to your git checkout. If you want to build expressions from the current directory you need to do

If no path is given nix-build will read $PWD/default.nix and If default.nix doesn't exist it will fail. So, @rembo10's command is fine.

@rnhmjoj
I just checked on another x86_64-linux NixOS system that zathura evaluates to /nix/store/m2gs7y1m7jj58h837lz7vi2cmqwxs4ji-zathura-with-plugins-0.4.3.drv on 3e17fe45223a3734971c8da5a68e4dbe3ebc2c2e . If the command is correct then there must be an override or an overlay in ~/.nixpkgs or ~/.config/nixpgs that affects the derivation.

Oh my god, you're totally right. I had an overlay in my ~/.config/nixpkgs, which I think I had to add to disable synctex at one point when it wasn't working. Removing that and it builds fine. So sorry for wasting your guys' time but thanks for the help! (Although I wonder why it says it can't find synctex when it should have been disabled with the overlay?) Anyways, I'll close this issue, thanks again, it was driving me crazy!

What was the overlay? There may still be a bug here.

The build indeed fails with synctexSupport = true.
I don't have time to open a PR now but the fix is pretty easy:

diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index af72e0a8d9a..fbcbcaf249f 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -29,7 +29,8 @@ stdenv.mkDerivation rec {
     # "-Dseccomp=enabled"
     "-Dmanpages=enabled"
     "-Dconvert-icon=enabled"
-  ] ++ optional synctexSupport "-Dsynctex=enabled";
+    (if synctexSupport then "-Dsynctex=enabled" else "-Dsynctex=disabled")
+  ];

   nativeBuildInputs = [
     meson ninja pkgconfig desktop-file-utils python3.pkgs.sphinx

@rembo10 can you reopen the issue?

Sure - it also fails to build with synctexSupport = false, not sure if your fix addresses that as well?

The option was introduced in b21329e0e04a7f7a6f37686f75ced7207750885e
I think we should just drop synctexSupport = false variant

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sid-kap picture sid-kap  路  3Comments

teto picture teto  路  3Comments

rzetterberg picture rzetterberg  路  3Comments

retrry picture retrry  路  3Comments

chris-martin picture chris-martin  路  3Comments