delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/03/17/12:23:14

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 62HGNCVB1084984
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 62HGNCVB1084984
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=Ednhv2HW
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C09544BBCD9A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1773764591;
bh=7HPCN7gEELso92MGLie+TUxnC1EsrSw9gpORicbCQh8=;
h=Date:Subject:To:References:Cc:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=Ednhv2HWuqT3e+iLS+E1dVnHI2y5bQrRU5LOD6UaSUgPU3wB9w3X9ZjJYyCl80kOs
KWhYK++ehsDRuQqfSbx8IycM9ol17NFc3QKsCYL355ufPDk7JxOt6szXfw3BY/O+Qz
ESv2zBpqReiaDrIJy8x79umkfYXWGnyt/PkL2NJ0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F1CD4BB58E9
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9F1CD4BB58E9
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1773764431; cv=none;
b=d1YkNgnUfUjpyonNmakeMnP372KLV+bo62/feUdiBEMyh2RMltIDR86DXunFu9LlaH9hg+9P5QUNdFPtxYU+q5THwNVOATMb5Rdk5cv09+5h7nZbcMIMwN8NrXnzBL3VMocgyJN1R/qb1i0DuMRNOve9Jb0kuIc1r9LEVv+iSg0=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1773764431; c=relaxed/simple;
bh=wHL4tXcDh0AdXMGErIadgbyNSwHDclGBqhExd19TwGI=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=nIFJcugNbSvicP6bZ17UrWM2ZMXO2EZ47KFW5xddMcV0+mgGAe+/hY653bAZkzDcz2esPychKTKv9kFnO4BnYlqJ3ui8Tj5SYs0FAXDwwuCpcwoYYC8YVfKKQ9d6RsiA65CcJYqJrWUe8TPp67r66m77T0IWJZzgid4+SaU+GYU=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F1CD4BB58E9
X-SNCR-Rigid: 6994FCBB028C97B2
X-Originating-IP: [62.49.245.144]
X-OWM-Source-IP: 62.49.245.144
X-OWM-Env-Sender: jon DOT turney AT dronecode DOT org DOT uk
X-RazorGate-Vade: dmFkZTFGK5D3ZjZshqxnLC/dbDcAigJp39pyRJSRaPpl/FIrxyZZDG6M86ZXFIw9g/uj3OcCwkbERMqOchpo8jI7rvk+4kvTuHLQ+K2gXcpXrO6NaP+SqXUZm3TcBvhHIWTsD5r9RiXQziHjweg2dvUGiHDU4qaDXgjtQczR1pWqpiKpFRllsRcK7tIjiDUAw/l4vDBZVRbnjbdQyEkmYY+IhCr1y8/5Rp722kF6Zbnmbd/Kwb3y0wCz9J6cnxdQ1RfGNSk7vFIwgNJ2gbDQVPsgjyREnwQQBLTuyraT9TJIzK2QKMReh1p5U5bgLC1inGMI3AOY3IFJFnlHHpV/HDEAPIK4aKdaaKmhnOf1chL1S4n7pswvSJVUECdE+GGIaq9D16sZD1UAqnbufYmv27C3VmLbrKeiYZkMidLDYt+w13nMQM5CJqiMbVkXbyzoY90ExiUzy5Lgnw0j+Mzxof8lc+YOOl9TfDWStEKzUZqpluI2SVF4lxRrQWyd71sFZt6jiFdq/dsaO85GqLf9z0DgxFtIIhfgcKJWfzm3MbudoSYLlaAjMXJIEnOqYMjxOYl9FgErl8mJEZwO0uF0pMZ1aEsXNVTTNC0u6eZTuRPHv6cWzs6WU+PeRT6QZTgdYh/BXgNQgPhGl3PI9/UDbrZjf4kzLWuw0N3aReNIBnkLOkh+4Q
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
X-VadeSecure-score: verdict=clean score=0/300, class=clean
Message-ID: <38fd29ac-233f-4050-b644-5ee14e74bb1c@dronecode.org.uk>
Date: Tue, 17 Mar 2026 16:20:21 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: gobject-introspection 1.86.0-1
To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
References: <20250913215145 DOT 14665-1-takashi DOT yano AT nifty DOT ne DOT jp>
<ee25b3e0-e459-4f05-84d4-79c54224d639 AT dronecode DOT org DOT uk>
<20260317220447 DOT 0adcb7bd33d9b2863c212ba8 AT nifty DOT ne DOT jp>
Cc: cygwin AT cygwin DOT com
In-Reply-To: <20260317220447.0adcb7bd33d9b2863c212ba8@nifty.ne.jp>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Jon Turney via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

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 <module>
>>>      from giscanner.scannermain import scanner_main
>>>    File "/usr/lib/gobject-introspection/giscanner/scannermain.py", line 35, in <module>
>>>      from giscanner.ast import Include, Namespace
>>>    File "/usr/lib/gobject-introspection/giscanner/ast.py", line 27, in <module>
>>>      from .sourcescanner import CTYPE_TYPEDEF, CSYMBOL_TYPE_TYPEDEF
>>>    File "/usr/lib/gobject-introspection/giscanner/sourcescanner.py", line 31, in <module>
>>>      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 

(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


-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019