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 782628 - libmount build dependency check not requiring the right version?
libmount build dependency check not requiring the right version?
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2017-05-14 18:48 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2017-05-16 10:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check for a recent enough libmount (1000 bytes, patch)
2017-05-14 19:34 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2017-05-14 18:48:26 UTC
This is un ubuntu trusty (sigh):
gunixmounts.c: In function '_g_get_unix_mounts':
gunixmounts.c:433:3: error: implicit declaration of function 'mnt_unref_table' [-Werror=implicit-function-declaration]
   mnt_unref_table (table);
   ^

I guess this is related to libmount, where trusty has 2.20.1-5.1ubuntu20.9

mnt_unref_table has been added in 2.24:
https://www.kernel.org/pub/linux/utils/util-linux/v2.24/libmount-docs/libmount-Table-of-filesystems.html#mnt-unref-table
Comment 1 Emmanuele Bassi (:ebassi) 2017-05-14 19:27:33 UTC
GLib checks using pkg-config for libmount ≥ 2.28:

PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.28], [have_libmount=yes], [have_libmount=maybe])

But it will fall back to checking just for the header. We should add a check for mnt_unref_table() as well.
Comment 2 Emmanuele Bassi (:ebassi) 2017-05-14 19:34:36 UTC
Created attachment 351840 [details] [review]
Check for a recent enough libmount

We need mnt_unref_table() in order to use libmount, but we also need to
keep the fallback code for installations of libmount without a
pkg-config file.
Comment 3 Philip Withnall 2017-05-16 08:15:06 UTC
Review of attachment 351840 [details] [review]:

Yes.
Comment 4 Emmanuele Bassi (:ebassi) 2017-05-16 10:25:41 UTC
Attachment 351840 [details] pushed as 5faaaac - Check for a recent enough libmount