So I’m failing to build hello world nannou sketch on NixOS and don’t understand how to debug it.
With xorg.libxcb (prerequisite for nannou) installed globally build fails with
/nix/store/lbxfixyw1yk099pjyaiy3xj5dl7kxm1g-binutils-2.35.2/bin/ld: cannot find -lxcb. As far as I understand
-lxcb should be
-l/nix/store/9war3957gri3m3714ghs2jj96i642vvs-system-path/lib/libxcb.so or something. How do I find the exact path and how do I pass it to cargo? What needs to be done so global installation works out of the box?
With libxcb installed from shell.nix build succeeds but runtime panics with
libX11.so.6: cannot open shared object file: No such file or directory. Installing xorg.libX11 and/or vulkan-tools does not solve it. It seems libxcb (or something else) cannot resolve libX11 which is /nix/store/w259jz35i221vil0jg2dpdw3zda55ai4-libX11-1.7.2/lib/libX11.so.6. How do I tackle that? I’ve tried
ldd target/debug/main but no traces of libX11.so.6. How is that possible assuming this answer is correct?
From my questions you may deduce that I have very little experience with linking and dynamic libraries debugging. Reading recommendations are much appreciated.
The same example works trivially on Arch but I’d like to learn how to fix this kind of issues on Nix.
Sorry for a long rant.