I ran into the same problem. It seems that the -lz option is not recognized by the ld command.
After a quick search I found that installing zlib1g-dev should help with this specific error.
I managed to resolve it by installing all the x86 libs with the package lib32z1-dev. It is a bit overkill but if the first solution doesn't work try the later.