GNOME Bugzilla – Bug 642085
g-ir-scanner fails to build introspection of gtk3 in macosx due to extra -x option
Last modified: 2015-02-07 17:01:21 UTC
I'm using Mac OS X Snow Leopard 10.6.6. Along the required libraries, I installed gobject-introspection 0.10.2. Then, I tried to compile Gtk 3.0 As part of the build, this variable is defined in the Makefile: gtk_use_quartz_c_sources_CFLAGS = "-xobjective-c" However, that string is also passed to g-ir-scanner, as follows: $ make V=1 Gtk-3.0.typelib /usr/local/bin/g-ir-scanner --add-include-path=../gdk --warn-all --namespace=Gtk --nsversion=3.0 --libtool="/bin/sh ../libtool" --include=Atk-1.0 --pkg-export=gtk+-3.0 --library=libgtk-3.la --add-include-path=../gdk --include-uninstalled=../gdk/Gdk-3.0.gir --c-include="gtk/gtkx.h" -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/usr/local/lib\" -DGTK_DATADIR=\"/usr/local/share\" -DGTK_DATA_PREFIX=\"/usr/local\" -DGTK_SYSCONFDIR=\"/usr/local/etc\" -DGTK_VERSION=\"3.0.0\" -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"x86_64-apple-darwin10.6.0\" -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file,cups\" -DGTK_PRINT_PREVIEW_COMMAND=\""open -a /Applications/Preview.app %f"\" -I.. -I../gtk -I.. -I../gdk -I../gdk -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -D_REENTRANT -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 -I/usr/local/include/pixman-1 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng14 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/atk-1.0 "-xobjective-c" ....... But, g-ir-scanner "thinks" that -xobjective-c is an option, which makes it fail saying that -x is not a valid option. An easy work around was to modify /usr/local/lib/gobject-introspection/giscanner/scannermain.py to manually add the option -x to the command line options.
Created attachment 199356 [details] [review] gtk+-2.24.7-darwin-quartz-introspection.patch This is still valid with 2.24.7 and we are applying attached patch downstream to fix this Could it be committed for the next release? Thanks
Review of attachment 199356 [details] [review]: thanks for your patch. pretty sure you don't want to patch a temporary file, but you want to patch Makefile.am. it'd also be stellar if you could provide a proper commit message instead of just links to a bug tracking system.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 628936 ***
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]