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 723685 - g_close() conflict with libgeom
g_close() conflict with libgeom
Status: RESOLVED FIXED
Product: libgtop
Classification: Core
Component: bsd
unspecified
Other FreeBSD
: Normal blocker
: ---
Assigned To: libgtop maintainers
libgtop maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-05 14:56 UTC by Allison Karlitskaya (desrt)
Modified: 2014-02-21 01:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
freebsd: don't link to libgeom (2.95 KB, patch)
2014-02-12 14:03 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2014-02-05 14:56:45 UTC
libgtop no longer works on FreeBSD.

The reason is that the freebsd sysdeps port uses a library called libgeom for obtaining the fsusage information.  This library exports a symbol called g_close() which is also exported by GLib:

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

I hope that in the long run we can convince the FreeBSD people to stop using the g_ namespace from their library, but in the meantime we cannot use libgeom from an application or library that also uses GLib.

I recommend removing (or commenting-out) the FreeBSD fsusage backend until/unless we can resolve the problem.
Comment 1 Allison Karlitskaya (desrt) 2014-02-12 12:30:44 UTC
btw: this is almost certainly the cause of the "strage third error" in bug 721986:

3. There is a strange error when running g-ir-scanner. I don't know how to fix
it.
Error closing file: No error: 0
Command
'['/home/lantw44/gnome/source/libgtop/lib/tmp-introspect1hZkz0/GTop-2.0',
'--introspect-dump=/home/lantw44/gnome/source/libgtop/lib/tmp-introspect1hZkz0/functions.txt,/home/lantw44/gnome/source/libgtop/lib/tmp-introspect1hZkz0/dump.xml']'
returned non-zero exit status 1
Comment 2 Allison Karlitskaya (desrt) 2014-02-12 14:03:20 UTC
Created attachment 268913 [details] [review]
freebsd: don't link to libgeom

libgeom declares several symbols in GLib's namespace, including
g_close() and it therefore cannot be used from any program that also
uses GLib.

For now, disable the parts of the FreeBSD sysdep that use libgeom.
Hopefully the libgeom API will be changed soon.
Comment 3 Allison Karlitskaya (desrt) 2014-02-21 01:57:15 UTC
Attachment 268913 [details] pushed as 2e86197 - freebsd: don't link to libgeom