#54981 closed defect (fixed)
py-gobject fails to build against glib2 +quartz
| Reported by: | michaellass (Michael Lass) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | Cc: | snarkhunter (Steve Langer), Ionic (Mihai Moldovan), p-bro, MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), jjstickel (Jonathan Stickel) | |
| Port: | py-gobject |
Description (last modified by mf2k (Frank Schima))
Trying to build py27-gobject when glib2 is installed with variant +quartz, results in the following error:
unix.override:27:10: fatal error: 'gio/gdesktopappinfo.h' file not found
#include <gio/gdesktopappinfo.h>
^~~~~~~~~~~~~~~~~~~~~~~
This error is very similar to an earlier problem in gtk3 and in fact, someone notices this issue with py-gobject before as well: #53911 #54379
I attempted to patch py-gobject in a similar way to include gio/gosxappinfo.h instead but with that change applied, I get the following error messages:
unix.c:747:5: error: use of undeclared identifier 'GDesktopAppInfo'
GDesktopAppInfo *ret;
^
[...]
unix.c:1227:52: error: use of undeclared identifier 'G_TYPE_DESKTOP_APP_INFO'; did you mean 'G_DESKTOP_APP_INFO'?
pygobject_register_class(d, "GDesktopAppInfo", G_TYPE_DESKTOP_APP_INFO, &PyGDesktopAppInfo_Type, Py_BuildValue("(O)", &PyGObject_Type));
^~~~~~~~~~~~~~~~~~~~~~~
G_DESKTOP_APP_INFO
unix.c:261:44: note: 'G_DESKTOP_APP_INFO' declared here
ret = g_desktop_app_info_get_is_hidden(G_DESKTOP_APP_INFO(self->obj));
^
So it looks like more changes are required to get this working. py-gobject is required for py-pygtk and therefore for lots of GTK applications such as VLC and gimp2.
Attached you find full build logs as well as my first attempt at patching py-gobject.
Attachments (3)
Change History (17)
Changed 9 years ago by michaellass (Michael Lass)
| Attachment: | py27-gobject-error.log added |
|---|
Changed 9 years ago by michaellass (Michael Lass)
| Attachment: | py27-gobject-patched-error.log added |
|---|
Changed 9 years ago by michaellass (Michael Lass)
| Attachment: | Attempt-at-patching-py-gobject.patch added |
|---|
comment:1 Changed 9 years ago by mf2k (Frank Schima)
| Description: | modified (diff) |
|---|
comment:2 Changed 9 years ago by mf2k (Frank Schima)
| Keywords: | haspatch added |
|---|
comment:3 Changed 9 years ago by michaellass (Michael Lass)
Just to make sure this is not missed due to the haspatch keyword: The patch is not sufficient as it is. It fixes the include error but leads to other build errors as described above.
comment:4 Changed 9 years ago by mf2k (Frank Schima)
| Keywords: | haspatch removed |
|---|
OK thanks. I'll remove the keyword for now then. It can be added when it is in better shape.
comment:5 follow-up: 9 Changed 9 years ago by kencu (Ken)
we seem to be often running into this particular error and it appears to defy a robust fix. Wonder what other packagers (fink, homebrew) have done about this? As I understand it, there are two headers, gio/gosxappinfo.h used for +quartz and gio/gdesktopappinfo.h used for +x11. Why there is always a missing one is the strange thing. Perhaps we might get away with manually copying them both in?
comment:6 Changed 9 years ago by michaellass (Michael Lass)
It seems like it is an explicit choice by upstream glib2 to only support one of them at a time. There's good information about this in ticket:53911#comment:2 and ticket:53911#comment:7.
A crude workaround is to install glib2 -quartz +x11, then build py-gobject, then go back to glib2 +quartz -x11. The last step is optional but probably required before building packages like gtk3 which were changed to use gio/gosxappinfo.h when built with variant +quartz.
I guess there are two options to properly fix this:
- patch glib2 to support both x11 and quartz at the same time
- patch all applications using the affected header files so they use the correct one depending on variant x11 or quartz.
comment:7 Changed 9 years ago by snarkhunter (Steve Langer)
| Cc: | snarkhunter added |
|---|
comment:8 Changed 8 years ago by mouse07410 (Mouse)
patch glib2 to support both x11 and quartz at the same time
This would probably be the best.
there are two headers,
gio/gosxappinfo.hused for+quartzandgio/gdesktopappinfo.hused for+x11. Why there is always a missing one is the strange thing. Perhaps we might get away with manually copying them both in?
Please-please, do that. Do that now. And it might even remedy this and several other issues.
comment:9 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
| Cc: | Ionic added |
|---|
Replying to kencu:
we seem to be often running into this particular error and it appears to defy a robust fix. Wonder what other packagers (fink, homebrew) have done about this?
Only MacPorts is affected, because the feature was developed by a MacPorts developer and has not been accepted by the developers of glib yet. See #53911 and https://bugzilla.gnome.org/show_bug.cgi?id=781548.
comment:10 Changed 8 years ago by p-bro
The new URL for the upstream bug is https://gitlab.gnome.org/GNOME/glib/issues/1263.
Also, for the sake of completeness, here are two packages on trac affected by this issue:
#56548 (geoclue2)
#55345 (yelp)
comment:11 Changed 8 years ago by p-bro
| Cc: | p-bro added |
|---|
comment:12 Changed 8 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
| Cc: | MarcusCalhoun-Lopez added |
|---|
comment:13 Changed 8 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
| Owner: | set to MarcusCalhoun-Lopez |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
comment:14 Changed 7 years ago by jjstickel (Jonathan Stickel)
| Cc: | jjstickel added |
|---|

Thanks for the patch. There is no need to increase the revision when adding variants.