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 610340 - libgsf introspection generation fails
libgsf introspection generation fails
Status: RESOLVED FIXED
Product: libgsf
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks: 667697
 
 
Reported: 2010-02-18 08:56 UTC by Alan Knowles
Modified: 2012-02-06 19:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for libgsf to run introspection at build time (2.37 KB, patch)
2010-02-18 08:56 UTC, Alan Knowles
none Details | Review
current status of libgsf support (2.36 KB, patch)
2010-03-23 02:14 UTC, Alan Knowles
none Details | Review
Make file modifications for libgsf - needs changes to gobject-introspection to work (2.39 KB, patch)
2010-03-23 08:31 UTC, Alan Knowles
committed Details | Review

Description Alan Knowles 2010-02-18 08:56:52 UTC
Created attachment 154109 [details] [review]
patch for libgsf to run introspection at build time

Attached is the patch for adding gobject introspection support to libgsf

however it fails due generate typelib, as it does not pick up the alias 

struct guint64 gsf_off_t;
Comment 1 Colin Walters 2010-03-18 19:52:51 UTC
Hmm?  You mean "typedef guint64 gsf_off_t"?

I'd like a reduced test case for this.
Comment 2 Alan Knowles 2010-03-23 02:14:35 UTC
Created attachment 156826 [details] [review]
current status of libgsf support

This is a better build patch for libgsf - I'm still experimenting with gobject introspection code to solve other issues with the build.
Comment 3 Alan Knowles 2010-03-23 08:31:53 UTC
Created attachment 156835 [details] [review]
Make file modifications for libgsf - needs changes to gobject-introspection to work

This patch will enable building of Gsf. 

It will not work without changes to gobject introspection though.

Notes:
- gsf might get built with Bonobo - this may affect the introspection build includes. - I've not dealt with that yet..

- The core problem for Gsf is the va_list field members of things like GsfOutputClass - this in particular.
gsf_off_t (*Vprintf) (GsfOutput *output,
			     char const *format, va_list args)
			     G_GNUC_PRINTF (2, 0);

The change needed to handle this is to change transformer.py
a) extend SkipError with VaListSkipError
b) throw VaListSkipError when va_list is found.
c) in create member wrap create_callback with a try, if it catches VaListSkipError then create a void* field which is not readable and not writable.
Comment 4 Jean Bréfort 2010-03-23 08:56:42 UTC
I'm not sure it's really useful to add introspection to libgsf-gnome. Both bonobo and gnomevfs are deprecated.
Comment 5 Morten Welinder 2010-08-27 19:49:11 UTC
Does anyone know what the status of this is?  Specifically, is there still
a problem with current gobject-introspection?
Comment 6 Alan Knowles 2010-08-28 02:36:50 UTC
Gsf builds ok with the previous patch and gobject-introspection HEAD.

The patch could do with tidying up to confirm to this.

http://live.gnome.org/GObjectIntrospection/AutotoolsIntegration
Comment 7 Jean Bréfort 2010-08-31 13:23:47 UTC
Actually things fail for me with:

Gsf-1.gir:In Infile.Input.Object: error: Can't resolve type 'gsf_off_t' for field Gsf.Input.size
Comment 8 Alan Knowles 2010-08-31 15:28:42 UTC
It needs introspection HEAD to get rid of that error.

git clone git://git.gnome.org/gobject-introspection

the patch should probably check against at least this version.

PKG_CHECK_MODULES(INTROSPECTION, gobject-introspection-1.0 >= 0.9.4, have_introspection=true, have_introspection=false)
Comment 9 Jean Bréfort 2010-08-31 15:43:08 UTC
Nope, this is with current git.
Comment 10 Alan Knowles 2010-08-31 16:15:03 UTC
Strange, I checked out both introspection and libgsf directly from git applied the patch and it built ok just a few minutes ago..
Comment 11 Jean Bréfort 2010-08-31 16:28:57 UTC
I'm also using gsf and introspection from git, may be something is interfering on my system.
Comment 12 Jean Bréfort 2011-02-17 14:16:37 UTC
still getting an error:
Gsf-1.gir: error: Can't resolve type 'gsf_off_t' for field Gsf.Input.size
Comment 13 Jean Bréfort 2011-02-18 11:52:18 UTC
Please forge my last comment, it was with an old gobject_introspection version. Things work with current git at least.
Comment 14 Morten Welinder 2011-12-07 19:40:17 UTC
In light of bonobo/gnome/gnome-vfs support just having been dropped,
what is the status of this?
Comment 15 Jean Bréfort 2012-01-07 12:04:26 UTC
the bonobo/gnome* support drop does not have consequences. The patch only adds introspection support to the gsf directory only.
We still need to add the appropriate fields to the API documentation comments.
Comment 16 Jean Bréfort 2012-02-06 19:48:34 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.