GNOME Bugzilla – Bug 753743
glibtop_machine ABI changes in libgtop 2.31.90 break darwin build
Last modified: 2016-01-28 16:07:50 UTC
Building on MacPorts 2.3.3 Mac OS X 10.10.5 (Yosemite) Xcode 6.4 Build version 6E35b Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.5.0 Thread model: posix Build fails as follows: :info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_unstable_dports_gnome_libgtop/libgtop/work/libgtop-2.31.90/sysdeps/darwin' :info:build CC nosuid.lo :info:build CC siglist.lo :info:build CC sysinfo.lo :info:build CC open.lo :info:build open.c:70:17: error: incomplete definition of type 'struct _glibtop_machine' :info:build server->machine->uid = getuid (); :info:build ~~~~~~~~~~~~~~~^ :info:build ../../glibtop.h:35:16: note: forward declaration of 'struct _glibtop_machine' :info:build typedef struct _glibtop_machine glibtop_machine;
Hello David, are you building from git ? It just misses a #include <glibtop_machine.h> in open.c and may be in some other files.
Hi, Benoît. Actually I'm building from the 2.31.90 tar ball but the difference shouldn't be significant. Your diagnosis is correct. Attached is my patch that adds the missing #include in the right places. With this patch, libgtop builds without error and cursory testing with gnome-system-monitor 3.17.90 looks good.
Created attachment 309446 [details] [review] Proposed patch to fix darwin build
Review of attachment 309446 [details] [review]: Thank you. https://git.gnome.org/browse/libgtop/commit/?id=eec96d8ae86219f2ba3df2275a68650b865848e2
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.