g-ir-scanner fails with python-3.8

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Sun May 23 06:00:25 GMT 2021


On 2021-05-22 17:44, Lemures Lemniscati via Cygwin-apps wrote:
> On Wed, 19 May 2021 22:09:59 +0100, Jon Turney
>> On 19/05/2021 20:32, Ken Brown via Cygwin-apps wrote:
>>> Trying to build harfbuzz, I get the following python failure with
>>> python-3.8
>>>
>>> Traceback (most recent call last):
> ....
>>>     File "/usr/lib/gobject-introspection/giscanner/xmlwriter.py", line
>>> 46, in <module>
>>>       from giscanner._giscanner import collect_attributes
>>> ImportError: dynamic module does not define module export function
>>> (PyInit__giscanner)
>>
>> This a problem with the gobject-introspection package.
>>
>> _giscanner.dll is linked with python2, but the shbang names 'python', which is now python3.
>>
>> I have been working on rebuilding this package, but not quite there yet.
>>
>> You can work around this by fixing the shebang in /usr/bin/g-ir-scanner to explicitly name python3.
> 
> 
> Here are patches...
> 
> * 0002-gobject-introspection-1.54.1-4.patch:
>      python3.8 is used explicitly.
>        Shebangs of g-ir-doc-tool and g-ir-scanner are '/usr/bin/env python3.8'
>        _giscanner.dll is linked with libpython3.8.dll
> 
> * 0001-Fix-a-patch-for-giscanner-shlibs.py-to-pass-a-pep8-c.patch:
>      This has no effect while building.
>      But needed in order to avoid an error in a test
>        cygport gobject-introspection.cygport test
> 
> And with them, following build and test by cygport has succeeded
> both in x86_64 and i686, on my local machine.
> 
>    cygport gobject-introspection.cygport download finish all test
> 
> 
> But on scallywag, only x86_64 build is successful:
> https://cygwin.com/cgi-bin2/jobs.cgi?id=2841

I question the definition successful when both logs contain GICOMP syntax errors
which appear non-fatal and non-terminal:

i686:
<https://ci.appveyor.com/project/cygwin/scallywag/builds/39277866/job/8y08y0qcu3k4y69x#L1360>
GICOMP   /cygdrive/c/projects/playground/gobject-introspection-1.54.1-4.i686/src/gobject-introspection-1.54.1/gir/GL-1.0.gir
/usr/lib/gcc/i686-pc-cygwin/10/include/stddef.h:424: syntax error, unexpected identifier in '  __float128 
__max_align_f128 __attribute__((__aligned__(__alignof(__float128))));' at '__float128'

x86_64:
<https://ci.appveyor.com/project/cygwin/scallywag/builds/39277866/job/ufq8i362scpytnx4?fullLog=true#L1372>
   GISCAN   GModule-2.0.gir
/usr/include/glib-2.0/gobject/gobject-autocleanups.h:24: syntax error, unexpected typedef-name, expecting identifier or 
'(' in 'typedef GClosure *GClosure_autoptr;' at 'GClosure_autoptr'
/usr/include/glib-2.0/gobject/gobject-autocleanups.h:25: syntax error, unexpected typedef-name, expecting identifier or 
'(' in 'typedef GObject *GObject_autoptr;' at 'GObject_autoptr'
/usr/include/glib-2.0/gobject/gobject-autocleanups.h:26: syntax error, unexpected typedef-name, expecting identifier or 
'(' in 'typedef GInitiallyUnowned *GInitiallyUnowned_autoptr;' at 'GInitiallyUnowned_autoptr'
g-ir-scanner: GModule: warning: 2 warnings suppressed (use --warn-all to see them)
   GICOMP   GModule-2.0.gir
g-ir-scanner: GObject: warning: 19 warnings suppressed (use --warn-all to see them)
   GICOMP 
/cygdrive/c/projects/playground/gobject-introspection-1.54.1-4.x86_64/src/gobject-introspection-1.54.1/gir/DBusGLib-1.0.gir
   GISCAN   Gio-2.0.gir
   GISCAN   GIRepository-2.0.gir
   GICOMP   GObject-2.0.gir
/usr/include/glib-2.0/gio/gio-autocleanups.h:24: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GAction *GAction_autoptr;' at 'GAction_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:25: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GActionMap *GActionMap_autoptr;' at 'GActionMap_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:26: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GAppInfo *GAppInfo_autoptr;' at 'GAppInfo_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:27: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GAppLaunchContext *GAppLaunchContext_autoptr;' at 'GAppLaunchContext_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:28: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GAppInfoMonitor *GAppInfoMonitor_autoptr;' at 'GAppInfoMonitor_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:29: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GApplicationCommandLine *GApplicationCommandLine_autoptr;' at 'GApplicationCommandLine_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:30: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GApplication *GApplication_autoptr;' at 'GApplication_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:31: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GAsyncInitable *GAsyncInitable_autoptr;' at 'GAsyncInitable_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:32: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GAsyncResult *GAsyncResult_autoptr;' at 'GAsyncResult_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:33: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GBufferedInputStream *GBufferedInputStream_autoptr;' at 'GBufferedInputStream_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:34: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GBufferedOutputStream *GBufferedOutputStream_autoptr;' at 'GBufferedOutputStream_autoptr'
/usr/include/glib-2.0/gio/gio-autocleanups.h:35: syntax error, unexpected typedef-name, expecting identifier or '(' in 
'typedef GBytesIcon *GBytesIcon_autoptr;' at 'GBytesIcon_autoptr'
...

totalling 130 instances - includes/definitions missing?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


More information about the Cygwin-apps mailing list