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 610321 - Compile errors with gtk-2.10.4: GTK_BUTTONBOX_CENTER undeclared
Compile errors with gtk-2.10.4: GTK_BUTTONBOX_CENTER undeclared
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Build system
2.3.x
Other Linux
: Normal major
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks:
 
 
Reported: 2010-02-18 00:23 UTC by Heikki Salokanto
Modified: 2018-06-29 22:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace GHashTableIter with g_hash_table_foreach (3.22 KB, patch)
2010-02-18 15:35 UTC, Cristian KLEIN
needs-work Details | Review
Compilation errors (27.94 KB, text/plain)
2010-02-20 16:36 UTC, Heikki Salokanto
  Details

Description Heikki Salokanto 2010-02-18 00:23:23 UTC
dialog-options.c:952: error: ‘GTK_BUTTONBOX_CENTER’ undeclared (first use in this function)

That probably only exists in an unstable version of gtk2 (gtk.h). I am using CentOS 5.4 and gtk2-devel-2.10.4-20.el5.i386 which does not have that.

If I replace it with GTK_BUTTONBOX_DEFAULT_STYLE or something, I can continue, but the next show stopper is just around the corner:

window-autoclear.c: In function ‘gnc_autoclear_window_ok_cb’:
window-autoclear.c:162: error: ‘GHashTableIter’ undeclared (first use in this function)
window-autoclear.c:162: error: (Each undeclared identifier is reported only once
window-autoclear.c:162: error: for each function it appears in.)
window-autoclear.c:162: error: expected ‘;’ before ‘iter’
window-autoclear.c:163: warning: ISO C90 forbids mixed declarations and code
window-autoclear.c:169: warning: implicit declaration of function ‘g_hash_table_iter_init’
window-autoclear.c:169: error: ‘iter’ undeclared (first use in this function)
window-autoclear.c:170: warning: implicit declaration of function ‘g_hash_table_iter_next’


How am I supposed to compile this? ./configure passes just fine.
Comment 1 Christian Stimming 2010-02-18 07:30:52 UTC
The functions were newly introduced in the enhancement of bug#608436; obviously we didn't check for gtk-2.10 compatibility closely enough. This needs to be fixed, though.
Comment 2 Christian Stimming 2010-02-18 07:43:22 UTC
Can you please run "make -i" once, then "make -i" again and attach the output of the second run here so that we can see all compiler errors? Also, what is your version of "glib" or "glib2"? The functions in question would be available in gtk2-2.12 and glib-2.16, but you obviously have older versions.
Comment 3 Cristian KLEIN 2010-02-18 15:35:22 UTC
Created attachment 154146 [details] [review]
Replace GHashTableIter with g_hash_table_foreach

Hello,

I replaced GHashTableIter with g_hash_table_foreach. (Bleah!)

OTOH, I didn't touch dialog-options.c, where the GTK_BUTTONBOX_CENTER appears.
Comment 4 Geert Janssens 2010-02-20 02:24:13 UTC
Review of attachment 154146 [details] [review]:

I have replaced GTK_BUTTONBOX_CENTER with GTK_BUTTONBOX_START in r18694. That fixes the first problem.

I tried to apply the attached patch, but it doesn't apply cleanly. Could you please update the patch so it applies to the current trunk ?
Comment 5 Heikki Salokanto 2010-02-20 16:36:29 UTC
Created attachment 154273 [details]
Compilation errors
Comment 6 Heikki Salokanto 2010-02-20 16:47:29 UTC
Thanks Geert, the GTK_BUTTONBOX issue is no longer an issue.

However, some new errors popped up this time. See the attachment at around lines 55-60.

I have glib2-2.12.3 and gtk2-2.10. Personally I don't think it is a good idea to depend on such new versions of libraries which are not included even in the most recent Linux distributions.
Comment 7 Geert Janssens 2010-02-21 01:05:38 UTC
I had just discovered these compilation errors as well. They are fixed in 18700.

glib2-2.12.x and gtk2-2.10 are not new versions. They are rather conservative choices. The current stable glib2 is 2.22. The current gtk+ is 2.18.

For example, Mandriva 2010.0, Fedora 12 and current Debian ship glib2 2.22.x. Even Debian Lenny, the oldest still supported Debian release comes with 2.16.

Same for gtk+: Mandriva 2010.0, Fedora 12 and current Debial ship gtk+ 2.18.x. Debian Lenny ships 2.12.x

So I think all currently maintained distributions are covered with these requirements.
Comment 8 Geert Janssens 2010-02-21 01:07:08 UTC
By the way, I still haven't applied the GHashTableIter patch because it doesn't apply cleanly to trunk.
Comment 9 Christian Stimming 2010-02-21 13:53:13 UTC
Comment on attachment 154146 [details] [review]
Replace GHashTableIter with g_hash_table_foreach

Indeed - this patch doesn't apply to trunk, because r18612 and r18632 subsequently edited this file for compatibility with older glib versions. Please rebase your patch on the current trunk and send it again. Thanks!
Comment 10 Geert Janssens 2010-03-02 22:49:17 UTC
I have reworked the patch to apply to trunk. Committed in r18792.
Comment 11 John Ralls 2018-06-29 22:35:09 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=610321. Please update any external references or bookmarks.