GNOME Bugzilla – Bug 707251
goffice 0.10.x series and gtk-osx-application...
Last modified: 2018-05-22 13:08:28 UTC
Created attachment 253792 [details] complete build-fail log As I understand it, ige-mac-integration has been deprecated in favor of gtk-osx-application. However, when trying to compile goffice with gtk-osx-application, the following errors come: :info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_sly_gnome_goffice/goffice/work/goffice-0.10.7/goffice' :info:build CC go-doc.lo :info:build CC goffice.lo :info:build goffice.c:180:9: error: implicit declaration of function 'quartz_application_get_bundle_id' is invalid in C99 [-Werror,-Wimplicit-function-declaration] :info:build if (quartz_application_get_bundle_id ()) :info:build ^ :info:build goffice.c:180:9: note: did you mean 'gtkosx_application_get_bundle_id'? :info:build if (quartz_application_get_bundle_id ()) :info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build gtkosx_application_get_bundle_id :info:build /opt/local/include/gtkmacintegration/gtkosxapplication.h:141:8: note: 'gtkosx_application_get_bundle_id' declared here :info:build gchar *gtkosx_application_get_bundle_id(void); :info:build ^ :info:build goffice.c:184:15: error: implicit declaration of function 'quartz_application_get_resource_path' is invalid in C99 [-Werror,-Wimplicit-function-declaration] :info:build dir = quartz_application_get_resource_path (); :info:build ^ :info:build goffice.c:184:15: note: did you mean 'gtkosx_application_get_resource_path'? :info:build dir = quartz_application_get_resource_path (); :info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build gtkosx_application_get_resource_path :info:build /opt/local/include/gtkmacintegration/gtkosxapplication.h:139:8: note: 'gtkosx_application_get_resource_path' declared here :info:build gchar *gtkosx_application_get_resource_path(void); :info:build ^ :info:build goffice.c:184:13: warning: incompatible integer to pointer conversion assigning to 'gchar *' (aka 'char *') from 'int' [-Wint-conversion] :info:build dir = quartz_application_get_resource_path (); :info:build ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build 1 warning and 2 errors generated. I'm not sure if it has anything to do with the ige-mac-integration vs gtk-osx-application, but the two cannot be installed on the same prefix, and other ports are using gtk-osx-application. If this is something that needs patching, I will be happy to apply, compile and test whatever you suggest.
The quartz code was contributed. The regular developers here have had nothing to do with it. If there is something that is generally accepted to be a replacement, feel free to work on a patch. (This is outside our expertise.)
(In reply to comment #1) > The quartz code was contributed. The regular developers here have had > nothing to do with it. If there is something that is generally accepted > to be a replacement, feel free to work on a patch. (This is outside > our expertise.) (sigh) I was hoping to not have to get involved this deeply with the code, but I will investigate the matter and see if I can find examples in other programs, gtksourceview for example, to make sure that clang's suggestions are in fact correct.
I found the following it gtksourceview-i18n.c #ifdef OS_OSX #include <gtkosxapplication.h> #endif ... ... #elif defined (OS_OSX) if (gtkosx_application_get_bundle_id () != NULL) { ... The actual documentation for the project however is inconsistent, though it is not too surprising since even the naming of the mac integration projects is not consistent. The attached patch will allow it to compile and run.
Created attachment 254365 [details] [review] .diff patch for goffice/goffice.c to fix gtk-osx-application vs ige-mac-integration conflict.
From what I can tell, gtk-mac-integration and ige-mac-integration packages have both been deprecated by gtk-osx-application. However, the whole thing seems a bit muddy. Please see https://wiki.gnome.org/GTK+/OSX/Integration for more information, if you so desire.
clang's "perhaps you meant..." warning is _highly_ _problematic_. It means something like "you called a function I don't know about, but here's one with a vaguely similar name". It has no idea whether the two functions have anything whatsoever to do with each other. In other words: someone needs to understand the code. If you think you do, feel free to commit that patch.
(In reply to comment #6) > clang's "perhaps you meant..." warning is _highly_ _problematic_. > It means something like "you called a function I don't know about, but > here's one with a vaguely similar name". It has no idea whether the > two functions have anything whatsoever to do with each other. I understand that, the closest example I can find is in gtksourceview, which uses gtkosx_application_get_bundle_id, which is again different from the online documentation, gtk_osxapplication_get_bundle_id. I'm still trying to find additional code examples and documentation. I'm currently waiting for a chance to build gtk-osx-application with --enable-gtk-doc to see if that sheds anymore information.
Ok, the documentation included with the gtk-osx-application available on MacPorts shows the following function: gchar * gtkosx_application_get_bundle_id (void); This is the function that the patch uses; I will include the documentation file below if you wish to examine it. If you do not feel this is satisfactory, then there needs to be a way to pass an argument to the configure phase that will disable gtk-mac-application/integration compiling. The following --without-gtk-mac --disable-gtk-mac --without-gtk-mac-integration --disable-gtk-mac-integration are all unrecognized by the configure phase. However, if configure detects that gtk-mac-application or such is available, it will automatically set to use it and, in the current distributed form, fail during compile.
Created attachment 254381 [details] generated gtk-osx-application function documentation
The more I think about it, it would still probably be best to add a configure argument to disable gtk-mac-* regardless of if you choose to accept the patch.
P.S. I don't have commit rights, so if you are in agreement with the patch and documentation, you will have to commit this.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/goffice/issues/38.