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 708561 - Cannot build libgweather on FreeBSD because of lacking _NL_MEASUREMENT_MEASUREMENT
Cannot build libgweather on FreeBSD because of lacking _NL_MEASUREMENT_MEASU...
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
unspecified
Other FreeBSD
: Normal normal
: future
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-22 07:51 UTC by Ting-Wei Lan
Modified: 2013-10-16 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add fallback in case _NL_MEASUREMENT_NL_MEASUREMENT_MEASUREMENT (1.37 KB, patch)
2013-09-26 15:17 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Ting-Wei Lan 2013-09-22 07:51:49 UTC
I found the use of the _NL_MEASUREMENT_MEASUREMENT constant is started in this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=695873
However, this constant may not be defined on every systems. I found there is a check on this constant in GTK+ configure.ac. Should libgweather add a check for it?
Comment 1 Giovanni Campagna 2013-09-22 17:54:15 UTC
And what do we do if the constant is not there?
Comment 2 Ting-Wei Lan 2013-09-23 13:50:41 UTC
GTK+ fallback to metric if _NL_MEASUREMENT_MEASUREMENT does not exist. I found the code in the function _gtk_print_get_default_user_units at gtk/gtkcustompaperunixdialog.c.
Comment 3 Giovanni Campagna 2013-09-24 15:22:00 UTC
Uhm, to be honest I'm not personally interested in FreeBSD support, but I will happily accept a patch, if you can provide one.

Thank you very much!
Comment 4 Ting-Wei Lan 2013-09-24 16:43:56 UTC
I found there is an old but similar bug report for gweather(gnome-applets): https://bugzilla.gnome.org/show_bug.cgi?id=148049
It just fallback to metric if _NL_MEASUREMENT_MEASUREMENT does not exist, which is the same as GTK+. However, _NL_MEASUREMENT_MEASUREMENT may be an enum, so we should use configure.ac to check it instead of #ifdef.
Comment 5 Jasper Lievisse Adriaanse 2013-09-26 09:27:56 UTC
FWIW, OpenBSD is also lacking _NL_MEASUREMENT_MEASUREMENT.
Comment 6 Ting-Wei Lan 2013-09-26 12:42:24 UTC
NetBSD does not have _NL_MEASUREMENT_MEASUREMENT, too.
Comment 7 Javier Jardón (IRC: jjardon) 2013-09-26 15:17:33 UTC
Created attachment 255844 [details] [review]
Add fallback in case _NL_MEASUREMENT_NL_MEASUREMENT_MEASUREMENT
Comment 8 Javier Jardón (IRC: jjardon) 2013-09-26 15:18:09 UTC
Attached a patch with the solution used in GTK+
Comment 9 Giovanni Campagna 2013-09-26 15:29:12 UTC
Review of attachment 255844 [details] [review]:

Looks fine to me. Needs a string freeze approval.
Comment 10 Jasper Lievisse Adriaanse 2013-09-26 15:55:51 UTC
Thanks, this works fine on OpenBSD.
Comment 11 Javier Jardón (IRC: jjardon) 2013-10-16 17:43:33 UTC
Comment on attachment 255844 [details] [review]
Add fallback in case _NL_MEASUREMENT_NL_MEASUREMENT_MEASUREMENT

commit 1105cf3c5021f129fbfa090cb843fbd3e70c54f5