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 662975 - Gtkmm won't build for Quartz (or any other backend besides X11 and Win32)
Gtkmm won't build for Quartz (or any other backend besides X11 and Win32)
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: build
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2011-10-28 23:26 UTC by John Ralls
Modified: 2012-06-30 15:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suppress building plug & socket if there's no X11 backend (3.23 KB, patch)
2011-10-28 23:26 UTC, John Ralls
none Details | Review
Updated patch with Murray's requested changes (3.28 KB, patch)
2011-10-29 20:40 UTC, John Ralls
needs-work Details | Review
Revised patch with x11 replacing xll. (3.24 KB, patch)
2011-11-19 21:39 UTC, John Ralls
none Details | Review

Description John Ralls 2011-10-28 23:26:54 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.
Comment 1 Murray Cumming 2011-10-29 12:33:35 UTC
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.
Comment 2 John Ralls 2011-10-29 18:08:38 UTC
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.
Comment 3 Murray Cumming 2011-10-29 20:08:07 UTC
(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.
Comment 4 John Ralls 2011-10-29 20:40:24 UTC
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.
Comment 5 Murray Cumming 2011-11-18 08:41:12 UTC
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 ?
Comment 6 John Ralls 2011-11-18 15:16:08 UTC
Sorry, I don't understand the question.
Comment 7 Krzesimir Nowak 2011-11-18 15:59:19 UTC
Looks like you are using l (small L) instead of 1 (digit one) in 'gtkmm_files_xll_hg'.
Comment 8 John Ralls 2011-11-19 21:39:03 UTC
Created attachment 201719 [details] [review]
Revised patch with x11 replacing xll.

Ah, thanks for the clarification.
Comment 9 Murray Cumming 2011-11-28 11:36:34 UTC
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'
Comment 10 John Ralls 2011-11-29 18:41:07 UTC
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.
Comment 11 Murray Cumming 2011-11-30 07:50:14 UTC
Thanks.
Comment 12 Kjell Ahlstedt 2012-06-29 07:38:09 UTC
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.