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 707251 - goffice 0.10.x series and gtk-osx-application...
goffice 0.10.x series and gtk-osx-application...
Status: RESOLVED OBSOLETE
Product: libgoffice
Classification: Other
Component: General
GIT
Other Mac OS
: Normal minor
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-09-02 01:22 UTC by c.herbig
Modified: 2018-05-22 13:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
complete build-fail log (112.75 KB, application/octet-stream)
2013-09-02 01:22 UTC, c.herbig
  Details
.diff patch for goffice/goffice.c to fix gtk-osx-application vs ige-mac-integration conflict. (555 bytes, patch)
2013-09-07 23:11 UTC, c.herbig
none Details | Review
generated gtk-osx-application function documentation (58.37 KB, text/html)
2013-09-08 01:08 UTC, c.herbig
  Details

Description c.herbig 2013-09-02 01:22:56 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.
Comment 1 Morten Welinder 2013-09-07 15:58:42 UTC
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.)
Comment 2 c.herbig 2013-09-07 22:07:18 UTC
(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.
Comment 3 c.herbig 2013-09-07 23:09:23 UTC
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.
Comment 4 c.herbig 2013-09-07 23:11:10 UTC
Created attachment 254365 [details] [review]
.diff patch for goffice/goffice.c to fix gtk-osx-application vs ige-mac-integration conflict.
Comment 5 c.herbig 2013-09-07 23:13:08 UTC
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.
Comment 6 Morten Welinder 2013-09-08 00:11:16 UTC
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.
Comment 7 c.herbig 2013-09-08 00:28:11 UTC
(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.
Comment 8 c.herbig 2013-09-08 01:07:18 UTC
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.
Comment 9 c.herbig 2013-09-08 01:08:34 UTC
Created attachment 254381 [details]
generated gtk-osx-application function documentation
Comment 10 c.herbig 2013-09-08 03:49:20 UTC
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.
Comment 11 c.herbig 2013-09-14 05:16:50 UTC
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.
Comment 12 GNOME Infrastructure Team 2018-05-22 13:08:28 UTC
-- 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.