Building gdm on a Lorax system with tcp_wrappers installed will cause it to link with libwrap, which leaves undefinded symbols unless you also link with libnsl.
Fixed in gdm-1.0.0-40.