I’m currently trying to compile wezterm for riscv64. I’m orienting on this patch for Arch Linux PKGBUILD. Similar to the arch patch I already added the dependecy on the patched ring. Checkout the current state here.
When I now run nix build -L .#pkgsCross.riscv64.wezterm
, I get the following error:
wezterm-riscv64-unknown-linux-gnu> The following warnings were emitted during compilation:
wezterm-riscv64-unknown-linux-gnu> warning: In file included from libgit2/src/libgit2/pack.h:21,
wezterm-riscv64-unknown-linux-gnu> warning: from libgit2/src/libgit2/delta.h:10,
wezterm-riscv64-unknown-linux-gnu> warning: from libgit2/src/libgit2/apply.c:18:
wezterm-riscv64-unknown-linux-gnu> warning: libgit2/src/util/zstream.h:12:10: fatal error: zlib.h: No such file or directory
wezterm-riscv64-unknown-linux-gnu> warning: 12 | #include <zlib.h>
wezterm-riscv64-unknown-linux-gnu> warning: | ^~~~~~~~
wezterm-riscv64-unknown-linux-gnu> warning: compilation terminated.
wezterm-riscv64-unknown-linux-gnu> error: failed to run custom build command for `libgit2-sys v0.14.2+1.5.1`
Since I’m totally new to NixOS, I tried to fix this by adding zlib
to nativeBuildInputs
but that didn’t change anything. Further, adding zlib.dev
seems to do nothing as well.
Also, the riscv64 zlib package seems to include this header:
# ls -la /nix/store/sd3mn8r5k37vrqk93jyxravdvxc9ng9n-zlib-riscv64-unknown-linux-gnu-1.3-dev/include
total 124
dr-xr-xr-x 2 fthomas fthomas 4096 Jan 1 1970 .
dr-xr-xr-x 5 fthomas fthomas 4096 Jan 1 1970 ..
-r--r--r-- 1 fthomas fthomas 16646 Jan 1 1970 zconf.h
-r--r--r-- 1 fthomas fthomas 96778 Jan 1 1970 zlib.h
I currently have no real idea where this issue could come from since the AMD64 build goes through clean. Could someone point me in the right direction?