After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 584574 - glib compile failure on Mac OS X with gunixresolver.c and resolv.h
glib compile failure on Mac OS X with gunixresolver.c and resolv.h
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.21.x
Other Mac OS
: Normal blocker
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-06-02 01:52 UTC by Ryan Schmidt
Modified: 2009-06-09 13:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
/usr/include/nameser.h from Mac OS X 10.4.11 Intel (21.58 KB, text/plain)
2009-06-08 18:01 UTC, Ryan Schmidt
Details
/usr/include/arpa/nameser_compat.h from Mac OS X 10.4.11 Intel (6.49 KB, text/plain)
2009-06-08 18:05 UTC, Ryan Schmidt
Details

Description Ryan Schmidt 2009-06-02 01:52: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
Comment 1 Dan Winship 2009-06-02 02:01:02 UTC
is this with the very very latest source code? I committed some OS X build fixes this afternoon
Comment 2 André Klapper 2009-06-07 20:54:36 UTC
Ryan: ping
Comment 3 Ryan Schmidt 2009-06-08 06:14:34 UTC
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
Comment 4 Dan Winship 2009-06-08 16:59:12 UTC
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 ?
Comment 5 Ryan Schmidt 2009-06-08 18:01:48 UTC
Created attachment 136158 [details]
/usr/include/nameser.h from Mac OS X 10.4.11 Intel
Comment 6 Ryan Schmidt 2009-06-08 18:05:06 UTC
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.
Comment 7 Dan Winship 2009-06-09 13:36:23 UTC
fixed, by re-breaking 580301, since we'd rather build on current OS X than on 7-year-old OS X