GNOME Bugzilla – Bug 131257
Problem building glib - missing definition of "poll"
Last modified: 2005-01-20 19:57:09 UTC
Greetings, I am trying to build GLIB as part of a project to get GIMP to run on Interix, Service for Unix, V3.x. I have assembled and/or built everything else needed to get to the GLIB make phase but when it gets to the program "gmain.c", things get ugly: ----------------------------------------------------------------------- ======================================================================= ----------------------------------------------------------------------- gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -DG_LOG_DOMAIN=\"GLib\" - DG_DISABLE_CAST_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -g -O2 - Wall -c gmain.c -o gmain.o gmain.c: In function `g_main_context_new': gmain.c:712: `poll' undeclared (first use this function) gmain.c:712: (Each undeclared identifier is reported only once gmain.c:712: for each function it appears in.) gmain.c: In function `g_main_context_prepare': gmain.c:2033: warning: comparison between signed and unsigned gmain.c: In function `g_main_context_set_poll_func': gmain.c:2954: `poll' undeclared (first use this function) gmain.c: At top level: gmain.c:224: warning: `main_contexts_without_pipe' defined but not used *** Error code 1 Stop. *** Error code 1 Stop. *** Error code 1 Stop. *** Error code 1 Stop. --------------------------------------------------------------------- ===================================================================== --------------------------------------------------------------------- I have not been successful finding any information about this issue and hope (pray, actually) that some good soul out there can help me PLEASE-HELPPPPPPPPPPPPPPPPPPPP!!!!!!!!!!!!!!!!!!! Thanks, Pete
Looking at the corresponding line you see, that poll is only used, if the configure run at the beginning did find it and set the HAVE_POLL macro. There are two possibilities: 1. Your system does not provide a poll prototype in sys/poll.h (or does not have sys/poll.h), just like SunOS. See line 251-253 in gmain.c. In that case we would have to either include the right file declaring poll or declare poll ourself. In that case find out and tell us, whether poll is available on your system (man poll) and which header file you have to include. 2. You didn't run configure on the host, on which you compiled and in a freshly unpacked GLib directory. In that case do exactly this.
*** This bug has been marked as a duplicate of 141251 ***