:: Compiling git from the source: ld: can not find -lz
Today, I tried to copile git on my work computer (where I don't have root access). After several errors that I fixed rather easily by installing the required dependency (I should have read "README" :_( ) under my home directory, I ended up with the notorious "/usr/bin/ld: can not find -lz". Answers that I find googling told me to install the zlib, which I already had done!
Then I noticed that the configure option --library-dir= and --includedir= had no effect on Makefile. so I decided to edit Makefile, which made no effect. Then I realized that there is also a file named config.mak.autogen is created, and there is no LDFLAG appears in it! So finally I solved the problem by editting config.mak.in. I changed the line with LDFLAGS intoLDFLAGS = -L/home/mylogin/lib
which solved the problem.