no warning about old gtk3.x version when compiling from source

Bug #1511325 reported by Vjeran Crnjak on 2015-10-29
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HomeBank
Low
Maxime DOYEN

Bug Description

Tried to install Homebank 5.0.6 from source.

After I've realized I have to install gtk3+ and glib2 dev packages compiling ensued.

These errors appeared:

ui-account.o: In function `ui_acc_manage_dialog':
/homebank-5.0.6/src/ui-account.c:1195: undefined reference to `gtk_widget_set_margin_end'
/homebank-5.0.6/src/ui-account.c:1229: undefined reference to `gtk_widget_set_margin_start'
ui-archive.o: In function `ui_arc_manage_dialog':
/homebank-5.0.6/src/ui-archive.c:988: undefined reference to `gtk_widget_set_margin_end'
/homebank-5.0.6/src/ui-archive.c:1017: undefined reference to `gtk_widget_set_margin_start'
ui-assign.o: In function `ui_asg_manage_dialog':
/homebank-5.0.6/src/ui-assign.c:707: undefined reference to `gtk_widget_set_margin_end'
/homebank-5.0.6/src/ui-assign.c:736: undefined reference to `gtk_widget_set_margin_start'
ui-budget.o: In function `ui_bud_manage_dialog':
/homebank-5.0.6/src/ui-budget.c:1014: undefined reference to `gtk_widget_set_margin_end'
/homebank-5.0.6/src/ui-budget.c:1059: undefined reference to `gtk_widget_set_margin_start'
ui-pref.o: In function `defpref_dialog_new':
/homebank-5.0.6/src/ui-pref.c:2097: undefined reference to `gtk_widget_set_margin_start'
ui-split.o: In function `ui_split_dialog':
/homebank-5.0.6/src/ui-split.c:480: undefined reference to `gtk_widget_set_margin_start'
/homebank-5.0.6/src/ui-split.c:481: undefined reference to `gtk_widget_set_margin_end'
/homebank-5.0.6/src/ui-split.c:495: undefined reference to `gtk_widget_set_margin_start'
/homebank-5.0.6/src/ui-split.c:496: undefined reference to `gtk_widget_set_margin_end'

I believe Ubuntu 14.04 (apt-get) doesn't have the exact needed GTK version.

My fix was simple:

[homebank-5.0.6]$ sed -i "s/gtk_widget_set_margin_end/gtk_widget_set_margin_right/g" src/ui-*.c
[homebank-5.0.6]$ sed -i "s/gtk_widget_set_margin_start/gtk_widget_set_margin_left/g" src/ui-*.c

Compiling finished and homebank installed.

One could support both old and new versions by using some clever defines. I believe the minversion where changes in API happened is >= 12.

Or, alerting the user of the needed gtk version during the ./configure phase.

description: updated
description: updated
Maxime DOYEN (mdoyen) on 2015-11-07
Changed in homebank:
assignee: nobody → Maxime Doyen (mdoyen)
importance: Undecided → Low
milestone: none → 5.1
status: New → Fix Committed
Maxime DOYEN (mdoyen) wrote :

Have done both:
- revert to xxx-left & xxx-right
- required gtk 3.12

trusty (14.04) was shipping gtk 3.10

GenghisKhan (genghiskhan) wrote :

> - revert to xxx-left & xxx-right

What is it?

> - required gtk 3.12

Slackware Linux 14.1 has gtk 3.8.2

Vjeran Crnjak (vjeran-crnjak) wrote :

Hmm...
The decision is a little bit confusing.
 > gtk_widget_get_margin_right(left) has been deprecated since version 3.12 and should not be used in newly-written code. Use gtk_widget_get_margin_end() instead.

I'm not quite sure why is code reverted to xxx-left & xxx-right if it's deprecated in the required 3.12.

Maxime DOYEN (mdoyen) wrote :

I'm not quite sure why is code reverted to xxx-left & xxx-right if it's deprecated in the required 3.12.
=> It might, I use gtk 3.17, and I usually not remove deprecated stuff until necessary, I should not have chnaged this, that's why I reverted.
This enable sometime people to be able to compile on older gtk version.

Maxime DOYEN (mdoyen) on 2016-03-28
Changed in homebank:
milestone: 5.1 → 5.0.7
Maxime DOYEN (mdoyen) on 2016-05-08
Changed in homebank:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions