* g-ir-scanner fails with python-3.8 @ 2021-05-19 19:32 Ken Brown 2021-05-19 21:09 ` Jon Turney 2021-05-19 21:21 ` Marco Atzeri 0 siblings, 2 replies; 13+ messages in thread From: Ken Brown @ 2021-05-19 19:32 UTC (permalink / raw) To: cygwin-apps Trying to build harfbuzz, I get the following python failure with python-3.8 Traceback (most recent call last): File "/usr/bin/g-ir-scanner", line 65, in <module> from giscanner.scannermain import scanner_main File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 41, in <module> from giscanner.dumper import compile_introspection_binary File "/usr/lib/gobject-introspection/giscanner/dumper.py", line 35, in <module> from .gdumpparser import IntrospectionBinary File "/usr/lib/gobject-introspection/giscanner/gdumpparser.py", line 36, in <module> from .transformer import TransformerException File "/usr/lib/gobject-introspection/giscanner/transformer.py", line 34, in <module> from .girparser import GIRParser File "/usr/lib/gobject-introspection/giscanner/girparser.py", line 31, in <module> from .girwriter import COMPATIBLE_GIR_VERSION File "/usr/lib/gobject-introspection/giscanner/girwriter.py", line 29, in <module> from .xmlwriter import XMLWriter 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) The log of my last successful build of harfbuzz shows that python-3.6 was installed. Do any of the python experts out there (Marco? Jon?) know what the problem could be? Thanks. Ken ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-19 19:32 g-ir-scanner fails with python-3.8 Ken Brown @ 2021-05-19 21:09 ` Jon Turney 2021-05-22 23:44 ` Lemures Lemniscati 2021-05-19 21:21 ` Marco Atzeri 1 sibling, 1 reply; 13+ messages in thread From: Jon Turney @ 2021-05-19 21:09 UTC (permalink / raw) To: cygwin-apps 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/bin/g-ir-scanner", line 65, in <module> > from giscanner.scannermain import scanner_main > File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line > 41, in <module> > from giscanner.dumper import compile_introspection_binary > File "/usr/lib/gobject-introspection/giscanner/dumper.py", line 35, > in <module> > from .gdumpparser import IntrospectionBinary > File "/usr/lib/gobject-introspection/giscanner/gdumpparser.py", line > 36, in <module> > from .transformer import TransformerException > File "/usr/lib/gobject-introspection/giscanner/transformer.py", line > 34, in <module> > from .girparser import GIRParser > File "/usr/lib/gobject-introspection/giscanner/girparser.py", line > 31, in <module> > from .girwriter import COMPATIBLE_GIR_VERSION > File "/usr/lib/gobject-introspection/giscanner/girwriter.py", line > 29, in <module> > from .xmlwriter import XMLWriter > 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. > The log of my last successful build of harfbuzz shows that python-3.6 > was installed. Do any of the python experts out there (Marco? Jon?) > know what the problem could be? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-19 21:09 ` Jon Turney @ 2021-05-22 23:44 ` Lemures Lemniscati 2021-05-23 3:51 ` Marco Atzeri ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Lemures Lemniscati @ 2021-05-22 23:44 UTC (permalink / raw) To: cygwin-apps [-- Attachment #1: Type: text/plain, Size: 1610 bytes --] 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 Regards, Lem [-- Attachment #2: 0001-Fix-a-patch-for-giscanner-shlibs.py-to-pass-a-pep8-c.patch --] [-- Type: application/octet-stream, Size: 829 bytes --] From 6099555188a005051e56e2e517ffdb2a8d380cda Mon Sep 17 00:00:00 2001 From: Lemures Lemniscati <lemures.lemniscati@gmail.com> Date: Sat, 22 May 2021 23:25:36 +0900 Subject: [PATCH] Fix a patch for giscanner/shlibs.py to pass a pep8 check --- 1.54.1-2-cygwin.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1.54.1-2-cygwin.patch b/1.54.1-2-cygwin.patch index 96a8c62..c25836d 100644 --- a/1.54.1-2-cygwin.patch +++ b/1.54.1-2-cygwin.patch @@ -96,7 +96,7 @@ if platform.system() == 'Darwin': pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)" + elif platform.platform().startswith('CYGWIN'): -+ pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)" ++ pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)" return re.compile(pattern % re.escape(library_name)) -- 2.31.1 [-- Attachment #3: 0002-gobject-introspection-1.54.1-4.patch --] [-- Type: application/octet-stream, Size: 1699 bytes --] From 1f435122b29fdc5a7c3f71f6da0cb28bbb843847 Mon Sep 17 00:00:00 2001 From: Lemures Lemniscati <lemures.lemniscati@gmail.com> Date: Sat, 22 May 2021 23:25:37 +0900 Subject: [PATCH] gobject-introspection 1.54.1-4 Use python3.8 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 --- gobject-introspection.cygport | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gobject-introspection.cygport b/gobject-introspection.cygport index 11af658..8e1ef29 100644 --- a/gobject-introspection.cygport +++ b/gobject-introspection.cygport @@ -1,8 +1,8 @@ -inherit gnome2 python2 +inherit gnome2 python3 NAME="gobject-introspection" VERSION=1.54.1 -RELEASE=3 +RELEASE=4 CATEGORY="Libs" SUMMARY="GObject Introspection tools" DESCRIPTION="The goal of the project is to describe GObject APIs and collect @@ -16,7 +16,8 @@ PATCH_URI=" 1.54.1-2-cygwin.patch " -CYGCONF_ARGS="--with-python=python2" +PYTHON3=python3.8 +CYGCONF_ARGS="--with-python=${PYTHON3}" PKG_NAMES="${NAME} libgirepository1.0_1 libgirepository1.0-devel libgirepository1.0-doc" gobject_introspection_CATEGORY="Devel" @@ -47,14 +48,15 @@ girepository_x11_CONTENTS="--exclude=cairo-1.0.* --exclude=G*-2.0.* usr/*/gir*/" DIFF_EXCLUDES="config.py *.pc gi.types" -gobject_introspection_REQUIRES="libgirepository1.0-devel python27-mako" +gobject_introspection_REQUIRES="libgirepository1.0-devel python38-mako" BUILD_REQUIRES=" \ flex \ + gnome-common \ gtk-doc \ libcairo-devel \ libffi-devel \ libglib2.0-devel \ - python2-devel \ - python27-mako \ + python38-devel \ + python38-mako \ " -- 2.31.1 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-22 23:44 ` Lemures Lemniscati @ 2021-05-23 3:51 ` Marco Atzeri 2021-05-23 4:01 ` Marco Atzeri 2021-05-23 6:00 ` Brian Inglis 2021-05-23 18:13 ` Jon Turney 2 siblings, 1 reply; 13+ messages in thread From: Marco Atzeri @ 2021-05-23 3:51 UTC (permalink / raw) To: cygwin-apps On 23.05.2021 01: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 > > > Regards, > > Lem are you sure of those patches ? *** ERROR: patch 0001-Fix-a-patch-for-giscanner-shlibs.py-to-pass-a-pep8-c.patch will not apply it does not work alone or together with the old patch can you send the gobject-introspection.cygport ? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-23 3:51 ` Marco Atzeri @ 2021-05-23 4:01 ` Marco Atzeri 2021-05-23 4:45 ` Marco Atzeri 2021-05-23 5:04 ` Lemures Lemniscati 0 siblings, 2 replies; 13+ messages in thread From: Marco Atzeri @ 2021-05-23 4:01 UTC (permalink / raw) To: cygwin-apps On 23.05.2021 05:51, Marco Atzeri wrote: > On 23.05.2021 01: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: >> >> 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 >> I notice now that they are patch of patch, but it seems we are not starting on the same base $ patch -p1 -i 0002-gobject-introspection-1.54.1-4.patch patching file gobject-introspection.cygport Hunk #1 FAILED at 1. Hunk #2 FAILED at 16. Hunk #3 succeeded at 45 (offset -2 lines). 2 out of 3 hunks FAILED -- saving rejects to file gobject-introspection.cygport.rej can you send the all the raw files ? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-23 4:01 ` Marco Atzeri @ 2021-05-23 4:45 ` Marco Atzeri 2021-05-23 5:04 ` Lemures Lemniscati 1 sibling, 0 replies; 13+ messages in thread From: Marco Atzeri @ 2021-05-23 4:45 UTC (permalink / raw) To: cygwin-apps [-- Attachment #1: Type: text/plain, Size: 1389 bytes --] On 23.05.2021 06:01, Marco Atzeri wrote: > On 23.05.2021 05:51, Marco Atzeri wrote: >> On 23.05.2021 01: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: > >>> >>> Here are patches... >>> assuming I recovered correcttl the file, they build on my 32bit and pass all tests. scullywag error is very curious: ------------------------------------------------ GICOMP /cygdrive/c/projects/playground/gobject-introspection-1.54.1-4.i686/src/gobject-introspection-1.54.1/gir/win32-1.0.gir GICOMP gir/cairo-1.0.gir Traceback (most recent call last): File "/usr/lib/python3.8/distutils/unixccompiler.py", line 127, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + File "/usr/lib/python3.8/distutils/ccompiler.py", line 910, in spawn spawn(cmd, dry_run=self.dry_run) File "/usr/lib/python3.8/distutils/spawn.py", line 36, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/usr/lib/python3.8/distutils/spawn.py", line 147, in _spawn_posix raise DistutilsExecError( distutils.errors.DistutilsExecError: command 'gcc' terminated by signal 11 During handling of the above exception, another exception occurred: ------------------------------------------------- maybe it exceedes the 32bit assigned limits on the machine ? [-- Attachment #2: 1.36.0-python-libs.patch --] [-- Type: text/plain, Size: 646 bytes --] At least with 2.7 and 3.2, each argument is output on a separate line; the results are identical, and the resulting newline messes up the AC_SUBST. --- origsrc/gobject-introspection-1.36.0/m4/python.m4 2012-12-18 10:27:16.000000000 -0600 +++ src/gobject-introspection-1.36.0/m4/python.m4 2013-08-04 22:06:23.578220400 -0500 @@ -64,7 +64,7 @@ AC_DEFUN([AM_CHECK_PYTHON_LIBS], AC_MSG_CHECKING(for libraries required to link against libpython) dnl deduce PYTHON_LIBS if test "x$PYTHON_LIBS" = x; then - PYTHON_LIBS=`$PYTHON-config --ldflags --libs` + PYTHON_LIBS=`$PYTHON-config --libs` fi AC_SUBST(PYTHON_LIBS) dnl check if libpython exist: [-- Attachment #3: 1.36.0-tests-expected.patch --] [-- Type: text/plain, Size: 3587 bytes --] --- origsrc/gobject-introspection-1.36.0/tests/scanner/GetType-1.0-expected.gir 2013-02-26 15:25:11.000000000 -0600 +++ src/gobject-introspection-1.36.0/tests/scanner/GetType-1.0-expected.gir 2013-08-04 21:54:43.219162200 -0500 @@ -11,7 +11,7 @@ and/or use gtk-doc annotations. --> <c:include name="gettype.h"/> <namespace name="GetType" version="1.0" - shared-library="libgettype.so" + shared-library="cyggettype.dll" c:identifier-prefixes="GetType" c:symbol-prefixes="gettype"> <class name="Object" --- origsrc/gobject-introspection-1.36.0/tests/scanner/GtkFrob-1.0-expected.gir 2013-08-04 21:54:10.037264300 -0500 +++ src/gobject-introspection-1.36.0/tests/scanner/GtkFrob-1.0-expected.gir 2013-08-04 21:52:26.000000000 -0500 @@ -10,7 +10,7 @@ and/or use gtk-doc annotations. --> <package name="gobject-2.0"/> <namespace name="GtkFrob" version="1.0" - shared-library="libgtkfrob.so" + shared-library="cyggtkfrob.dll" c:identifier-prefixes="Gtk" c:symbol-prefixes="gtk_frob"> <function name="language_manager_get_default" --- origsrc/gobject-introspection-1.36.0/tests/scanner/Regress-1.0-expected.gir 2013-08-04 21:54:10.052265200 -0500 +++ src/gobject-introspection-1.36.0/tests/scanner/Regress-1.0-expected.gir 2013-08-04 21:52:26.000000000 -0500 @@ -12,7 +12,7 @@ and/or use gtk-doc annotations. --> <c:include name="regress.h"/> <namespace name="Regress" version="1.0" - shared-library="libregress.so" + shared-library="cygregress.dll" c:identifier-prefixes="Regress" c:symbol-prefixes="regress"> <alias name="AliasedTestBoxed" c:type="RegressAliasedTestBoxed"> --- origsrc/gobject-introspection-1.36.0/tests/scanner/SLetter-1.0-expected.gir 2013-02-26 15:25:11.000000000 -0600 +++ src/gobject-introspection-1.36.0/tests/scanner/SLetter-1.0-expected.gir 2013-08-04 21:54:52.968719800 -0500 @@ -10,7 +10,7 @@ and/or use gtk-doc annotations. --> <c:include name="sletter.h"/> <namespace name="SLetter" version="1.0" - shared-library="libsletter.so" + shared-library="cygsletter.dll" c:identifier-prefixes="S" c:symbol-prefixes="s"> <enumeration name="DBusError" --- origsrc/gobject-introspection-1.46.0/tests/scanner/Typedefs-1.0-expected.gir 2014-02-08 10:22:47.000000000 -0600 +++ src/gobject-introspection-1.46.0/tests/scanner/Typedefs-1.0-expected.gir 2015-11-05 19:18:42.207981400 -0600 @@ -11,7 +11,7 @@ and/or use gtk-doc annotations. --> <c:include name="typedefs.h"/> <namespace name="Typedefs" version="1.0" - shared-library="libtypedefs.so" + shared-library="cygtypedefs.dll" c:identifier-prefixes="Typedefs" c:symbol-prefixes="typedefs"> <record name="BoxedWithAnonymousTypedef" --- origsrc/gobject-introspection-1.36.0/tests/scanner/Utility-1.0-expected.gir 2013-08-04 21:54:10.060265600 -0500 +++ src/gobject-introspection-1.36.0/tests/scanner/Utility-1.0-expected.gir 2013-08-04 21:52:26.000000000 -0500 @@ -11,7 +11,7 @@ and/or use gtk-doc annotations. --> <c:include name="utility.h"/> <namespace name="Utility" version="1.0" - shared-library="libutility.so" + shared-library="cygutility.dll" c:identifier-prefixes="Utility" c:symbol-prefixes="utility"> <alias name="Glyph" c:type="UtilityGlyph"> [-- Attachment #4: 1.42.0-exeext.patch --] [-- Type: text/plain, Size: 758 bytes --] --- origsrc/gobject-introspection-1.42.0/tests/scanner/Makefile.am 2015-01-01 20:32:34.542523200 -0600 +++ src/gobject-introspection-1.42.0/tests/scanner/Makefile.am 2015-01-01 20:35:48.056096300 -0600 @@ -148,7 +148,7 @@ Typedefs_1_0_gir_SCANNERFLAGS = --c-incl GIRS += Typedefs-1.0.gir if !OS_WIN32 -EXTRA_PROGRAMS = barapp +EXTRA_PROGRAMS = barapp$(EXEEXT) CLEANFILES += $(EXTRA_PROGRAMS) barapp_SOURCES = $(srcdir)/barapp.c $(srcdir)/barapp.h @@ -157,7 +157,7 @@ barapp_LDFLAGS = -export-dynamic Bar-1.0.gir: barapp Bar_1_0_gir_PACKAGES = gobject-2.0 -Bar_1_0_gir_PROGRAM = ./barapp +Bar_1_0_gir_PROGRAM = ./barapp$(EXEEXT) Bar_1_0_gir_CFLAGS = $(GI_SCANNER_CFLAGS) Bar_1_0_gir_INCLUDES = GObject-2.0 Bar_1_0_gir_FILES = $(barapp_SOURCES) [-- Attachment #5: 1.54.1-2-cygwin.patch --] [-- Type: text/plain, Size: 5958 bytes --] --- origsrc/gobject-introspection-1.54.1/Makefile-giscanner.am 2016-03-14 06:49:00.000000000 -0400 +++ src/gobject-introspection-1.54.1/Makefile-giscanner.am 2020-08-04 09:49:26.065808000 -0400 @@ -117,7 +117,7 @@ _giscanner_la_LDFLAGS = \ -module -avoid-version \ -export-symbols-regex "init_giscanner|PyInit__giscanner" -if OS_WIN32 +if PLATFORM_WIN32 # Windows requires Python extension modules to be explicitly # linked to libpython. Extension modules are shared libaries # (.dll files), but need to be called .pyd for Python to load @@ -126,8 +126,12 @@ _giscanner_la_LIBADD += \ $(PYTHON_LIBS) _giscanner_la_LDFLAGS += \ - -no-undefined \ + -no-undefined +endif +if OS_WIN32 +_giscanner_la_LDFLAGS += \ -shrext ".pyd" endif + _giscanner_la_SOURCES = giscanner/giscannermodule.c --- origsrc/gobject-introspection-1.54.1/configure.ac 2017-10-02 08:21:36.000000000 -0400 +++ src/gobject-introspection-1.54.1/configure.ac 2020-08-04 09:49:26.073772000 -0400 @@ -29,13 +29,20 @@ AC_SUBST(GI_VERSION) # Check for Win32 AC_CANONICAL_HOST case "$host" in +*-*-cygwin*) + platform_win32=yes + os_win32=no + ;; *-*-mingw*) + platform_win32=yes os_win32=yes ;; *) + platform_win32=no os_win32=no ;; esac +AM_CONDITIONAL(PLATFORM_WIN32, [test "x$platform_win32" = "xyes"]) AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"]) # Checks for programs. @@ -150,6 +157,9 @@ AS_IF([test x${with_cairo} != xno], [ AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo = xyes) case "$host" in + *-*-cygwin*) + CAIRO_SHARED_LIBRARY="cygcairo-gobject-2.dll" + ;; *-*-darwin*) CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib" ;; @@ -274,7 +284,7 @@ case "$host" in ;; esac AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found])) -if test "x$os_win32" = "xyes"; then +if test "x$platform_win32" = "xyes"; then AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.])) fi --- origsrc/gobject-introspection-1.54.1/girepository/girepository.c 2016-05-08 11:09:09.000000000 -0400 +++ src/gobject-introspection-1.54.1/girepository/girepository.c 2020-08-04 09:49:26.081781100 -0400 @@ -57,7 +57,7 @@ struct _GIRepositoryPrivate G_DEFINE_TYPE (GIRepository, g_irepository, G_TYPE_OBJECT); -#ifdef G_PLATFORM_WIN32 +#ifdef G_OS_WIN32 #include <windows.h> --- origsrc/gobject-introspection-1.54.1/giscanner/ccompiler.py 2017-05-18 01:42:52.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/ccompiler.py 2020-08-04 09:49:26.089710500 -0400 @@ -118,6 +118,10 @@ class CCompiler(object): if self.check_is_msvc(): runtime_path_envvar = ['LIB', 'PATH'] + elif os.name == 'nt' or sys.platform == 'cygwin': + runtime_path_envvar = ['PATH'] + # Search the current directory first + args.append('-L.') else: runtime_path_envvar = ['LD_LIBRARY_PATH'] # Search the current directory first --- origsrc/gobject-introspection-1.54.1/giscanner/shlibs.py 2016-03-14 06:49:01.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/shlibs.py 2020-08-04 10:16:24.364844100 -0400 @@ -61,6 +61,8 @@ def _ldd_library_pattern(library_name): pattern = "(?<![A-Za-z0-9_-])(lib*%s[^A-Za-z0-9_-][^\s\(\)]*)" if platform.system() == 'Darwin': pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)" + elif platform.platform().startswith('CYGWIN'): + pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)" return re.compile(pattern % re.escape(library_name)) --- origsrc/gobject-introspection-1.54.1/giscanner/utils.py 2017-06-20 17:10:33.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/utils.py 2020-08-04 09:49:26.104703700 -0400 @@ -80,7 +80,7 @@ def to_underscores_noprefix(name): return name -_libtool_pat = re.compile("dlname='([A-z0-9\.\-\+]+)'\n") +_libtool_pat = re.compile("dlname='([A-z0-9/\.\-\+]+)'\n") def _extract_dlname_field(la_file): --- origsrc/gobject-introspection-1.54.1/tests/Makefile.am 2014-09-04 03:24:07.000000000 -0400 +++ src/gobject-introspection-1.54.1/tests/Makefile.am 2020-08-04 09:49:26.110683300 -0400 @@ -20,7 +20,12 @@ tests_DATA = \ EXTRA_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la libeverything_1_0_la_SOURCES = everything.c +libeverything_1_0_la_LDFLAGS = -no-undefined +libeverything_1_0_la_LIBADD = $(GOBJECT_LIBS) + libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c +libgimarshallingtests_1_0_la_LDFLAGS = -no-undefined +libgimarshallingtests_1_0_la_LIBADD = $(GOBJECT_LIBS) EXTRA_DIST += \ gimarshallingtests.h \ --- origsrc/gobject-introspection-1.54.1/tests/offsets/Makefile.am 2015-07-01 03:23:55.000000000 -0400 +++ src/gobject-introspection-1.54.1/tests/offsets/Makefile.am 2020-08-04 09:49:26.116698000 -0400 @@ -18,7 +18,7 @@ liboffsets_la_SOURCES = \ offsets.c liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) -I$(top_srcdir)/tests # dummy rpath to get built dynamically (huh?) -liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir) +liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir) -no-undefined Offsets-1.0.gir: liboffsets.la offsets.h Offsets_1_0_gir_INCLUDES = GObject-2.0 --- origsrc/gobject-introspection-1.54.1/tests/scanner/Makefile.am 2020-08-04 09:48:05.413104600 -0400 +++ src/gobject-introspection-1.54.1/tests/scanner/Makefile.am 2020-08-04 09:49:26.122659100 -0400 @@ -68,7 +68,7 @@ endif libregress_la_LDFLAGS = $(AM_LDFLAGS) -if OS_WIN32 +if PLATFORM_WIN32 AM_LDFLAGS += -no-undefined endif @@ -155,7 +155,7 @@ barapp_SOURCES = $(srcdir)/barapp.c $(sr barapp_LDADD = $(top_builddir)/libgirepository-1.0.la barapp_LDFLAGS = -export-dynamic -Bar-1.0.gir: barapp +Bar-1.0.gir: barapp$(EXEEXT) Bar_1_0_gir_PACKAGES = gobject-2.0 Bar_1_0_gir_PROGRAM = ./barapp$(EXEEXT) Bar_1_0_gir_CFLAGS = $(GI_SCANNER_CFLAGS) [-- Attachment #6: gobject-introspection.cygport --] [-- Type: text/plain, Size: 2415 bytes --] inherit gnome2 python3 NAME="gobject-introspection" VERSION=1.54.1 RELEASE=4 CATEGORY="Libs" SUMMARY="GObject Introspection tools" DESCRIPTION="The goal of the project is to describe GObject APIs and collect them in a uniform, machine readable format." HOMEPAGE="https://gi.readthedocs.io/en/latest/" PATCH_URI=" 1.42.0-exeext.patch 1.36.0-tests-expected.patch 1.36.0-python-libs.patch 1.54.1-2-cygwin.patch " PYTHON3=python3.8 CYGCONF_ARGS="--with-python=${PYTHON3}" PKG_NAMES="${NAME} libgirepository1.0_1 libgirepository1.0-devel libgirepository1.0-doc" gobject_introspection_CATEGORY="Devel" gobject_introspection_SUMMARY="GObject Introspection tools" gobject_introspection_REQUIRES="libgirepository1.0-devel" gobject_introspection_CONTENTS="--exclude=gir-1.0 --exclude=gtk-doc usr/bin/g-ir-* usr/lib/${NAME}/ usr/share/" libgirepository1_0_1_SUMMARY="GObject Introspection library (runtime)" libgirepository1_0_1_CONTENTS="usr/bin/cyggirepository-1.0-1.dll" libgirepository1_0_devel_REQUIRES="girepository-GIRepository2.0" libgirepository1_0_devel_SUMMARY="GObject Introspection library (development)" libgirepository1_0_devel_CONTENTS="usr/include/ usr/lib/libgirepository-1.0.* usr/lib/pkgconfig/" libgirepository1_0_doc_CATEGORY="Doc" libgirepository1_0_doc_SUMMARY="GObject Introspection library (API docs)" libgirepository1_0_doc_CONTENTS="usr/share/gtk-doc/" PKG_NAMES+=" girepository-cairo1.0 girepository-GIRepository2.0 girepository-GLib2.0 girepository-x11" girepository_cairo1_0_SUMMARY="GObject Introspection data for libcairo" girepository_cairo1_0_CONTENTS="usr/*/gir*/cairo-1.0.*" girepository_GIRepository2_0_SUMMARY="GObject Introspection library (GObject Introspection data)" girepository_GIRepository2_0_CONTENTS="usr/*/gir*/GIRepository-2.0.*" girepository_GLib2_0_SUMMARY="GLib GObjectIntrospection data" girepository_GLib2_0_CONTENTS="--exclude=GIR* --exclude=GL-* usr/*/gir*/G*-2.0.*" girepository_x11_SUMMARY="GObject Introspection data for X11 libraries" girepository_x11_CONTENTS="--exclude=cairo-1.0.* --exclude=G*-2.0.* usr/*/gir*/" DIFF_EXCLUDES="config.py *.pc gi.types" gobject_introspection_REQUIRES="libgirepository1.0-devel python38-mako" BUILD_REQUIRES=" \ flex \ gnome-common \ gtk-doc \ libcairo-devel \ libffi-devel \ libglib2.0-devel \ python38-devel \ python38-mako \ " ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-23 4:01 ` Marco Atzeri 2021-05-23 4:45 ` Marco Atzeri @ 2021-05-23 5:04 ` Lemures Lemniscati 2023-01-12 19:50 ` Jon Turney 1 sibling, 1 reply; 13+ messages in thread From: Lemures Lemniscati @ 2021-05-23 5:04 UTC (permalink / raw) To: cygwin-apps [-- Attachment #1: Type: text/plain, Size: 1820 bytes --] On Sun, 23 May 2021 06:01:43 +0200, Marco Atzeri via Cygwin-apps > On 23.05.2021 05:51, Marco Atzeri wrote: > > On 23.05.2021 01: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: > > >> > >> 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 > >> > > I notice now that they are patch of patch, > but it seems we are not starting on the same base > > $ patch -p1 -i 0002-gobject-introspection-1.54.1-4.patch > patching file gobject-introspection.cygport > Hunk #1 FAILED at 1. > Hunk #2 FAILED at 16. > Hunk #3 succeeded at 45 (offset -2 lines). > 2 out of 3 hunks FAILED -- saving rejects to file gobject-introspection.cygport.rej > > can you send the all the raw files ? These patches are the last two commit from here for the time being: https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/playground.git;a=commitdiff;h=1f435122b29fdc5a7c3f71f6da0cb28bbb843847 which forked from the gobject-introspection 1.54.1-3 https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/gobject-introspection.git;a=commit;h=cd7b82d762911316ae43708b30941fea4d7f718d Atattched files are modified files based on 1.54.1-3. gobject-introdpection.cygport: modified. 1.54.1-2-cygwin.patch: removed a trailing space. Regards, Lem [-- Attachment #2: gobject-introspection.cygport --] [-- Type: application/octet-stream, Size: 2415 bytes --] inherit gnome2 python3 NAME="gobject-introspection" VERSION=1.54.1 RELEASE=4 CATEGORY="Libs" SUMMARY="GObject Introspection tools" DESCRIPTION="The goal of the project is to describe GObject APIs and collect them in a uniform, machine readable format." HOMEPAGE="https://gi.readthedocs.io/en/latest/" PATCH_URI=" 1.42.0-exeext.patch 1.36.0-tests-expected.patch 1.36.0-python-libs.patch 1.54.1-2-cygwin.patch " PYTHON3=python3.8 CYGCONF_ARGS="--with-python=${PYTHON3}" PKG_NAMES="${NAME} libgirepository1.0_1 libgirepository1.0-devel libgirepository1.0-doc" gobject_introspection_CATEGORY="Devel" gobject_introspection_SUMMARY="GObject Introspection tools" gobject_introspection_REQUIRES="libgirepository1.0-devel" gobject_introspection_CONTENTS="--exclude=gir-1.0 --exclude=gtk-doc usr/bin/g-ir-* usr/lib/${NAME}/ usr/share/" libgirepository1_0_1_SUMMARY="GObject Introspection library (runtime)" libgirepository1_0_1_CONTENTS="usr/bin/cyggirepository-1.0-1.dll" libgirepository1_0_devel_REQUIRES="girepository-GIRepository2.0" libgirepository1_0_devel_SUMMARY="GObject Introspection library (development)" libgirepository1_0_devel_CONTENTS="usr/include/ usr/lib/libgirepository-1.0.* usr/lib/pkgconfig/" libgirepository1_0_doc_CATEGORY="Doc" libgirepository1_0_doc_SUMMARY="GObject Introspection library (API docs)" libgirepository1_0_doc_CONTENTS="usr/share/gtk-doc/" PKG_NAMES+=" girepository-cairo1.0 girepository-GIRepository2.0 girepository-GLib2.0 girepository-x11" girepository_cairo1_0_SUMMARY="GObject Introspection data for libcairo" girepository_cairo1_0_CONTENTS="usr/*/gir*/cairo-1.0.*" girepository_GIRepository2_0_SUMMARY="GObject Introspection library (GObject Introspection data)" girepository_GIRepository2_0_CONTENTS="usr/*/gir*/GIRepository-2.0.*" girepository_GLib2_0_SUMMARY="GLib GObjectIntrospection data" girepository_GLib2_0_CONTENTS="--exclude=GIR* --exclude=GL-* usr/*/gir*/G*-2.0.*" girepository_x11_SUMMARY="GObject Introspection data for X11 libraries" girepository_x11_CONTENTS="--exclude=cairo-1.0.* --exclude=G*-2.0.* usr/*/gir*/" DIFF_EXCLUDES="config.py *.pc gi.types" gobject_introspection_REQUIRES="libgirepository1.0-devel python38-mako" BUILD_REQUIRES=" \ flex \ gnome-common \ gtk-doc \ libcairo-devel \ libffi-devel \ libglib2.0-devel \ python38-devel \ python38-mako \ " [-- Attachment #3: 1.54.1-2-cygwin.patch --] [-- Type: application/octet-stream, Size: 5958 bytes --] --- origsrc/gobject-introspection-1.54.1/Makefile-giscanner.am 2016-03-14 06:49:00.000000000 -0400 +++ src/gobject-introspection-1.54.1/Makefile-giscanner.am 2020-08-04 09:49:26.065808000 -0400 @@ -117,7 +117,7 @@ _giscanner_la_LDFLAGS = \ -module -avoid-version \ -export-symbols-regex "init_giscanner|PyInit__giscanner" -if OS_WIN32 +if PLATFORM_WIN32 # Windows requires Python extension modules to be explicitly # linked to libpython. Extension modules are shared libaries # (.dll files), but need to be called .pyd for Python to load @@ -126,8 +126,12 @@ _giscanner_la_LIBADD += \ $(PYTHON_LIBS) _giscanner_la_LDFLAGS += \ - -no-undefined \ + -no-undefined +endif +if OS_WIN32 +_giscanner_la_LDFLAGS += \ -shrext ".pyd" endif + _giscanner_la_SOURCES = giscanner/giscannermodule.c --- origsrc/gobject-introspection-1.54.1/configure.ac 2017-10-02 08:21:36.000000000 -0400 +++ src/gobject-introspection-1.54.1/configure.ac 2020-08-04 09:49:26.073772000 -0400 @@ -29,13 +29,20 @@ AC_SUBST(GI_VERSION) # Check for Win32 AC_CANONICAL_HOST case "$host" in +*-*-cygwin*) + platform_win32=yes + os_win32=no + ;; *-*-mingw*) + platform_win32=yes os_win32=yes ;; *) + platform_win32=no os_win32=no ;; esac +AM_CONDITIONAL(PLATFORM_WIN32, [test "x$platform_win32" = "xyes"]) AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"]) # Checks for programs. @@ -150,6 +157,9 @@ AS_IF([test x${with_cairo} != xno], [ AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo = xyes) case "$host" in + *-*-cygwin*) + CAIRO_SHARED_LIBRARY="cygcairo-gobject-2.dll" + ;; *-*-darwin*) CAIRO_SHARED_LIBRARY="libcairo-gobject.2.dylib" ;; @@ -274,7 +284,7 @@ case "$host" in ;; esac AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found])) -if test "x$os_win32" = "xyes"; then +if test "x$platform_win32" = "xyes"; then AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.])) fi --- origsrc/gobject-introspection-1.54.1/girepository/girepository.c 2016-05-08 11:09:09.000000000 -0400 +++ src/gobject-introspection-1.54.1/girepository/girepository.c 2020-08-04 09:49:26.081781100 -0400 @@ -57,7 +57,7 @@ struct _GIRepositoryPrivate G_DEFINE_TYPE (GIRepository, g_irepository, G_TYPE_OBJECT); -#ifdef G_PLATFORM_WIN32 +#ifdef G_OS_WIN32 #include <windows.h> --- origsrc/gobject-introspection-1.54.1/giscanner/ccompiler.py 2017-05-18 01:42:52.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/ccompiler.py 2020-08-04 09:49:26.089710500 -0400 @@ -118,6 +118,10 @@ class CCompiler(object): if self.check_is_msvc(): runtime_path_envvar = ['LIB', 'PATH'] + elif os.name == 'nt' or sys.platform == 'cygwin': + runtime_path_envvar = ['PATH'] + # Search the current directory first + args.append('-L.') else: runtime_path_envvar = ['LD_LIBRARY_PATH'] # Search the current directory first --- origsrc/gobject-introspection-1.54.1/giscanner/shlibs.py 2016-03-14 06:49:01.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/shlibs.py 2020-08-04 10:16:24.364844100 -0400 @@ -61,6 +61,8 @@ def _ldd_library_pattern(library_name): pattern = "(?<![A-Za-z0-9_-])(lib*%s[^A-Za-z0-9_-][^\s\(\)]*)" if platform.system() == 'Darwin': pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)" + elif platform.platform().startswith('CYGWIN'): + pattern = "([^\s]*cyg%s[-.0-9]*\.[^\s\(\)]*)" return re.compile(pattern % re.escape(library_name)) --- origsrc/gobject-introspection-1.54.1/giscanner/utils.py 2017-06-20 17:10:33.000000000 -0400 +++ src/gobject-introspection-1.54.1/giscanner/utils.py 2020-08-04 09:49:26.104703700 -0400 @@ -80,7 +80,7 @@ def to_underscores_noprefix(name): return name -_libtool_pat = re.compile("dlname='([A-z0-9\.\-\+]+)'\n") +_libtool_pat = re.compile("dlname='([A-z0-9/\.\-\+]+)'\n") def _extract_dlname_field(la_file): --- origsrc/gobject-introspection-1.54.1/tests/Makefile.am 2014-09-04 03:24:07.000000000 -0400 +++ src/gobject-introspection-1.54.1/tests/Makefile.am 2020-08-04 09:49:26.110683300 -0400 @@ -20,7 +20,12 @@ tests_DATA = \ EXTRA_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la libeverything_1_0_la_SOURCES = everything.c +libeverything_1_0_la_LDFLAGS = -no-undefined +libeverything_1_0_la_LIBADD = $(GOBJECT_LIBS) + libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c +libgimarshallingtests_1_0_la_LDFLAGS = -no-undefined +libgimarshallingtests_1_0_la_LIBADD = $(GOBJECT_LIBS) EXTRA_DIST += \ gimarshallingtests.h \ --- origsrc/gobject-introspection-1.54.1/tests/offsets/Makefile.am 2015-07-01 03:23:55.000000000 -0400 +++ src/gobject-introspection-1.54.1/tests/offsets/Makefile.am 2020-08-04 09:49:26.116698000 -0400 @@ -18,7 +18,7 @@ liboffsets_la_SOURCES = \ offsets.c liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS) $(GI_HIDDEN_VISIBILITY_CFLAGS) -I$(top_srcdir)/tests # dummy rpath to get built dynamically (huh?) -liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir) +liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir) -no-undefined Offsets-1.0.gir: liboffsets.la offsets.h Offsets_1_0_gir_INCLUDES = GObject-2.0 --- origsrc/gobject-introspection-1.54.1/tests/scanner/Makefile.am 2020-08-04 09:48:05.413104600 -0400 +++ src/gobject-introspection-1.54.1/tests/scanner/Makefile.am 2020-08-04 09:49:26.122659100 -0400 @@ -68,7 +68,7 @@ endif libregress_la_LDFLAGS = $(AM_LDFLAGS) -if OS_WIN32 +if PLATFORM_WIN32 AM_LDFLAGS += -no-undefined endif @@ -155,7 +155,7 @@ barapp_SOURCES = $(srcdir)/barapp.c $(sr barapp_LDADD = $(top_builddir)/libgirepository-1.0.la barapp_LDFLAGS = -export-dynamic -Bar-1.0.gir: barapp +Bar-1.0.gir: barapp$(EXEEXT) Bar_1_0_gir_PACKAGES = gobject-2.0 Bar_1_0_gir_PROGRAM = ./barapp$(EXEEXT) Bar_1_0_gir_CFLAGS = $(GI_SCANNER_CFLAGS) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-23 5:04 ` Lemures Lemniscati @ 2023-01-12 19:50 ` Jon Turney 0 siblings, 0 replies; 13+ messages in thread From: Jon Turney @ 2023-01-12 19:50 UTC (permalink / raw) To: Lemures Lemniscati, cygwin-apps On 23/05/2021 06:04, Lemures Lemniscati via Cygwin-apps wrote: > On Sun, 23 May 2021 06:01:43 +0200, Marco Atzeri via Cygwin-apps >> On 23.05.2021 05:51, Marco Atzeri wrote: >>> On 23.05.2021 01: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: >> >>>> >>>> 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 >>>> [...] > > > These patches are the last two commit from here for the time being: > > https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/playground.git;a=commitdiff;h=1f435122b29fdc5a7c3f71f6da0cb28bbb843847 > > which forked from the gobject-introspection 1.54.1-3 > https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/gobject-introspection.git;a=commit;h=cd7b82d762911316ae43708b30941fea4d7f718d > > Atattched files are modified files based on 1.54.1-3. > > gobject-introdpection.cygport: modified. > 1.54.1-2-cygwin.patch: removed a trailing space. Thanks, Lem. I've rebuilt gobject-introspection for python39, using these patches. Sorry that took so long to get around to. (It would be nice to update this to a later version, but that seems to require glib to be updated also...) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-22 23:44 ` Lemures Lemniscati 2021-05-23 3:51 ` Marco Atzeri @ 2021-05-23 6:00 ` Brian Inglis 2021-05-23 11:50 ` Lemures Lemniscati 2021-05-23 18:13 ` Jon Turney 2 siblings, 1 reply; 13+ messages in thread From: Brian Inglis @ 2021-05-23 6:00 UTC (permalink / raw) To: cygwin-apps 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.] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-23 6:00 ` Brian Inglis @ 2021-05-23 11:50 ` Lemures Lemniscati 2021-05-23 18:17 ` Jon Turney 0 siblings, 1 reply; 13+ messages in thread From: Lemures Lemniscati @ 2021-05-23 11:50 UTC (permalink / raw) To: cygwin-apps On Sun, 23 May 2021 00:00:25 -0600, Brian Inglis > 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' > ... > > totalling 130 instances - includes/definitions missing? > > -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada Oh, I overlooked them. I looked into a log corresponding to the current version 1.54.1-3 [1]. [1]: https://cygwin.com/cgi-bin2/jobs.cgi?srcpkg=gobject-introspection&id=2763 * i686: No syntax error related to '__float128' [2] at gobject-introspection-1.54.1/gir/GL-1.0.gir. So, it is newly introduced [2]: https://ci.appveyor.com/project/cygwin/scallywag/builds/39168275/job/11sd0x8ywqfe3v2c#L1456 * x86_64: There are similar errors ('unexpected typedef-name') already [3]. [3]: https://ci.appveyor.com/project/cygwin/scallywag/builds/39168275/job/4637hbqdc6b6htvj#L1476 But I've no idea... Lem ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-23 11:50 ` Lemures Lemniscati @ 2021-05-23 18:17 ` Jon Turney 0 siblings, 0 replies; 13+ messages in thread From: Jon Turney @ 2021-05-23 18:17 UTC (permalink / raw) To: cygwin-apps On 23/05/2021 12:50, Lemures Lemniscati via Cygwin-apps wrote: > On Sun, 23 May 2021 00:00:25 -0600, Brian Inglis >> 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 >>>>> [...] Thanks for looking into this. >> 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' This is 'expected', since (this version of?) g-ir-compiler doesn't know about __float128 as a built-in type. There's no input which can legitimately make gcc terminate with segv, so trying to blame this on gobject-introspection is incorrect. There is a something going wrong in gcc, or (more probably) cygwin. From previous reports [1], [2] it seems to be a problem which only manifests itself on WOW64. [1] https://cygwin.com/pipermail/cygwin-apps/2020-October/040548.html [2] https://sourceware.org/legacy-ml/cygwin/2014-10/msg00552.html > Oh, I overlooked them. > > > I looked into a log corresponding to the current version 1.54.1-3 [1]. > > [1]: https://cygwin.com/cgi-bin2/jobs.cgi?srcpkg=gobject-introspection&id=2763 > > > * i686: No syntax error related to '__float128' [2] > at gobject-introspection-1.54.1/gir/GL-1.0.gir. > So, it is newly introduced I think it just didn't get far enough, the same error is seen when building locally (which is how I had to build the package, because of the 'signal 11' problem) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-22 23:44 ` Lemures Lemniscati 2021-05-23 3:51 ` Marco Atzeri 2021-05-23 6:00 ` Brian Inglis @ 2021-05-23 18:13 ` Jon Turney 2 siblings, 0 replies; 13+ messages in thread From: Jon Turney @ 2021-05-23 18:13 UTC (permalink / raw) To: cygwin-apps On 23/05/2021 00:44, Lemures Lemniscati via Cygwin-apps wrote: > > 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 Yeah, I don't know why the x86 build fails in the AppVeyor environment. Downloading the builddir artifact, there isn't even a stackdump file, so the only way I can think of investigating futher is to RDP into the AppVeyor VM and try to trigger the crash with 'CYGWIN=error_start:gdb' set. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: g-ir-scanner fails with python-3.8 2021-05-19 19:32 g-ir-scanner fails with python-3.8 Ken Brown 2021-05-19 21:09 ` Jon Turney @ 2021-05-19 21:21 ` Marco Atzeri 1 sibling, 0 replies; 13+ messages in thread From: Marco Atzeri @ 2021-05-19 21:21 UTC (permalink / raw) To: cygwin-apps On 19.05.2021 21: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/bin/g-ir-scanner", line 65, in <module> ... > from giscanner._giscanner import collect_attributes > ImportError: dynamic module does not define module export function > (PyInit__giscanner) > > The log of my last successful build of harfbuzz shows that python-3.6 > was installed. Do any of the python experts out there (Marco? Jon?) > know what the problem could be? replace PyMODINIT_FUNC with PyObject* inside the PyInit code I never really understood why , maybe is due to a wrong __declspec(dllexport) somewhere Any tentative to change from python side instead of the packages side has been ineffective. > Thanks. > > Ken ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-01-12 19:50 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-05-19 19:32 g-ir-scanner fails with python-3.8 Ken Brown 2021-05-19 21:09 ` Jon Turney 2021-05-22 23:44 ` Lemures Lemniscati 2021-05-23 3:51 ` Marco Atzeri 2021-05-23 4:01 ` Marco Atzeri 2021-05-23 4:45 ` Marco Atzeri 2021-05-23 5:04 ` Lemures Lemniscati 2023-01-12 19:50 ` Jon Turney 2021-05-23 6:00 ` Brian Inglis 2021-05-23 11:50 ` Lemures Lemniscati 2021-05-23 18:17 ` Jon Turney 2021-05-23 18:13 ` Jon Turney 2021-05-19 21:21 ` Marco Atzeri
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).