GNOME Bugzilla – Bug 662975
Gtkmm won't build for Quartz (or any other backend besides X11 and Win32)
Last modified: 2012-06-30 15:38:08 UTC
Created attachment 200227 [details] [review] Suppress building plug & socket if there's no X11 backend Building Gtkmm on Quartz fails because it tries to build plug and socket, which are X11-only files.
That looks generally good. Thanks. However, it might be nice to prefix GDK_TARGET_X11 and give it a clearer name. Maybe GTKMM_GDK_HAS_TARGET_X11? Also, maybe we should comment out the checks and variables that are not used yet.
The name seems a bit wordy to me, and Gtkmm is a wrapper, so it seems appropriate to pass through the GDK name, just like GDK_WINDOWING_FOO is passed through gtk.h for application code to use for special casing. That said, I'm just fixing a build bust; I don't use or develop gtkmm, so it's really your call. Since the check for targets is iterating over a loop and uses "case" to set the internal variables, there's no point to commenting out the checks. We could comment out the AM_CONDITIONALS we don't need (which is all of them except GDK_TARGET_X11) to keep the Makefiles simpler.
(In reply to comment #2) > The name seems a bit wordy to me, and Gtkmm is a wrapper, so it seems > appropriate to pass through the GDK name, just like GDK_WINDOWING_FOO is passed > through gtk.h for application code to use for special casing. GDK_WINDOWING_X11 is a C macro defined by GDK. But GDK_TARGET_X11 is not something that appears in GDK or GTK+, right? So it doesn't seem analogous.
Created attachment 200262 [details] [review] Updated patch with Murray's requested changes You're applying a different definition of "analogous" to the one I'm used to... What I meant was that gtk.h exports GDK_WINDOWING_FOO for anything that includes it to use, so downstream developers will be familiar with the GDK-prefixed macro. As I said, it's not something that matters a whole lot to me, and if you really want to name the conditionals GTKMM_GDK_HAS_TARGET_FOO that's fine with me.
Review of attachment 200262 [details] [review]: ::: gtk/src/filelist.am @@ -198,2 +197,4 @@ printjob.hg \ - printunixdialog.hg \ + printunixdialog.hg + +gtkmm_files_xll_hg = \ Is gtkmm_files_x11_hg definitely not allowed instead of gtkmm_files_xll_hg ?
Sorry, I don't understand the question.
Looks like you are using l (small L) instead of 1 (digit one) in 'gtkmm_files_xll_hg'.
Created attachment 201719 [details] [review] Revised patch with x11 replacing xll. Ah, thanks for the clarification.
I have pushed this to master, but now I notice this build problem: make[2]: Entering directory `/home/murrayc/checkouts/gnome30/gtkmm/gtk/gtkmm' make[2]: *** No rule to make target `plug.lo', needed by `libgtkmm-3.0.la'. Stop. make[2]: Leaving directory `/home/murrayc/checkouts/gnome30/gtkmm/gtk/gtkmm'
There was a second variable that needed to have gtkmm_files_x11_hg added: --- a/gtk/src/filelist.am +++ b/gtk/src/filelist.am @@ -226,4 +226,7 @@ gtkmm_files_used_hg = $(gtkmm_files_any_hg) $(gtkmm_files_ar endif gtkmm_files_hg = $(gtkmm_files_any_hg) $(gtkmm_files_posix_hg) $(gtkmm_files_d +if GDK_TARGET_X11 +gtkmm_files_hg += $(gtkmm_files_x11_hg) +endif gtkmm_files_ccg = $(gtkmm_files_hg:.hg=.ccg) I've taken the liberty of pushing it to master.
Thanks.
See bug 678883 comment 1. If a pair of files (xxx.h, xxx.cc) in gtkmm/gtk shall be included conditionally in a gtkmm build, it must be noted 3 times. 1. In gtkmm/gtk/src/filelist.am. 2. In the .hg file with an m4 macro such as _GTKMMPROC_WIN32_NO_WRAP or _IS_DEPRECATED. glibmm/tools/generate_wrap_init.pl acts on those macros. 3. In gtkmm/gtk/gtkmm.h. The X11-only files plug and socket files are correctly handled only in filelist.am. I suppose that it shall be possible to build from the source code module at http://ftp.gnome.org/pub/GNOME/sources/gtkmm/3.4/gtkmm-3.4.0.tar.xz without regenerating the wrap_init.cc files with ./configure --enable-maintainer-mode; make That's not possible now, because the plug and socket files are conditionally excluded from wrap_init.cc when it's generated, not with #ifndef when it's compiled. And plug.h and socket.h are not mentioned at all in gtkmm/gtk/gtkmm.h.