DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 62K5dVeM101263 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 62K5dVeM101263 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=fAqY5tuS X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB3AD4B1A2A8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1773985170; bh=b3Faz9j2DH923R8OQwmJnuL0C05RIw4DudXbonhzEBE=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=fAqY5tuSYoNf0r5oYpdbskLZDEhohEc0yRwvYeKnodcbB1uHYZ9JbWfEFomy60lbX 0p6B7uMBpXZo3ZS5pYBf/znStGZ/QduYTEZwVfREjE0juKQ+ONWswTOnkAxi/xLOgI NJdf+YNMjpY7b4mR5c8Jq8mqYFzjDykljIXOw9uQ= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C39B14B1A2F9 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C39B14B1A2F9 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773985098; cv=none; b=W5s3JZDoAUkvRHCoBvZTsvA+S4p2F2SjBumxOsTmYLGNFZnBRsLrqV8pHJ+dl9hr9qZRaNqV5GHCipsOqHDrkxO+Cfd/DAA5gCm841rh3+nVEc5fIoQ4uoFcOxAde8EGSGSfQt96rKTLLvW+kXE/aAeimSDtHuaNcNzT5B0HMkA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773985098; c=relaxed/simple; bh=Ehzt3OtK4/l1e+7vofBBFIsqt7tILfHmATZlBI6kgek=; h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature; b=b6Duv3ff9+CUE0etxIZdggjTMxbUgcjYxPa+kki3IZHG+gkgFbq8HhcB+OYbLQ036Tj2wvHgMxl4seNpmGjWwgLWyDThsMWNjHtIIgSxCJzwb0ALe0ON3gpve7FQ3idcUiNkg3ioQDgci8E4OOnJBomzJrLAUN5G/5r1/r1AysA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C39B14B1A2F9 Date: Fri, 20 Mar 2026 14:38:14 +0900 To: cygwin AT cygwin DOT com Subject: Re: gobject-introspection 1.86.0-1 Message-Id: <20260320143814.0d2dbafd73d53c4cb76e68c3@nifty.ne.jp> In-Reply-To: <38fd29ac-233f-4050-b644-5ee14e74bb1c@dronecode.org.uk> References: <20250913215145 DOT 14665-1-takashi DOT yano AT nifty DOT ne DOT jp> <20260317220447 DOT 0adcb7bd33d9b2863c212ba8 AT nifty DOT ne DOT jp> <38fd29ac-233f-4050-b644-5ee14e74bb1c AT dronecode DOT org DOT uk> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Tue, 17 Mar 2026 16:20:21 +0000 Jon Turney wrote: > On 17/03/2026 13:04, Takashi Yano via Cygwin wrote: > > Hi Jon, > > > > Sorry for the late reply. > > No problem! I understand that you have many other, more important > demands on your time. > > [...] > >> Hi Takashi, > >> > >> I just tripped over a small problem with gobject-introspection: > >> > >>> $ /usr/sbin/alternatives --set python3 /usr/bin/python3.12 > >>> > >>> $ g-ir-scanner > >>> Traceback (most recent call last): > >>> File "/usr/bin/g-ir-scanner", line 133, in > >>> from giscanner.scannermain import scanner_main > >>> File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 35, in > >>> from giscanner.ast import Include, Namespace > >>> File "/usr/lib/gobject-introspection/giscanner/ast.py", line 27, in > >>> from .sourcescanner import CTYPE_TYPEDEF, CSYMBOL_TYPE_TYPEDEF > >>> File "/usr/lib/gobject-introspection/giscanner/sourcescanner.py", line 31, in > >>> from giscanner._giscanner import SourceScanner as CSourceScanner > >>> ModuleNotFoundError: No module named 'giscanner._giscanner' > >> > >> This fails because the _giscanner module is built for (and linked > >> against) python3.9. > > > > Thanks for pointing this out. > > Currently, _giscanner is compiled as > > /usr/lib/gobject-introspection/giscanner/_giscanner.cpython-39-x86_64-cygwin.dll > > which perhaps requires libpython3.9.dll. > > > >> I don't quite understand why this is happening since we configure with > >> "-Dpython=${PYTHON3}", so I'd expect end up with the full path to > >> specific python version in the shebang line in g-ir-scanner. > >> > >> (I think that's what was happening before upstream switched from > >> autotools to meson) > >> > >> In any case, this can be fixed in the cygport by using > >> python3_fix_shebang on this script. > > > > Could you please let me know bit more detail how to use > > 'python3_fix_shebang'? > > Sure. > > In this case, I'd suggest adding a custom src_install which contains the > default for the meson cygclass [1], then uses python3_fix_shebang[2]. > > > src_install() { > > cd ${S} > > meson_install > > > > python3_fix_shebang /usr/bin/g-ir-scanner > > } > > The idea is that this adjusts the shebang line in the installed > g-ir-scanner so it references python3.9, so that the import can be found > (and thus it can be invoked successfully), irrespective of what version > /usr/bin/python3 points to. > > Unfortunately, when I actually try it, it seems that it can't handle > '#!/usr/bin/env python3' and just rewrites the env part. How > disappointing! That seems like a cygport bug :( > > I guess you could just use something like this instead: > > > sed -i -e "s#python3#${PYTHON3}#" ${D}/usr/bin/g-ir-scanner Thanks! I released 1.86.0-2 using: sed -i -e "s AT python3@${PYTHON3##*/}@" ${D}/usr/bin/g-ir-annotation-tool sed -i -e "s AT python3@${PYTHON3##*/}@" ${D}/usr/bin/g-ir-doc-tool sed -i -e "s AT python3@${PYTHON3##*/}@" ${D}/usr/bin/g-ir-scanner > (But as I say, this all seems a bit like maybe an upstream bug that the > python interpreter passed in via CYGMESON_ARGS doesn't end up there anyway?) > > > [1] > https://cygwin.github.io/cygport/meson_cygclass.html#src_install%20(meson) > [2] > https://cygwin.github.io/cygport/python3_cygclass.html#python3_fix_shebang Thanks again. -- Takashi Yano -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple