Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2014 22:37:14 -0400
From:      Ryan Lortie <desrt@desrt.ca>
To:        freebsd-geom@freebsd.org
Cc:        kwm@freebsd.org
Subject:   GLib vs. libgeom: g_close()
Message-ID:  <1395110234.28391.95721417.1EBDEC74@webmail.messagingengine.com>

next in thread | raw e-mail | index | archive | help
hi,

I'm part of a team that's trying to get the latest versions of GNOME
(out of git) building on FreeBSD with the eventual goal of getting a
"continuous integration" sort of setup so that we can flag FreeBSD
portability issues in GNOME at an earlier stage.

We've made some pretty good progress so far:

  https://wiki.gnome.org/Projects/Jhbuild/FreeBSD

We hit an issue a bit over a month ago when attempting to get libgtop
working with the latest GLib on FreeBSD.  Specifically: GLib added a
g_close() function during the 2.36 cycle which conflicts with the
g_close() function that is exported by libgeom.

  https://developer.gnome.org/glib/stable/glib-File-Utilities.html#g-close
  http://www.unix.com/man-page/FreeBSD/3/g_close/

I tried to write to pjd@ to ask for advice but I didn't receive any
reply.

In tthe short term is that we have had to remove support for reporting
disk usage statistics on FreeBSD from libgtop in order to avoid the
conflict.

In the medium-long term (maybe FreeBSD 11 timeframe) I was wondering if
it would be possible to change libgeom so that it only uses one
namespace (eg: geom_) instead of three (geom_, gctl_, g_).  This would
allow us to re-enable support for disk statistics and would avoid future
problems that will surely come up in other situations due to this
conflict.

I understand that GLib was the second library to use the name 'g_close'
but there are some factors that I think weigh in favour of GLib's
continued use of the name:

 - GLib has a very strong and publicly-stated policy of API/ABI
   stability

 - GLib is extremely widely used on essentially every platform in
   existence

 - GLib's use of the g_ namespace is long-established, predating the
   existence of libgeom.  It currently has approximately 4000 symbols
   starting with g_ in this namespace.

 - I don't personally believe that it's a good idea to have multiple
   libraries sharing a namespace, and libgeom is also using three
   separate namespaces...

I appreciate any input on this issue.  I particularly hope to be able to
find a solution that would allow us to re-enable the filesystem
statistics reporting on FreeBSD.

Thanks in advance.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1395110234.28391.95721417.1EBDEC74>