GNOME Bugzilla – Bug 584574
glib compile failure on Mac OS X with gunixresolver.c and resolv.h
Last modified: 2009-06-09 13:36:23 UTC
Please describe the problem: glib 2.21.0 and 2.21.1 do not compile on Mac OS X 10.4.11, with an error about gunixresolver.c and resolv.h. On Mac OS X 10.5.7 there is no error. 2.20.3 worked fine on 10.4.11 so this must be due to a new feature added in 2.21.x. Steps to reproduce: 1. configure and make glib 2.21.1 on Mac OS X 10.4.11. Actual results: /bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_ENABLE_DEBUG -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/mp/lib/gio/modules\" -I/mp/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -Wall -MT gunixresolver.lo -MD -MP -MF .deps/gunixresolver.Tpo -c -o gunixresolver.lo gunixresolver.c libtool: compile: /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_ENABLE_DEBUG -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/mp/lib/gio/modules\" -I/mp/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -Wall -MT gunixresolver.lo -MD -MP -MF .deps/gunixresolver.Tpo -c gunixresolver.c -fno-common -DPIC -o .libs/gunixresolver.o In file included from gunixresolver.c:27: /usr/include/resolv.h:189: error: array type has incomplete element type /usr/include/resolv.h:203: error: field 'addr' has incomplete type /usr/include/resolv.h:231: error: field 'sin' has incomplete type make[4]: *** [gunixresolver.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Expected results: successful compile Does this happen every time? yes Other information: I found a report of the same error message for a different software product (loudmouth): http://www.mail-archive.com/loudmouth@lists.imendio.com/msg00010.html Here is the fix they committed: http://cgit.freedesktop.org/~daf/loudmouth/commit/?h=1.3&id=3f0854ac3c47c40fb1417c705bcf8eed051bf488
is this with the very very latest source code? I committed some OS X build fixes this afternoon
Ryan: ping
The above was with glib 2.21.0 or 2.21.1. I have now tested the latest code in git (as of a few moments ago) and get this: Making all in libasyncns /bin/sh ../../libtool --tag=CC --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I/mp/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -Wall -MT asyncns.lo -MD -MP -MF .deps/asyncns.Tpo -c -o asyncns.lo asyncns.c libtool: compile: /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I/mp/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -O2 -fstrict-aliasing -Wall -MT asyncns.lo -MD -MP -MF .deps/asyncns.Tpo -c asyncns.c -fno-common -DPIC -o .libs/asyncns.o asyncns.c: In function 'handle_request': asyncns.c:570: error: 'HEADER' undeclared (first use in this function) asyncns.c:570: error: (Each undeclared identifier is reported only once asyncns.c:570: error: for each function it appears in.) asyncns.c:570: error: parse error before 'answer' asyncns.c:580: error: 'answer' undeclared (first use in this function) make[4]: *** [asyncns.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
sigh. how many different ways can apple break this in different releases. can you attach /usr/include/arpa/nameser.h and /usr/include/arpa/nameser_compat.h ?
Created attachment 136158 [details] /usr/include/nameser.h from Mac OS X 10.4.11 Intel
Created attachment 136160 [details] /usr/include/arpa/nameser_compat.h from Mac OS X 10.4.11 Intel /usr/include/arpa/nameser.h is a symlink to /usr/include/nameser.h which I've attached. HEADER appears to be defined in /usr/include/arpa/nameser_compat.h, attached. There's also a /usr/include/arpa/nameser8_compat.h which is a symlink to /usr/include/nameser8_compat.h if you need it.
fixed, by re-breaking 580301, since we'd rather build on current OS X than on 7-year-old OS X