I was trying to install glib 2.x in Mac OS X, as a result of someĀ yak shaving. Unfortunately by default the autoconf build didn’t work for me, but bombed out during the make step with:
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:_res_9_dn_expand_res_9_init_res_9_query_res_9_searchcollect2: ld returned 1 exit status/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld:
Undefined symbols:_res_9_dn_expand_res_9_init_res_9_query_res_9_searchcollect2:
ld returned 1 exit status
Various people on the internet have reported the same problem in building other things, and the fix seems to be to specify -lresolv to the linker. I was able to do this with:
$ LIBS=-lresolv ./configure
$ make
$ make install