GNOME Bugzilla – Bug 527253
OS X Leopard compilation failure of gdkevents-x11.c
Last modified: 2013-05-13 04:22:43 UTC
Please describe the problem: It appears that new Xrandr support added to gtk+ 2.13 has broken compilation on OS X Leopard. When trying to compile the source it fails during the gdk section of the build. Steps to reproduce: 1. ./configure --without-libjasper 2. make 3. compile stops at gdkevents-x11.c Actual results: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I../.. -I../../gdk -I../../gdk -DGDK_PIXBUF_DISABLE_DEPRECATED -DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES -D_REENTRANT -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/X11/include/libpng12 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pango-1.0 -I/usr/local/include/cairo -g -O2 -g -Wall -MT gdkevents-x11.lo -MD -MP -MF .deps/gdkevents-x11.Tpo -c gdkevents-x11.c -fno-common -DPIC -o .libs/gdkevents-x11.o gdkevents-x11.c: In function 'gdk_event_translate': gdkevents-x11.c:2110: error: 'RRNotify' undeclared (first use in this function) gdkevents-x11.c:2110: error: (Each undeclared identifier is reported only once gdkevents-x11.c:2110: error: for each function it appears in.) gdkevents-x11.c:2112: error: 'XRRNotifyEvent' undeclared (first use in this function) gdkevents-x11.c:2112: error: 'notify' undeclared (first use in this function) gdkevents-x11.c:2112: error: syntax error before ')' token make[4]: *** [gdkevents-x11.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 compilation. Does this happen every time? Yes. Other information: Looking into the Xrandr.h and randr.h on the system shows me that RRNotify and XRRNotifyEvent do not exist, the closest I can find are RRScreenChangeNotify and XRRScreenChangeNotifyEvent. I tried building GTK+ 2.12.9 and it built no problem, looking at gdkevents-x11.c I see that there is no Xrandr implementation of any kind so that would explain why it was able to build where 2.13 could not.
RRNotify (as gtk SVN revision 19173 says) is new in Xrandr 1.2. One 10.5 user reported that his xrandr.pc advertised version 1.2.2, so the gtk+ configure.in test: # Check for the RANDR extension if $PKG_CONFIG --exists "xrandr >= 1.2" ; then AC_DEFINE(HAVE_RANDR, 1, Have the Xrandr extension library) X_PACKAGES="$X_PACKAGES xrandr" fi if $have_randr ; then AC_DEFINE(HAVE_RANDR, 1, Have the Xrandr extension library) fi would find it (off-topic: what would trigger that $have_randr test?) but another did not have evidence of some new v1.2 stuff in his *randr*.h headers. Wonder if the x11 xrandr is busted?
If someone added a --without-randr option to configure, that would be fine with me.
What about a test that tries to compile code using that function? Otherwise, in the worst case, all Leopard users will see the breakage and need to find out why it breaks and how to solve it.
Yeah, that can be added together with the --without-randr option...
Is this still valid? Both 2.13 and Leopard are pretty much ancient history...
lets close it