I'm using Manjaro Linux. I had those two problems while compiling tor specifically, after everything else was compiled:
/usr/bin/ld: cannot find -lcap: No such file or directory
/usr/bin/ld: cannot find -zstd: No such file or directory
If somebody has the same errors and you want to save yourself an headache, it is sufficient to add the argument --disable-zstd in torConf for the second error, and to git add libcap and make it manually (it normally creates a .a and a .so library, which I apparently didn't have).
So maybe it is necessary to:
- add the
--disable-zstd argument;
- cite in the dependencies libcap.
It took me a bit of work but I really hope this will be helpful!